jactorch.nn.cnn.coord_conv#

CoordConv introduced in: “An intriguing failing of convolutional neural networks and the CoordConv solution”. https://arxiv.org/pdf/1807.03247.pdf

Codes are adapted from mkocabas/CoordConv-pytorch.

Classes

Class CoordConv

CoordConv#

alias of CoordConv2D

Class CoordConv2D

class CoordConv2D[source]#

Bases: Module

__init__(in_channels, out_channels, *args, use_radius=False, **kwargs)[source]#

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

forward(x)[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.