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_anomaly_mode.h
1
#pragma once
2
3
#include <torch/csrc/autograd/anomaly_mode.h>
4
#include <torch/csrc/python_headers.h>
5
#include <torch/csrc/utils/auto_gil.h>
6
7
namespace
torch
{
namespace
autograd {
8
9
struct
PyAnomalyMetadata
:
public
AnomalyMetadata
{
10
static
constexpr
char
* ANOMALY_TRACE_KEY =
"traceback_"
;
11
12
PyAnomalyMetadata
() {
13
AutoGIL
gil;
14
dict_ = PyDict_New();
15
}
16
~
PyAnomalyMetadata
()
override
{
17
AutoGIL
gil;
18
Py_DECREF(dict_);
19
}
20
void
store_stack()
override
;
21
void
print_stack()
override
;
22
23
PyObject* dict() {
24
return
dict_;
25
}
26
27
private
:
28
PyObject* dict_;
29
};
30
31
}}
AutoGIL
Definition:
auto_gil.h:8
torch
Definition:
jit_type.h:17
torch::autograd::AnomalyMetadata
Definition:
anomaly_mode.h:20
torch::autograd::PyAnomalyMetadata
Definition:
python_anomaly_mode.h:9
Generated on Thu Mar 21 2019 13:06:22 for Caffe2 - C++ API by
1.8.11