3 #include <torch/csrc/WindowsTorchApiMacro.h> 4 #include <torch/csrc/jit/ir.h> 14 using value_list = std::vector<Value*>;
42 explicit operator bool()
const {
45 std::shared_ptr<Graph> f;
46 std::shared_ptr<Graph> df;
51 size_t f_real_outputs = 0;
59 std::vector<size_t> df_input_vjps;
61 std::vector<size_t> df_input_captured_inputs;
62 std::vector<size_t> df_input_captured_outputs;
67 std::vector<size_t> df_output_vjps;
90 TORCH_API
Gradient differentiate(std::shared_ptr<Graph>& graph);
93 TORCH_API
bool isDifferentiable(
Node* n);
94 TORCH_API
bool isDifferentiable(
Graph& g);
95 TORCH_API
bool isZero(
Value* v);