Deallocates a TorchScript model
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
type(torch_model), | intent(in) | :: | model |
Torch Model to deallocate |
subroutine torch_model_delete(model) type(torch_model), intent(in) :: model !! Torch Model to deallocate interface subroutine torch_jit_model_delete_c(model) & bind(c, name = 'torch_jit_module_delete') use, intrinsic :: iso_c_binding, only : c_ptr type(c_ptr), value, intent(in) :: model end subroutine torch_jit_model_delete_c end interface call torch_jit_model_delete_c(model%p) end subroutine torch_model_delete