class_docstr: Class implementing a dense layer for the interval (box) domain.
class_docstr_tok: ["Class","implementing","a","dense","layer","for","the","interval","(","box",")","domain","."]
docstr: Performs the forward pass of the dense layer in the interval (box) domain.
  
  :param x: interval representation of the datapoint.
  :return: output of the convolutional layer on x
docstr_tok: ["Performs","the","forward","pass","of","the","dense","layer","in","the","interval","(","box",")","domain",".",":","param","x",":","interval","representation","of","the","datapoint",".",":","return",":","output","of","the","convolutional","layer","on","x"]
code: def forward(self, x: "torch.Tensor") -> "torch.Tensor":
      """
      Performs the forward pass of the dense layer in the interval (box) domain.
  
      :param x: interval representation of the datapoint.
      :return: output of the convolutional layer on x
      """
      center = (x[:, 1] + x[:, 0]) / 2
      radius = (x[:, 1] - x[:, 0]) / 2
  
      center = (
          torch.matmul(center, torch.transpose(self.weight, 0, 1))
          + self.bias
      )
      radius = torch.matmul(
          radius, torch.abs(torch.transpose(self.weight, 0, 1))
      )
  
      center = torch.unsqueeze(center, dim=1)
      radius = torch.unsqueeze(radius, dim=1)
  
      return torch.cat([center - radius, center + radius], dim=1)
  
imports: from typing import List, Union, Tuple, Optional
  import torch
  import numpy
label_desc: Use image node_id 3 for calling the PyTorchIntervalDense obj's underlying member method code with example usage: obj.forward(x) and returns: torch