class_docstr: A (non-zero) constant prior mean function, i.e.:
  
  .. math::
      \mu(\mathbf x) = C
  
  where :math:`C` is a learned constant.
  
  :param constant_prior: Prior for constant parameter :math:`C`.
  :type constant_prior: ~gpytorch.priors.Prior, optional
  :param constant_constraint: Constraint for constant parameter :math:`C`.
  :type constant_constraint: ~gpytorch.priors.Interval, optional
  :param batch_shape: The batch shape of the learned constant(s) (default: []).
  :type batch_shape: torch.Size, optional
  
  :var torch.Tensor constant: :math:`C` parameter
class_docstr_tok: ["A","(","non-zero",")","constant","prior","mean","function",",","i.e",".",":","..","math",":",":","\\mu","(","\\mathbf","x",")","=","C","where",":","math",":","`","C","`","is","a","learned","constant",".",":","param","constant_prior",":","Prior","for","constant","parameter",":","math",":","`","C","`",".",":","type","constant_prior",":","~gpytorch.priors.Prior",",","optional",":","param","constant_constraint",":","Constraint","for","constant","parameter",":","math",":","`","C","`",".",":","type","constant_constraint",":","~gpytorch.priors.Interval",",","optional",":","param","batch_shape",":","The","batch","shape","of","the","learned","constant","(","s",")","(","default",":","[","]",")",".",":","type","batch_shape",":","torch.Size",",","optional",":","var","torch.Tensor","constant",":",":","math",":","`","C","`","parameter"]
code: def forward(self, input):
      constant = self.constant.unsqueeze(-1)  # *batch_shape x 1
      return constant.expand(
          torch.broadcast_shapes(constant.shape, input.shape[:-1])
      )
  
file_path: gpytorch/gpytorch/means/constant_mean.py
imports: import warnings
  from typing import Any, Optional
  import torch
  from ..constraints import Interval
  from ..priors import Prior
  from ..utils.warnings import OldVersionWarning
  from .mean import Mean
label_desc: Use image node_id 6 for calling the ConstantMean obj's underlying member method code with example usage: obj.forward(input) and returns: constant