class_docstr: Residual connection with learnable scalar multipliers on the main branch.
  
  scalar: Single scalar multiplier, or one per dimension
  scale, power: Initialize to scale * layer_num**(-power)
code: def __init__(self, *args, scalar=True, gamma=0.0, **kwargs):
      # print("ConstantResidual extra kwargs", kwargs)
      super().__init__(*args, **kwargs)
      self.scalar = scalar
      self.gamma = gamma
  
      c = self.beta * self.i_layer ** (-self.gamma)
      d = 1 if self.scalar else self.d_input
      self.affine = nn.Parameter(c * torch.ones(d))
  
imports: import torch
  from torch import nn
label_desc: Use image node_id 1 to create a new Affine object from inherited base classes: Residual with example: obj = Affine()