Struct tch::TrainableCModule[][src]

pub struct TrainableCModule { /* fields omitted */ }
Expand description

The trainable version of a jit PyTorch module.

These modules can be created via the TorchScript python api.

Implementations

Loads a PyTorch saved JIT module from a file.

This function also adds the tensors from the JIT module to the VarStore path passed as argument so that the module can be trained.

Loads a PyTorch saved JIT model from a read instance.

This function also adds the tensors from the JIT module to the VarStore path passed as argument so that the module can be trained.

Switches the module to training mode.

Switches the module to training mode.

Switches the module to evaluation mode.

Switches the module to evaluation mode.

Performs the forward pass for a model on some specified tensor inputs.

Performs the forward pass for a model on some specified ivalue inputs.

Runs a specified entry point for a model on some given tensor inputs.

Runs a specified entry point for a model on some given ivalue inputs.

Trait Implementations

Formats the value using the given formatter. Read more

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more

Performs the conversion.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.