jactorch.nn.cnn.conv#

Classes

Conv1d

Conv2d

Conv3d

ConvNDBase

ConvTranspose1d

ConvTranspose2d

ConvTranspose3d

ConvTransposeNDBase

ResizeConv1d

ResizeConv2d

ResizeConv3d

ResizeConvBase

SequenceConvWrapper

Wrapper for a sequence of Conv1D layers, support automatic dimension permutation to fit the requirement of Conv1D.

Class Conv1d

class Conv1d[source]#

Bases: ConvNDBase

__init__(in_channels, out_channels, kernel_size, stride=1, padding_mode='default', padding=0, border_mode='zeros', output_padding=0, output_border_mode='zeros', dilation=1, groups=1, bias=True)#

Initialize internal Module state, shared by both nn.Module and ScriptModule.

forward(input)#

Define the computation performed at every call.

Should be overridden by all subclasses.

Note

Although the recipe for forward pass needs to be defined within this function, one should call the Module instance afterwards instead of this since the former takes care of running the registered hooks while the latter silently ignores them.

property input_dim#
property output_dim#

Class Conv2d

class Conv2d[source]#

Bases: ConvNDBase

__init__(in_channels, out_channels, kernel_size, stride=1, padding_mode='default', padding=0, border_mode='zeros', output_padding=0, output_border_mode='zeros', dilation=1, groups=1, bias=True)#

Initialize internal Module state, shared by both nn.Module and ScriptModule.

forward(input)#

Define the computation performed at every call.

Should be overridden by all subclasses.

Note

Although the recipe for forward pass needs to be defined within this function, one should call the Module instance afterwards instead of this since the former takes care of running the registered hooks while the latter silently ignores them.

property input_dim#
property output_dim#

Class Conv3d

class Conv3d[source]#

Bases: ConvNDBase

__init__(in_channels, out_channels, kernel_size, stride=1, padding_mode='default', padding=0, border_mode='zeros', output_padding=0, output_border_mode='zeros', dilation=1, groups=1, bias=True)#

Initialize internal Module state, shared by both nn.Module and ScriptModule.

forward(input)#

Define the computation performed at every call.

Should be overridden by all subclasses.

Note

Although the recipe for forward pass needs to be defined within this function, one should call the Module instance afterwards instead of this since the former takes care of running the registered hooks while the latter silently ignores them.

property input_dim#
property output_dim#

Class ConvNDBase

class ConvNDBase[source]#

Bases: Module

__init__(in_channels, out_channels, kernel_size, stride=1, padding_mode='default', padding=0, border_mode='zeros', output_padding=0, output_border_mode='zeros', dilation=1, groups=1, bias=True)[source]#

Initialize internal Module state, shared by both nn.Module and ScriptModule.

forward(input)[source]#

Define the computation performed at every call.

Should be overridden by all subclasses.

Note

Although the recipe for forward pass needs to be defined within this function, one should call the Module instance afterwards instead of this since the former takes care of running the registered hooks while the latter silently ignores them.

property input_dim#
property output_dim#

Class ConvTranspose1d

class ConvTranspose1d[source]#

Bases: ConvTransposeNDBase

__init__(in_channels, out_channels, kernel_size, stride=1, padding_mode='default', padding=0, border_mode='zeros', output_padding=0, output_border_mode='zeros', dilation=1, groups=1, bias=True)#

Initialize internal Module state, shared by both nn.Module and ScriptModule.

forward(input, output_size=None, scale_factor=None)#

Define the computation performed at every call.

Should be overridden by all subclasses.

Note

Although the recipe for forward pass needs to be defined within this function, one should call the Module instance afterwards instead of this since the former takes care of running the registered hooks while the latter silently ignores them.

property input_dim#
property output_dim#

Class ConvTranspose2d

class ConvTranspose2d[source]#

Bases: ConvTransposeNDBase

__init__(in_channels, out_channels, kernel_size, stride=1, padding_mode='default', padding=0, border_mode='zeros', output_padding=0, output_border_mode='zeros', dilation=1, groups=1, bias=True)#

Initialize internal Module state, shared by both nn.Module and ScriptModule.

forward(input, output_size=None, scale_factor=None)#

Define the computation performed at every call.

Should be overridden by all subclasses.

Note

Although the recipe for forward pass needs to be defined within this function, one should call the Module instance afterwards instead of this since the former takes care of running the registered hooks while the latter silently ignores them.

property input_dim#
property output_dim#

Class ConvTranspose3d

class ConvTranspose3d[source]#

Bases: ConvTransposeNDBase

