class_docstr: A linear prior mean function and its first and second derivatives, i.e.:
  
  .. math::
  
      \mu(\mathbf x) &= \mathbf W \cdot \mathbf x + B \\
      \nabla \mu(\mathbf x) &= \mathbf W \\
      \nabla^2 \mu(\mathbf x) &= \mathbf 0 \\
  
  where :math:`\mathbf W` and :math:`B` are learned constants.
  
  :param input_size: dimension of input :math:`\mathbf x`.
  :type input_size: int
  :param batch_shape: The batch shape of the learned constant(s) (default: []).
  :type batch_shape: torch.Size, optional
  :param bias: True/False flag for whether the bias: :math:`B` should be used in the mean (default: True).
  :type bias: bool, optional
  
  :var torch.Tensor weights: :math:`\mathbf W` parameter
  :var torch.Tensor bias: :math:`B` parameter
class_docstr_tok: ["A","linear","prior","mean","function","and","its","first","and","second","derivatives",",","i.e",".",":","..","math",":",":","\\mu","(","\\mathbf","x",")","&","=","\\mathbf","W","\\cdot","\\mathbf","x","+","B","\\\\","\\nabla","\\mu","(","\\mathbf","x",")","&","=","\\mathbf","W","\\\\","\\nabla^2","\\mu","(","\\mathbf","x",")","&","=","\\mathbf","0","\\\\","where",":","math",":","`","\\mathbf","W","`","and",":","math",":","`","B","`","are","learned","constants",".",":","param","input_size",":","dimension","of","input",":","math",":","`","\\mathbf","x","`",".",":","type","input_size",":","int",":","param","batch_shape",":","The","batch","shape","of","the","learned","constant","(","s",")","(","default",":","[","]",")",".",":","type","batch_shape",":","torch.Size",",","optional",":","param","bias",":","True\/False","flag","for","whether","the","bias",":",":","math",":","`","B","`","should","be","used","in","the","mean","(","default",":","True",")",".",":","type","bias",":","bool",",","optional",":","var","torch.Tensor","weights",":",":","math",":","`","\\mathbf","W","`","parameter",":","var","torch.Tensor","bias",":",":","math",":","`","B","`","parameter"]
code: def forward(self, x):
      res = x.matmul(self.weights)
      if self.bias is not None:
          res = res + self.bias.unsqueeze(-1)
      dres = self.weights.expand(x.transpose(-1, -2).shape).transpose(
          -1, -2
      )
      ddres = torch.zeros_like(dres)
      return torch.cat((res, dres, ddres), -1)
  
imports: import torch
  from .mean import Mean
label_desc: Use image node_id 2 for calling the LinearMeanGradGrad obj's underlying member method code with example usage: obj.forward(x) and returns: torch