class_docstr: Binary accuracy metric. Uses torch.eq to compare predictions to targets. Decorated with a mean and running_mean.
  Default for key: 'binary_acc'.
  
  Args:
      pred_key (StateKey): The key in state which holds the predicted values
      target_key (StateKey): The key in state which holds the target values
      threshold (float): value between 0 and 1 to use as a threshold when binarizing predictions and targets
class_docstr_tok: ["Binary","accuracy","metric",".","Uses","torch.eq","to","compare","predictions","to","targets",".","Decorated","with","a","mean","and","running_mean",".","Default","for","key",":","'binary_acc","'",".","Args",":","pred_key","(","StateKey",")",":","The","key","in","state","which","holds","the","predicted","values","target_key","(","StateKey",")",":","The","key","in","state","which","holds","the","target","values","threshold","(","float",")",":","value","between","0","and","1","to","use","as","a","threshold","when","binarizing","predictions","and","targets"]
code: def process(self, *args):
      state = args[0]
      y_pred = (state[self.pred_key].float() > self.threshold).long()
      y_true = (state[self.target_key].float() > self.threshold).long()
  
      return torch.eq(y_pred, y_true).view(-1).float()
  
imports: import torchbearer
  from torchbearer import Metric
  from .decorators import default_for_key, running_mean, mean, std, to_dict
  import torch
label_desc: Use image node_id 2 for calling the BinaryAccuracy obj's underlying member method code with example usage: obj.process() and returns: torch