models

package
v0.0.0-...-2d2ca90 Latest Latest
Warning

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

Go to latest
Published: May 29, 2022 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type BasicBlockModule

type BasicBlockModule struct {
	nn.Module
	C1, C2     *nn.Conv2dModule
	BN1, BN2   *nn.BatchNorm2dModule
	Downsample *nn.SequentialModule
}

BasicBlockModule struct

func BasicBlock

func BasicBlock(inplanes, planes, stride int64, downsample *nn.SequentialModule,
	groups, baseWidth, dilation int64) *BasicBlockModule

BasicBlock returns a BasicBlockModule instance

func (*BasicBlockModule) Forward

func (b *BasicBlockModule) Forward(x torch.Tensor) torch.Tensor

Forward method

type BottleneckModule

type BottleneckModule struct {
	nn.Module
	C1, C2, C3    *nn.Conv2dModule
	BN1, BN2, BN3 *nn.BatchNorm2dModule
	Downsample    *nn.SequentialModule
}

BottleneckModule struct

func Bottleneck

func Bottleneck(inplanes, planes, stride int64, downsample *nn.SequentialModule,
	groups, baseWidth, dilation int64) *BottleneckModule

Bottleneck returns a BottleneckModule instance

func (*BottleneckModule) Forward

func (b *BottleneckModule) Forward(x torch.Tensor) torch.Tensor

Forward method

type MLPModule

type MLPModule struct {
	nn.Module
	FC1, FC2, FC3 *nn.LinearModule
}

MLPModule represent a multilayer perceptron network

func MLP

func MLP() *MLPModule

MLP returns MLPModule

func (*MLPModule) Forward

func (n *MLPModule) Forward(x torch.Tensor) torch.Tensor

Forward runs the forward pass

type ResnetModule

type ResnetModule struct {
	nn.Module
	C1                                    *nn.Conv2dModule
	BN1                                   *nn.BatchNorm2dModule
	L1, L2, L3, L4                        *nn.SequentialModule
	FC                                    *nn.LinearModule
	Block                                 reflect.Type
	Inplanes, Groups, BaseWidth, Dilation int64
}

ResnetModule struct

func Resnet

func Resnet(block reflect.Type, layers []int64, numClasses int64, zeroInitResidual bool, groups, widthPerGroup int64) *ResnetModule

Resnet returns a ResnetModule instance

func Resnet18

func Resnet18() *ResnetModule

Resnet18 returns a Resnet18 network

func Resnet50

func Resnet50() *ResnetModule

Resnet50 returns a Resnet50 network

func (*ResnetModule) Forward

func (r *ResnetModule) Forward(x torch.Tensor) torch.Tensor

Forward method

Jump to

Keyboard shortcuts

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