Caffe2 - C++ API
A deep learning, cross platform ML framework
tensor_numpy.h
1 #pragma once
2 
3 #include <torch/csrc/python_headers.h>
4 #include <ATen/ATen.h>
5 
6 namespace torch { namespace utils {
7 
8 PyObject* tensor_to_numpy(const at::Tensor& tensor);
9 at::Tensor tensor_from_numpy(PyObject* obj);
10 
11 at::ScalarType numpy_dtype_to_aten(int dtype);
12 
13 bool is_numpy_scalar(PyObject* obj);
14 
15 }} // namespace torch::utils
Definition: jit_type.h:17