multiml.task.pytorch.modules.conv2d module

class multiml.task.pytorch.modules.conv2d.Conv2DBlock(layers_conv2d=None, initialize=True, *args, **kwargs)

Bases: Module

__init__(layers_conv2d=None, initialize=True, *args, **kwargs)
Parameters:
  • layers_conv2d (list(tuple(str, dict))) – configs of conv2d layer. list of tuple(op_name, op_args).

  • *args – Variable length argument list

  • **kwargs – Arbitrary keyword arguments

forward(x)

Defines 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.

training: bool