class_docstr: One shot estimator.
  
  Use model directly to get estimations.
  
  Parameters
  ----------
  loss_f : str
      The name of loss funciton in PyTorch
  evaluation : list of Evaluation
      The evaluation metrics in module/train/evaluation
class_docstr_tok: ["One","shot","estimator",".","Use","model","directly","to","get","estimations",".","Parameters","--","--","--","--","--","loss_f",":","str","The","name","of","loss","funciton","in","PyTorch","evaluation",":","list","of","Evaluation","The","evaluation","metrics","in","module\/train\/evaluation"]
code: def infer(self, model: BaseSpace, dataset, mask="train"):
      device = next(model.parameters()).device
      dset = dataset[0].to(device)
      mask = bk_mask(dset, mask)
  
      pred = model(dset)[mask]
      label = bk_label(dset)
      y = label[mask]
  
      loss = getattr(F, self.loss_f)(pred, y)
      probs = F.softmax(pred, dim=1).detach().cpu().numpy()
  
      y = y.cpu()
      metrics = [eva.evaluate(probs, y) for eva in self.evaluation]
      return metrics, loss
  
imports: import torch
  from deeprobust.graph.global_attack import Random, DICE
  import numpy
  import scipy.sparse
  from tqdm import tqdm
  import time
  import torch.nn.functional
  from .None import register_nas_estimator
  from ..space import BaseSpace
  from .base import BaseEstimator
  from ..backend import *
  from ...train.evaluation import Acc
  from ..utils import get_hardware_aware_metric
label_desc: Use image node_id 2 for calling the OneShotEstimator obj's underlying member method code with example usage: obj.infer(model, dataset, mask) and returns: metrics,  loss