Caffe2 - C++ API
A deep learning, cross platform ML framework
python_hook.h
1 #pragma once
2 
3 #include <torch/csrc/python_headers.h>
4 #include <torch/csrc/autograd/function_hook.h>
5 #include <torch/csrc/utils/object_ptr.h>
6 
7 namespace torch { namespace autograd {
8 
10  PyFunctionPreHook(PyObject* dict, int value_idx);
11  ~PyFunctionPreHook() override;
12  variable_list operator()(const variable_list& values) override;
13  PyObject* dict;
14  int value_idx;
15 };
16 
18  PyFunctionPostHook(PyObject* dict);
19  ~PyFunctionPostHook() override;
20  variable_list operator()(const variable_list& outputs, const variable_list& inputs) override;
21  PyObject* dict;
22 };
23 
24 }} // namespace torch::autograd
Definition: python_hook.h:17
Definition: jit_type.h:17
Definition: function_hook.h:17