(git:1f9fd2c)
Loading...
Searching...
No Matches
torch_api.F File Reference

Go to the source code of this file.

Data Types

type  torch_api::torch_tensor_type
 
type  torch_api::torch_dict_type
 
type  torch_api::torch_model_type
 
interface  torch_api::torch_tensor_from_array
 
interface  torch_api::torch_tensor_reset_from_array
 
interface  torch_api::torch_tensor_data_ptr
 
interface  torch_api::torch_model_get_attr
 

Modules

module  torch_api
 

Functions/Subroutines

subroutine, public torch_api::torch_tensor_expand_dim (tensor, dim, extent, result)
 Creates an expanded tensor view along one singleton dimension.
 
subroutine, public torch_api::torch_tensor_narrow (tensor, dim, start_index, length, result)
 Creates a view of a contiguous tensor slice.
 
subroutine, public torch_api::torch_tensor_backward (tensor, outer_grad)
 Runs autograd on a Torch tensor.
 
subroutine, public torch_api::torch_tensor_backward_scalar (tensor)
 Runs autograd on a scalar Torch tensor.
 
subroutine, public torch_api::torch_tensor_to_device_leaf (tensor, requires_grad)
 Moves a tensor to the active Torch device and makes it an autograd leaf.
 
subroutine, public torch_api::torch_use_cuda (use_cuda)
 Select whether Torch wrappers should use CUDA when available.
 
subroutine, public torch_api::torch_tensor_grad (tensor, grad)
 Returns the gradient of a Torch tensor which was computed by autograd.
 
subroutine, public torch_api::torch_tensor_weighted_sum (values, weights, result)
 Returns the weighted sum of two Torch tensors.
 
real(kind=dp) function, public torch_api::torch_tensor_item_double (tensor)
 Returns a scalar double value from a Torch tensor.
 
subroutine, public torch_api::torch_tensor_release (tensor)
 Releases a Torch tensor and all its ressources.
 
subroutine, public torch_api::torch_dict_create (dict)
 Creates an empty Torch dictionary.
 
subroutine, public torch_api::torch_dict_clone (source, target)
 Clones a Torch dictionary.
 
subroutine, public torch_api::torch_dict_insert (dict, key, tensor)
 Inserts a Torch tensor into a Torch dictionary.
 
subroutine, public torch_api::torch_dict_get (dict, key, tensor)
 Retrieves a Torch tensor from a Torch dictionary.
 
subroutine, public torch_api::torch_dict_release (dict)
 Releases a Torch dictionary and all its ressources.
 
subroutine, public torch_api::torch_model_load (model, filename)
 Loads a Torch model from given "*.pth" file. (In Torch lingo models are called modules)
 
subroutine, public torch_api::torch_model_forward (model, inputs, outputs)
 Evaluates the given Torch model.
 
subroutine, public torch_api::torch_model_forward_mol_tensor (model, method_name, inputs, output)
 Evaluates a TorchScript model method expecting keyword argument "mol".
 
subroutine, public torch_api::torch_model_release (model)
 Releases a Torch model and all its ressources.
 
character(:) function, allocatable, public torch_api::torch_model_read_metadata (filename, key)
 Reads metadata entry from given "*.pth" file. (In Torch lingo they are called extra files)
 
logical function, public torch_api::torch_cuda_is_available ()
 Returns true iff the Torch CUDA backend is available.
 
integer function, public torch_api::torch_cuda_device_count ()
 Return the number of CUDA devices visible to Torch.
 
subroutine, public torch_api::torch_allow_tf32 (allow_tf32)
 Set whether to allow the use of TF32. Needed due to changes in defaults from pytorch 1.7 to 1.11 to >=1.12 See https://pytorch.org/docs/stable/notes/cuda.html.
 
subroutine, public torch_api::torch_model_freeze (model)
 Freeze the given Torch model: applies generic optimization that speed up model. See https://pytorch.org/docs/stable/generated/torch.jit.freeze.html.