mirror of
https://github.com/zebrajr/pytorch.git
synced 2025-12-06 12:20:52 +01:00
Let's have some fun. Pull Request resolved: https://github.com/pytorch/pytorch/pull/78828 Approved by: https://github.com/ezyang
20 lines
484 B
C++
20 lines
484 B
C++
#pragma once
|
|
|
|
#include <torch/csrc/autograd/python_variable.h>
|
|
#include <torch/csrc/python_headers.h>
|
|
|
|
namespace torch {
|
|
namespace autograd {
|
|
|
|
Py_ssize_t THPVariable_length(PyObject* self);
|
|
PyObject* THPVariable_getitem(PyObject* self, PyObject* index);
|
|
int THPVariable_setitem(PyObject* self, PyObject* index, PyObject* value);
|
|
|
|
Variable valueToTensor(
|
|
c10::TensorOptions options,
|
|
PyObject* value,
|
|
const at::Device& device);
|
|
|
|
} // namespace autograd
|
|
} // namespace torch
|