package
0.9.1
Repository: https://github.com/sugarme/gotch.git
Documentation: pkg.go.dev

# Functions

BatchAccuracyForLogits calculates average accuracy of test batches.
BatchAccuracyForLogitIdx is an alternative of BatchAccuracyForLogits to calculate accuracy for specified batch on module weight.
No description provided by the author
Applies Batch Normalization over a three dimension input.
Applies Batch Normalization over a four dimension input.
Applies Batch Normalization over a five dimension input.
BCELoss calculates a binary cross entropy loss.
CalculateFans calculates fan-in and fan-out based on tensor shape.
CrossEntropyLoss calculates cross entropy loss.
DefaultAdamConfig creates AdamConfig with default values.
DefaultAdamWConfig creates AdamWConfig with default values.
No description provided by the author
DefaultConvConfig create a default 1D ConvConfig.
DefaultConvConfig2D creates a default 2D ConvConfig.
DefaultConvConfig3D creates a default 3D ConvConfig.
DefaultConvConfig create a default 1D ConvConfig.
No description provided by the author
No description provided by the author
No description provided by the author
DefaultLinearConfig creates default LinearConfig with weights initiated using KaimingUniform and Bias is set to true.
No description provided by the author
DefaultAdamConfig creates AdamConfig with default values.
Default creates default RNN configuration.
No description provided by the author
DefaultSGDConfig creates SGDConfig with default values.
MSELoss calculates Mean-Square Loss.
NewAdamConfig creates AdamConfig with specified values.
NewAdamWConfig creates AdamWConfig with specified values.
NewBatchNorm creates a new BatchNorm layer.
NewBuffer creates new buffer.
No description provided by the author
NewConv is a generic builder to build Conv1D, Conv2D, Conv3D.
NewConv1D creates Conv1D struct.
NewConv1DConfig creates Conv1DConfig.
NewConv2D creates new Conv2D.
NewConv2DConfig creates Conv2DConfig.
NewConv3D creates new Conv3D struct.
NewConv3DConfig creates Conv3DConfig.
No description provided by the author
No description provided by the author
No description provided by the author
NewConsineAnnealingLR creates a new ConsineAnnealingLR.
No description provided by the author
No description provided by the author
NewDropout creates a new Dropout layer.
NewEmbedding creates a new Embedding.
NewExponentialLR creates a new ExponentialLR.
No description provided by the author
No description provided by the author
No description provided by the author
NewGRU create a new GRU layer.
No description provided by the author
No description provided by the author
No description provided by the author
NewLambdaLRS creates a new LambdaLRS.
No description provided by the author
NewLinear creates a new linear layer y = x*wT + b inDim - input dimension (x) [input features - columns] outDim - output dimension (y) [output features - columns] NOTE: w will have shape{outDim, inDim}; b will have shape{outDim}.
No description provided by the author
NewLSTM creates a LSTM layer.
No description provided by the author
NewMultiplicativeLR creates a new MultiplicativeLR.
NewStepLR creates a new StepLR.
No description provided by the author
NewParameter creates a kind of tensor that is considered as a module parameter.
No description provided by the author
No description provided by the author
NewRMSPropConfig creates RMSPropConfig with specified values.
NewSGD creates the configuration for a SGD optimizer with specified values.
NewStepLR creates a new StepLR.
No description provided by the author
NewVarStore creates a new variable store located on the specified device.
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
Seq creates a new empty sequential layer.
/ SeqT creates a new empty sequential layer.
TrainableCModuleLoad loads a PyTorch saved JIT module from a file and adds tensors (weights) to `varstore` so that module can be trained.
No description provided by the author
WithBias1D adds bias 1D option.
WithBias2D adds bias 2D option.
WithBias3D adds bias 3D option.
WithBsInit adds BsInit 1D option.
WithBsInit adds BsInit 2D option.
WithBsInit adds BsInit 3D option.
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
WithDilation1D adds dilation 1D option.
WithDilation2D adds dilation 2D option.
WithDilation3D adds dilation 3D option.
No description provided by the author
No description provided by the author
No description provided by the author
WithGroup2D adds group 2D option.
WithGroup3D adds group 3D option.
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
WithPadding1D adds padding 1D option.
WithPadding2D adds padding 2D option.
WithPadding3D adds padding 3D option.
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
withStride1D adds stride 1D option.
WithStride2D adds stride 2D option.
WithStride3D adds stride 3D option.
No description provided by the author
WithUint8 returns an uint8 value option.
No description provided by the author
WithWsInit adds WsInit 1D option.
WithWsInit2D adds WsInit 2D option.
WithWsInit3D adds WsInit 3D option.
XavierUniform fills the input tensor with values according to the method described in the paper `Understanding the difficulty of training deep feedforward neural networks` using a uniform distribution Also known as Glorot initialization.

