| 827 | import torchvision as tv |
| 828 | |
| 829 | class 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 |
nothing calls this directly
no outgoing calls
no test coverage detected