Blocks
- class InnerEye.ML.models.blocks.residual.ResidualBlock(layers: List[Module], channels: List[int], kernel_size: int, dilations: List[int])[source]
A block of several convolution layers with a residual connection around them. If the channels change, then the number of channels must be synchronized with the expected input number of channels of the layer this residual is passed into. For instance, if we have an instance where (1) L1 (10) -> (10) L2 (20) -> (30) L3 (40) , with a residual connection L1 -> L3 then as L1 and L2 output only 10 + 20 = 30 channels, in which case we use another convnet that takes the feature responses of L1 as input and uses 30 kernels to output 30 channels that can then be passed into L3.
- forward(x: Tensor) Tensor[source]
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
Moduleinstance afterwards instead of this since the former takes care of running the registered hooks while the latter silently ignores them.
- training: bool