class_docstr: Round the input tensor and use a straight-through gradient estimator.
  
  [Daulton2022bopr]_ proposes using this in acquisition optimization.
class_docstr_tok: ["Round","the","input","tensor","and","use","a","straight-through","gradient","estimator",".","[","Daulton2022bopr","]","_","proposes","using","this","in","acquisition","optimization","."]
docstr: Round the input tensor element-wise.
  
  Args:
      X: The tensor to be rounded.
  
  Returns:
      A tensor where each element is rounded to the nearest integer.
docstr_tok: ["Round","the","input","tensor","element-wise",".","Args",":","X",":","The","tensor","to","be","rounded",".","Returns",":","A","tensor","where","each","element","is","rounded","to","the","nearest","integer","."]
code: def forward(ctx, X: Tensor) -> Tensor:
      r"""Round the input tensor element-wise.
  
      Args:
          X: The tensor to be rounded.
  
      Returns:
          A tensor where each element is rounded to the nearest integer.
      """
      return X.round()
  
file_path: botorch/botorch/utils/rounding.py
imports: from __future__ import annotations
  import torch
  from torch import Tensor
  from torch.autograd import Function
  from torch.nn.functional import one_hot
label_desc: Use image node_id 1 for calling the RoundSTE obj's underlying member method code with example usage: obj.forward(ctx, X) and returns: X