class_docstr: Detects the first NaN or Inf in forward and/or backward pass and logs, together with the module name
class_docstr_tok: ["Detects","the","first","NaN","or","Inf","in","forward","and\/or","backward","pass","and","logs",",","together","with","the","module","name"]
code: def reset(self):
      self.has_printed_f = False
      self.has_printed_b = False
  
file_path: fairseq/fairseq/nan_detector.py
imports: import logging
  import torch
label_desc: Use image node_id 5 for calling the NanDetector obj's underlying member method code with example usage: obj.reset() without return types