Type for holding a torch neural net (nn.Module).
| Type | Visibility | Attributes | Name | Initial | |||
|---|---|---|---|---|---|---|---|
| type(c_ptr), | public | :: | p | = | c_null_ptr |
pointer to the neural net in memory |
Deallocates a TorchScript model
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| type(torch_model), | intent(inout) | :: | model |
Torch Model to deallocate |
Determines whether a model is set up for training
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(torch_model), | intent(in) | :: | self |
Model to query |
Whether the model is set up for training
Prints the parameters associated with a model NOTE: While viewing parameters in this way can be helpful for small toy models, it will produce large amounts of output for models with many, large, or high-dimensional parameters. In particular, tensors of 3 or more dimensions will be represented in terms of 2D arrays.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(torch_model), | intent(in) | :: | self |
Model to print the parameters of |
type torch_model type(c_ptr) :: p = c_null_ptr !! pointer to the neural net in memory contains procedure :: print_parameters => torch_model_print_parameters procedure :: is_training => torch_model_is_training final :: torch_model_delete end type torch_model