class_docstr: Encode class prediction labels for SigmoidCrossEntropy Loss.
class_docstr_tok: ["Encode","class","prediction","labels","for","SigmoidCrossEntropy","Loss","."]
docstr: Encode class prediction labels for SigmoidCrossEntropy Loss.
  
  Parameters
  ----------
  samples : np.array
      Sampling results with shape (B, N), 1:pos, 0:ignore, -1:negative
  
  Returns
  -------
  (mxnet.nd.NDArray, mxnet.nd.NDArray)
      (target, mask)
      target is the output label with shape (B, N), 1: pos, 0: negative, -1: ignore
      mask is the mask for label, -1(ignore) labels have mask 0, otherwise mask is 1.
docstr_tok: ["Encode","class","prediction","labels","for","SigmoidCrossEntropy","Loss",".","Parameters","--","--","--","--","--","samples",":","np.array","Sampling","results","with","shape","(","B",",","N",")",",","1",":","pos",",","0",":","ignore",",","-1",":","negative","Returns","--","--","--","-","(","mxnet.nd.NDArray",",","mxnet.nd.NDArray",")","(","target",",","mask",")","target","is","the","output","label","with","shape","(","B",",","N",")",",","1",":","pos",",","0",":","negative",",","-1",":","ignore","mask","is","the","mask","for","label",",","-1","(","ignore",")","labels","have","mask","0",",","otherwise","mask","is","1","."]
code: def __call__(self, samples):
      """Encode class prediction labels for SigmoidCrossEntropy Loss.
  
      Parameters
      ----------
      samples : np.array
          Sampling results with shape (B, N), 1:pos, 0:ignore, -1:negative
  
      Returns
      -------
      (mxnet.nd.NDArray, mxnet.nd.NDArray)
          (target, mask)
          target is the output label with shape (B, N), 1: pos, 0: negative, -1: ignore
          mask is the mask for label, -1(ignore) labels have mask 0, otherwise mask is 1.
  
      """
      # notation from samples, 1:pos, 0:ignore, -1:negative
      target = (samples + 1) / 2.0
      target = np.where(np.abs(samples) < 1e-5, -1, target)
      # output: 1: pos, 0: negative, -1: ignore
      mask = np.where(np.abs(samples) > 1e-5, 1.0, 0.0)
      return target, mask
  
imports: from __future__ import absolute_import
  import numpy
  from mxnet import gluon
  from mxnet import nd
  from .bbox import BBoxCornerToCenter, NumPyBBoxCornerToCenter
label_desc: Use image node_id 2 for calling the SigmoidClassEncoder obj's underlying member method code with example usage: obj.__call__(samples) and returns: target,  mask