Template Struct CppNode

Inheritance Relationships

Base Type

Struct Documentation

template<class T>
struct torch::autograd::CppNode : public torch::autograd::Node

Public Functions

variable_list apply(variable_list &&inputs) override

Performs the Node’s actual operation.

void release_variables() override

Releases saved variables if the operation won’t be reused.

void set_ctx_grad_fn(const std::shared_ptr<Node> &node)
void save_variables_to_ctx()

Public Members

AutogradContext ctx_
std::vector<bool> is_variable_input_
std::vector<VariableInfo> input_info_
std::vector<VariableInfo> output_info_


Access comprehensive developer documentation for PyTorch

View Docs


Get in-depth tutorials for beginners and advanced developers

View Tutorials


Find development resources and get your questions answered

View Resources