MCPcopy Create free account
hub / github.com/TPCD/DCCL / Logger

Class Logger

project_utils/visualization_utils.py:829–839  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

827import torchvision as tv
828
829class Logger:
830
831 def __init__(self, log_file):
832 '''/path/to/log_file.txt'''
833 self.log_file = log_file
834
835 def __call__(self, input):
836 input = str(input)
837 with open(self.log_file, 'a') as f:
838 f.writelines(input+'\n')
839 print(input)
840
841
842

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected