class_docstr: Implements a multi-sampling semiring (logsumexp, +, -inf, 0).
  
  "Gradients" give up to 16 samples with replacement.
class_docstr_tok: ["Implements","a","multi-sampling","semiring","(","logsumexp",",","+",",","-inf",",","0",")",".","``","Gradients","''","give","up","to","16","samples","with","replacement","."]
code: def to_discrete(xs, j):
      i = j
      final = xs % 2
      mbits = bits.type_as(xs)
      return (
          ((xs % mbits[i + 1]) - (xs % mbits[i]) + final) != 0
      ).type_as(xs)
  
file_path: pytorch-struct/torch_struct/semirings/sample.py
imports: import torch
  import torch.distributions
  from .semirings import _BaseLog
label_desc: Use image node_id 2 for calling the MultiSampledSemiring obj's underlying member method code with example usage: obj.to_discrete(xs, j) and returns: unknown