class_docstr: One shot hardware-aware estimator.
  
  Use model directly to get estimations with some hardware-aware metrics.
  
  Parameters
  ----------
  loss_f : str
      The name of loss funciton in PyTorch
  evaluation : list of Evaluation
      The evaluation metrics in module/train/evaluation
  hardware_evaluation : str or runable
      The hardware-aware metrics. Can be 'parameter' or 'latency'. Or you can define a special metric by a runable function
  hardware_metric_weight : float
      The weight of hardware-aware metric, which will be a bias added to metrics
class_docstr_tok: ["One","shot","hardware-aware","estimator",".","Use","model","directly","to","get","estimations","with","some","hardware-aware","metrics",".","Parameters","--","--","--","--","--","loss_f",":","str","The","name","of","loss","funciton","in","PyTorch","evaluation",":","list","of","Evaluation","The","evaluation","metrics","in","module\/train\/evaluation","hardware_evaluation",":","str","or","runable","The","hardware-aware","metrics",".","Can","be","'parameter","'","or","'latency","'",".","Or","you","can","define","a","special","metric","by","a","runable","function","hardware_metric_weight",":","float","The","weight","of","hardware-aware","metric",",","which","will","be","a","bias","added","to","metrics"]
code: def __init__(
      self,
      loss_f="nll_loss",
      evaluation=[Acc()],
      hardware_evaluation="parameter",
      hardware_metric_weight=0,
  ):
      super().__init__(loss_f, evaluation)
      self.hardware_evaluation = hardware_evaluation
      self.hardware_metric_weight = hardware_metric_weight
  
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 1 to create a new OneShotEstimator_HardwareAware object from inherited base classes: OneShotEstimator with example: obj = OneShotEstimator_HardwareAware(loss_f, evaluation, hardware_evaluation, hardware_metric_weight)