# Constants

SEP is a separator to separate path elements in the tensor names.

# Structs

No description provided by the author
No description provided by the author
No description provided by the author
A batch-normalization layer.
Batch-normalization config.
No description provided by the author
Conv1D is convolution 1D struct.
Conv1DConfig is configuration struct for convolution 1D.
Conv2D is convolution 2D struct.
Conv2DConfig is configuration for convolution 2D.
Conv3D is convolution 3D struct.
Conv3DConfig is configuration struct for convolution 3D.
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
CosineAnnealingLR set the learning rates of each optimizer parameter group by using a cosine annealing schedule where eta max is set to initial learning rate and Tcur is the number of epochs since the last restart in SGDR (Stochastic Gradient Descent with Warm Restarts).
CosineAnnealingWarmRestart sets the learning rate of each parameter group using a cosine annealing schedule.
No description provided by the author
CyclicLR sets the learning rate of each parameter group according to cyclical learning rate policy (CLR).
No description provided by the author
Dropout represents a neural network dropout layer.
An embedding layer.
Configuration option for an embedding layer.
Entry
Entry holds an entry corresponding to a given name in Path.
ExponentialLR decays the learning rates of each optimizer parameter group by gamma every epochs.
No description provided by the author
No description provided by the author
A Gated Recurrent Unit (GRU) layer.
GRUState is a GRU state.
No description provided by the author
kaiminguniformInit : ====================.
LamdaLR calculates new learning rate for each parameter group by applying Lambda function to the corresponding INITIAL learning rate.
A layer-normalization layer.
Layer-normalization config.
Linear is a linear fully-connected layer.
LinearConfig is a configuration for a linear layer.
LRScheduler is a scheduler to update optimizer learning rates.
A Long Short-Term Memory (LSTM) layer.
The state for a LSTM network, this contains two tensors.
No description provided by the author
No description provided by the author
MultiplicativeLR calculates new learning rates for each optimizer para groups by applying corresponding Lambda function to the CURRENT learning rate.
StepLR decays the learning rates of each optimizer parameter group by gamm once the number of epochs reaches one of the milestones.
OneCycleLR sets the learning rate of each parameter group according to the 1cycle learning rate policy.
No description provided by the author
Optimizer is a struct object to run gradient descent.
Path is variable store with an associated path for variables naming.
ReduceLROnPlateau reduces learning rate when a metric has stopped improving.
No description provided by the author
No description provided by the author
The GRU and LSTM layers share the same config.
No description provided by the author
Sequential is a layer (container) that combines multiple other layers.
SequentialT is a sequential layer combining new layers with support for a training mode.
SGDConfig holds parameters for building the SGD (Stochastic Gradient Descent) optimizer.
StepLR decays the learning rates of each optimizer parameter group by gamma every step size epochs.
TrainableCModule is a trainable version of JIT Pytorch module These modules can be created via TorchScript python API.
No description provided by the author
VarStore is used to store variables used by one or multiple layers.

# Interfaces

No description provided by the author
No description provided by the author
OptimizerConfig defines Optimizer configurations.
No description provided by the author
No description provided by the author

# Type aliases

No description provided by the author
No description provided by the author
Conv1DConfigOpt is option for Conv1DConfig.
Conv2DConfigOpt is option type for Conv2DConfig.
Conv3DConfigOpt is option type for Conv3DConfig.
No description provided by the author
No description provided by the author
No description provided by the author
ForwardWith is a handler function to implement Module interface for any (anonymous) function it wraps.
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author