Module

torch.nn.modules.Module
abstract class Module

Attributes

Source
Module.scala
Graph
Supertypes
class Object
trait Matchable
class Any
Known subtypes
class ResNet[D]
class ModuleList[D]
class Sequential[D]
trait HasParams[ParamType]
class BatchNorm1d[ParamType]
class BatchNorm2d[ParamType]
class Conv2d[ParamType]
class Linear[ParamType]
class Dropout[ParamType]
class Embedding[ParamType]
trait TensorModule[D]
class BasicBlock[D]
class Bottleneck[D]
class LogSoftmax[D]
class ReLU[D]
class Softmax[D]
class Tanh[D]
class Flatten[D]
class Identity[D]
class GroupNorm[ParamType]
class LayerNorm[ParamType]
class MaxPool2d[D]
trait TensorModuleBase[D, D2]
Show all

Members list

Value members

Concrete methods

def apply(fn: Module => Unit): Module.this.type

Attributes

Source
Module.scala
def eval(): Unit

Attributes

Source
Module.scala
def hasBias(): Boolean

Attributes

Source
Module.scala

Attributes

Source
Module.scala
def load(inputArchive: InputArchive): Unit

Attributes

Source
Module.scala

Attributes

Source
Module.scala

Attributes

Source
Module.scala

Attributes

Source
Module.scala

Attributes

Source
Module.scala

Attributes

Source
Module.scala
def parameters: Seq[Tensor[_]]

Attributes

Source
Module.scala

Attributes

Source
Module.scala
def register[M <: Module](child: M, n: String)(using name: Name): M

Attributes

Source
Module.scala
def registerBuffer[D <: DType](t: Tensor[D], n: String)(using name: Name): Tensor[D]

Attributes

Source
Module.scala

Adds a buffer to the module.

Adds a buffer to the module.

Attributes

Source
Module.scala
def registerModule[M <: Module](child: M, n: String)(using name: Name): M

Attributes

Source
Module.scala
def registerParameter[D <: DType](t: Tensor[D], requiresGrad: Boolean, n: String)(using name: Name): Tensor[D]

Attributes

Source
Module.scala
def save(outputArchive: OutputArchive): Unit

Attributes

Source
Module.scala

Attributes

Source
Module.scala
def to(device: Device): Module.this.type

Attributes

Source
Module.scala
override def toString(): String

Returns a string representation of the object.

Returns a string representation of the object.

The default representation is platform dependent.

Attributes

Returns

a string representation of the object.

Definition Classes
Any
Source
Module.scala
def train(on: Boolean): Unit

Attributes

Source
Module.scala