Type for holding a Torch tensor.
Type | Visibility | Attributes | Name | Initial | |||
---|---|---|---|---|---|---|---|
type(c_ptr), | public | :: | p | = | c_null_ptr |
pointer to the tensor in memory |
Deallocates a tensor.
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
type(torch_tensor), | intent(inout) | :: | tensor |
Determines the device index of a tensor.
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
class(torch_tensor), | intent(in) | :: | self |
Input tensor |
Device index of tensor
Returns the device type of a tensor.
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
class(torch_tensor), | intent(in) | :: | self |
Input tensor |
Device type of tensor
Returns the data type of a tensor.
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
class(torch_tensor), | intent(in) | :: | self |
Input tensor |
Data type of tensor
Determines the rank of a tensor.
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
class(torch_tensor), | intent(in) | :: | self |
rank of tensor
Determines the shape of a tensor.
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
class(torch_tensor), | intent(in) | :: | self |
Pointer to tensor data
Determines whether a tensor requires the autograd module.
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
class(torch_tensor), | intent(in) | :: | self |
type torch_tensor type(c_ptr) :: p = c_null_ptr !! pointer to the tensor in memory contains procedure :: get_rank => torch_tensor_get_rank procedure :: get_shape => torch_tensor_get_shape procedure :: get_dtype => torch_tensor_get_dtype procedure :: get_device_type => torch_tensor_get_device_type procedure :: get_device_index => torch_tensor_get_device_index procedure :: requires_grad => torch_tensor_requires_grad final :: torch_tensor_delete end type torch_tensor