Bottleneck

torchvision.models.resnet.Bottleneck
See theBottleneck companion object

Bottleneck in torchvision places the stride for downsampling at 3x3 convolution(self.conv2) while original implementation places the stride at the first 1x1 convolution(self.conv1) according to "Deep residual learning for image recognition"https://arxiv.org/abs/1512.03385. This variant is also known as ResNet V1.5 and improves accuracy according to https://ngc.nvidia.com/catalog/model-scripts/nvidia:resnet_50_v1_5_for_pytorch.

Attributes

Companion
object
Source
resnet.scala
Graph
Supertypes
trait TensorModule[D]
trait Tensor[D] => Tensor[D]
class Module
class Object
trait Matchable
class Any
Show all

Members list

Value members

Concrete methods

def apply(x: Tensor[D]): Tensor[D]

Attributes

Source
resnet.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
Source
resnet.scala

Inherited methods

def andThen[A](g: Tensor[D] => A): T1 => A

Attributes

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

Attributes

Inherited from:
Module
Source
Module.scala
def compose[A](g: A => Tensor[D]): A => R

Attributes

Inherited from:
Function1
def eval(): Unit

Attributes

Inherited from:
Module
Source
Module.scala
def hasBias(): Boolean

Attributes

Inherited from:
Module
Source
Module.scala

Attributes

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

Attributes

Inherited from:
Module
Source
Module.scala

Attributes

Inherited from:
Module
Source
Module.scala

Attributes

Inherited from:
Module
Source
Module.scala

Attributes

Inherited from:
Module
Source
Module.scala

Attributes

Inherited from:
Module
Source
Module.scala

Attributes

Inherited from:
Module
Source
Module.scala

Attributes

Inherited from:
Module
Source
Module.scala

Attributes

Inherited from:
Module
Source
Module.scala

Attributes

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

Attributes

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

Attributes

Inherited from:
Module
Source
Module.scala

Adds a buffer to the module.

Adds a buffer to the module.

Attributes

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

Attributes

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

Attributes

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

Attributes

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

Attributes

Inherited from:
Module
Source
Module.scala

Attributes

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

Attributes

Inherited from:
Module
Source
Module.scala
def train(on: Boolean): Unit

Attributes

Inherited from:
Module
Source
Module.scala

Concrete fields

val bn1: HasWeight[D] & TensorModule[D]

Attributes

Source
resnet.scala
val bn2: HasWeight[D] & TensorModule[D]

Attributes

Source
resnet.scala
val bn3: HasWeight[D] & TensorModule[D]

Attributes

Source
resnet.scala
val conv1: Conv2d[D]

Attributes

Source
resnet.scala
val conv2: Conv2d[D]

Attributes

Source
resnet.scala
val conv3: Conv2d[D]

Attributes

Source
resnet.scala
val relu: ReLU[D]

Attributes

Source
resnet.scala
val width: Int

Attributes

Source
resnet.scala