nn_functional

package
v0.0.0-...-8e0162c Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jan 8, 2023 License: MIT Imports: 4 Imported by: 0

Documentation

Index

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,
) torch.Tensor

Interpolate a tensor by scale.

func InterpolateSize

func InterpolateSize(
	input torch.Tensor,
	size []int64,
	mode InterpolateMode,
	alignCorners bool,
	antialias bool,
) torch.Tensor

Interpolate a tensor by size.

func Normalize

func Normalize(input torch.Tensor, p float64, dim int, eps float64) torch.Tensor

func Pad

func Pad(
	input torch.Tensor,
	padding []int64,
	mode PadMode,
	value ...float64,
) torch.Tensor

Pad a tensor.

func Relu

func Relu(tensor torch.Tensor, inplace bool) torch.Tensor

func Softmax

func Softmax(tensor torch.Tensor, dim int64) torch.Tensor

Types

type InterpolateMode

type InterpolateMode int64

Interpolation algorithms implemented by libtorch.

const (
	InterpolateNearest InterpolateMode = iota
	InterpolateLinear
	InterpolateBilinear
	InterpolateBicubic
	InterpolateTrilinear
	InterpolateArea
	InterpolateNearestExact
)

type PadMode

type PadMode int64

Padding algorithms implemented by libtorch.

const (
	PadConstant PadMode = iota
	PadReflect
	PadReplicate
	PadCircular
)

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL