MCPcopy Create free account
hub / github.com/Oneflow-Inc/oneflow / PyTensorObject_grad

Function PyTensorObject_grad

oneflow/api/python/framework/tensor.cpp:605–609  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

603}
604
605static PyObject* PyTensorObject_grad(PyObject* self, void* unused) {
606 HANDLE_ERRORS
607 return PyTensor_New(ASSERT_PTR(PyTensor_Unpack(self)->acc_grad()));
608 END_HANDLE_ERRORS
609}
610
611static int PyTensorObject_set_grad(PyObject* self, PyObject* grad, void* unused) {
612 HANDLE_ERRORS

Callers

nothing calls this directly

Calls 1

acc_gradMethod · 0.45

Tested by

no test coverage detected