Creates a tensor cloning a numpy array, with the given precision (defaulting to input's precision) and the given device (in case of GPUs)
(self, a, type_as=None)
| 280 | |
| 281 | # convert an array from numpy |
| 282 | def _from_numpy(self, a, type_as=None): |
| 283 | """Creates a tensor cloning a numpy array, with the given precision (defaulting to input's precision) and the given device (in case of GPUs)""" |
| 284 | raise NotImplementedError() |
| 285 | |
| 286 | def set_gradients(self, val, inputs, grads): |
| 287 | """Define the gradients for the value val wrt the inputs""" |