Caffe2 - C++ API
A deep learning, cross platform ML framework
Related Pages
Modules
Data Structures
Files
C++ API
Python API
GitHub
File List
Globals
torch
csrc
autograd
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
9
struct
PyFunctionPreHook
:
public
FunctionPreHook
{
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
17
struct
PyFunctionPostHook
:
public
FunctionPostHook
{
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
torch::autograd::PyFunctionPostHook
Definition:
python_hook.h:17
torch::autograd::PyFunctionPreHook
Definition:
python_hook.h:9
torch
Definition:
jit_type.h:17
torch::autograd::FunctionPostHook
Definition:
function_hook.h:17
torch::autograd::FunctionPreHook
Definition:
function_hook.h:12
Generated on Thu Mar 21 2019 13:06:22 for Caffe2 - C++ API by
1.8.11