vgg

package
v0.0.0-...-61db93c Latest Latest
Warning

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

Go to latest
Published: May 14, 2022 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func VGG16Builder

func VGG16Builder(opts Opts) func(*godl.Model) godl.Module

Types

type BlockModule

type BlockModule struct {
	// contains filtered or unexported fields
}

func Block

func Block(m *godl.Model, opts BlockOpts) *BlockModule

Block is a VGG block composed of conv2d+maxpool with optional dropout and activation function

func (*BlockModule) Forward

func (m *BlockModule) Forward(inputs ...*godl.Node) godl.Nodes

func (*BlockModule) Name

func (m *BlockModule) Name() string

type BlockOpts

type BlockOpts struct {
	InputDimension  int
	OutputDimension int

	Activation  activation.Function
	Dropout     float64
	KernelSize  tensor.Shape
	Pad         []int
	Stride      []int
	Dilation    []int
	WithBias    bool
	WithPooling bool

	WeightsInit, BiasInit gorgonia.InitWFn
	WeightsName, BiasName string
	FixedWeights          bool
}

BlockOpts are the options for a VGG Block

type Opts

type Opts struct {
	WithBias              bool
	WeightsInit, BiasInit gorgonia.InitWFn
	Learnable             bool

	PreTrained            bool
	OnlyFeatureExtraction bool
}

Opts are the options for VGG

type VGG16Module

type VGG16Module struct {
	// contains filtered or unexported fields
}

func VGG16

func VGG16(m *godl.Model, opts Opts) *VGG16Module

VGG16 returns the layer for the VGG16 network

func (*VGG16Module) Forward

func (m *VGG16Module) Forward(inputs ...*godl.Node) godl.Nodes

func (*VGG16Module) Name

func (m *VGG16Module) Name() string

Jump to

Keyboard shortcuts

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