class_docstr: ISONet, a modified ResNet model.
class_docstr_tok: ["ISONet",",","a","modified","ResNet","model","."]
docstr: regularizes the convolution kernel to be (near) orthogonal during training.
  This is called in Trainer.loss of the isonet example.
docstr_tok: ["regularizes","the","convolution","kernel","to","be","(","near",")","orthogonal","during","training",".","This","is","called","in","Trainer.loss","of","the","isonet","example","."]
code: def ortho(self, device):
      """regularizes the convolution kernel to be (near) orthogonal during training.
      This is called in Trainer.loss of the isonet example.
      """
      ortho_penalty = []
      cnt = 0
      for m in self.modules():
          if isinstance(m, nn.Conv2d):
              if m.kernel_size == (7, 7) or m.weight.shape[1] == 3:
                  continue
              o = self.ortho_conv(m, device)
              cnt += 1
              ortho_penalty.append(o)
      ortho_penalty = sum(ortho_penalty)
      return ortho_penalty
  
imports: import numpy
  import torch
  import torch.nn
  import torch.nn.functional
label_desc: Use image node_id 5 for calling the ISONet obj's underlying member method code with example usage: obj.ortho(device) and returns: ortho_penalty