class_docstr: Module, which computes HyNet descriptors of given grayscale patches of 32x32.
  
  This is based on the original code from paper
  "HyNet: Learning Local Descriptor with Hybrid Similarity Measure and Triplet Loss".
  See :cite:`hynet2020` for more details.
  
  Args:
      pretrained: Download and set pretrained weights to the model.
      is_bias: use bias in TLU layers
      is_bias_FRN:  use bias in FRN layers
      dim_desc: descriptor dimensionality,
      drop_rate: dropout rate,
      eps_l2_norm: to avoid div by zero
  
  Returns:
      HyNet descriptor of the patches.
  
  Shape:
      - Input: :math:`(B, 1, 32, 32)`
      - Output: :math:`(B, 128)`
  
  Examples:
      >>> input = torch.rand(16, 1, 32, 32)
      >>> hynet = HyNet()
      >>> descs = hynet(input) # 16x128
class_docstr_tok: ["Module",",","which","computes","HyNet","descriptors","of","given","grayscale","patches","of","32x32",".","This","is","based","on","the","original","code","from","paper","''","HyNet",":","Learning","Local","Descriptor","with","Hybrid","Similarity","Measure","and","Triplet","Loss","''",".","See",":","cite",":","`","hynet2020","`","for","more","details",".","Args",":","pretrained",":","Download","and","set","pretrained","weights","to","the","model",".","is_bias",":","use","bias","in","TLU","layers","is_bias_FRN",":","use","bias","in","FRN","layers","dim_desc",":","descriptor","dimensionality",",","drop_rate",":","dropout","rate",",","eps_l2_norm",":","to","avoid","div","by","zero","Returns",":","HyNet","descriptor","of","the","patches",".","Shape",":","-","Input",":",":","math",":","`","(","B",",","1",",","32",",","32",")","`","-","Output",":",":","math",":","`","(","B",",","128",")","`","Examples",":",">",">",">","input","=","torch.rand","(","16",",","1",",","32",",","32",")",">",">",">","hynet","=","HyNet","(",")",">",">",">","descs","=","hynet","(","input",")","#","16x128"]
code: def forward(self, x: Tensor) -> Tensor:
      x = self.layer1(x)
      x = self.layer2(x)
      x = self.layer3(x)
      x = self.layer4(x)
      x = self.layer5(x)
      x = self.layer6(x)
      x = self.layer7(x)
      x = self.desc_norm(x + self.eps_l2_norm)
      x = x.view(x.size(0), -1)
      return x
  
imports: from typing import Dict
  import torch
  from torch import nn
  from kornia.core import Module, Parameter, Tensor, tensor, zeros
  from kornia.utils.helpers import map_location_to_cpu
label_desc: Use image node_id 2 for calling the HyNet obj's underlying member method code with example usage: obj.forward(x) and returns: x