__init__(in_channels, out_channels, kernel_size, stride=1, padding_mode='default', padding=0, border_mode='zeros', output_padding=0, output_border_mode='zeros', dilation=1, groups=1, bias=True)#

Initialize internal Module state, shared by both nn.Module and ScriptModule.

forward(input, output_size=None, scale_factor=None)#

Define the computation performed at every call.

Should be overridden by all subclasses.

Note

Although the recipe for forward pass needs to be defined within this function, one should call the Module instance afterwards instead of this since the former takes care of running the registered hooks while the latter silently ignores them.

property input_dim#
property output_dim#

Class ConvTransposeNDBase

class ConvTransposeNDBase[source]#

Bases: ConvNDBase

__init__(in_channels, out_channels, kernel_size, stride=1, padding_mode='default', padding=0, border_mode='zeros', output_padding=0, output_border_mode='zeros', dilation=1, groups=1, bias=True)#

Initialize internal Module state, shared by both nn.Module and ScriptModule.

forward(input, output_size=None, scale_factor=None)[source]#

Define the computation performed at every call.

Should be overridden by all subclasses.

Note

Although the recipe for forward pass needs to be defined within this function, one should call the Module instance afterwards instead of this since the former takes care of running the registered hooks while the latter silently ignores them.

property input_dim#
property output_dim#

Class ResizeConv1d

class ResizeConv1d[source]#

Bases: ResizeConvBase

__init__(in_channels, out_channels, kernel_size, stride=1, padding_mode='same', padding=0, border_mode='replicate', dilation=1, groups=1, bias=True, output_size=None, scale_factor=None, resize_mode='nearest')#

Initialize internal Module state, shared by both nn.Module and ScriptModule.

forward(input)#

Define the computation performed at every call.

Should be overridden by all subclasses.

Note

Although the recipe for forward pass needs to be defined within this function, one should call the Module instance afterwards instead of this since the former takes care of running the registered hooks while the latter silently ignores them.

property input_dim#
property output_dim#

Class ResizeConv2d

class ResizeConv2d[source]#

Bases: ResizeConvBase

__init__(in_channels, out_channels, kernel_size, stride=1, padding_mode='same', padding=0, border_mode='replicate', dilation=1, groups=1, bias=True, output_size=None, scale_factor=None, resize_mode='nearest')#

Initialize internal Module state, shared by both nn.Module and ScriptModule.

forward(input)#

Define the computation performed at every call.

Should be overridden by all subclasses.

Note

Although the recipe for forward pass needs to be defined within this function, one should call the Module instance afterwards instead of this since the former takes care of running the registered hooks while the latter silently ignores them.

property input_dim#
property output_dim#

Class ResizeConv3d

class ResizeConv3d[source]#

Bases: ResizeConvBase

__init__(in_channels, out_channels, kernel_size, stride=1, padding_mode='same', padding=0, border_mode='replicate', dilation=1, groups=1, bias=True, output_size=None, scale_factor=None, resize_mode='nearest')#

Initialize internal Module state, shared by both nn.Module and ScriptModule.

forward(input)#

Define the computation performed at every call.

Should be overridden by all subclasses.

Note

Although the recipe for forward pass needs to be defined within this function, one should call the Module instance afterwards instead of this since the former takes care of running the registered hooks while the latter silently ignores them.

property input_dim#
property output_dim#

Class ResizeConvBase

class ResizeConvBase[source]#

Bases: ConvNDBase

__init__(in_channels, out_channels, kernel_size, stride=1, padding_mode='same', padding=0, border_mode='replicate', dilation=1, groups=1, bias=True, output_size=None, scale_factor=None, resize_mode='nearest')[source]#

Initialize internal Module state, shared by both nn.Module and ScriptModule.

forward(input)[source]#

Define the computation performed at every call.

Should be overridden by all subclasses.

Note

Although the recipe for forward pass needs to be defined within this function, one should call the Module instance afterwards instead of this since the former takes care of running the registered hooks while the latter silently ignores them.

property input_dim#
property output_dim#

Class SequenceConvWrapper

class SequenceConvWrapper[source]#

Bases: Module

Wrapper for a sequence of Conv1D layers, support automatic dimension permutation to fit the requirement of Conv1D.

__init__(*modules, batch_first=True)[source]#

Initialize internal Module state, shared by both nn.Module and ScriptModule.

forward(input)[source]#

Define the computation performed at every call.

Should be overridden by all subclasses.

Note

Although the recipe for forward pass needs to be defined within this function, one should call the Module instance afterwards instead of this since the former takes care of running the registered hooks while the latter silently ignores them.