utils module

Model utilities

class Reshift(scale=2.0, offset=- 1.0)[source]

Bases: torch.nn.modules.module.Module

Un-trainable activation: shift and scale data

The input x is transformed as x*scale + offset. Scale and offset are untrainable scalars.

Parameters
  • scale (float) –

  • offset (float) –

forward(x)[source]
training: bool[source]