Documentation ¶
Index ¶
- func InterpolateScale(input *torch.Tensor, scale []float64, mode InterpolateMode, alignCorners bool, ...) (output *torch.Tensor)
- func InterpolateSize(input *torch.Tensor, size []int64, mode InterpolateMode, alignCorners bool, ...) (output *torch.Tensor)
- func Normalize(input *torch.Tensor, p float64, dim int, eps float64) (output *torch.Tensor)
- func Pad(input *torch.Tensor, padding []int64, mode PadMode, value ...float64) (output *torch.Tensor)
- func Relu(input *torch.Tensor, inplace bool) (output *torch.Tensor)
- func Softmax(input *torch.Tensor, dim int64) (output *torch.Tensor)
- type InterpolateMode
- type PadMode
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func InterpolateScale ¶
func InterpolateScale( input *torch.Tensor, scale []float64, mode InterpolateMode, alignCorners bool, antialias bool, ) (output *torch.Tensor)
Down/up sample the input to either the given scale factor. The algorithm used for interpolation is determined by mode. Currently temporal, spatial and volumetric sampling are supported, i.e. expected inputs are 3-D, 4-D or 5-D in shape. The input dimensions are interpreted in the form: mini-batch x channels x [optional depth] x [optional height] x width. The modes available for resizing are: nearest, linear (3D-only), bilinear, bicubic (4D-only), trilinear (5D-only), area, nearest-exact
func InterpolateSize ¶
func InterpolateSize( input *torch.Tensor, size []int64, mode InterpolateMode, alignCorners bool, antialias bool, ) (output *torch.Tensor)
Down/up sample the input to either the given size. The algorithm used for interpolation is determined by mode. Currently temporal, spatial and volumetric sampling are supported, i.e. expected inputs are 3-D, 4-D or 5-D in shape. The input dimensions are interpreted in the form: mini-batch x channels x [optional depth] x [optional height] x width. The modes available for resizing are: nearest, linear (3D-only), bilinear, bicubic (4D-only), trilinear (5D-only), area, nearest-exact
func Pad ¶
func Pad( input *torch.Tensor, padding []int64, mode PadMode, value ...float64, ) (output *torch.Tensor)
Pad a tensor.
Types ¶
type InterpolateMode ¶
type InterpolateMode int64
Interpolation algorithms implemented by libtorch.
const ( InterpolateNearest InterpolateMode = iota InterpolateLinear InterpolateBilinear InterpolateBicubic InterpolateTrilinear InterpolateArea InterpolateNearestExact )