老师,我已经按照您的建议进行了修改:
对以上两处进行了修改后报错:
对以上报错部分进行修改如下:
出现错误:
--- Logging error ---
Traceback (most recent call last):
File "/home/megstudio/.miniconda/envs/xuan/lib/python3.7/logging/__init__.py", line 1034, in emit
msg = self.format(record)
File "/home/megstudio/.miniconda/envs/xuan/lib/python3.7/logging/__init__.py", line 880, in format
return fmt.format(record)
File "/home/megstudio/.miniconda/envs/xuan/lib/python3.7/site-packages/megengine/logger.py", line 98, in format
formatted = super(MegEngineLogFormatter, self).format(record)
File "/home/megstudio/.miniconda/envs/xuan/lib/python3.7/logging/__init__.py", line 619, in format
record.message = record.getMessage()
File "/home/megstudio/.miniconda/envs/xuan/lib/python3.7/logging/__init__.py", line 380, in getMessage
msg = msg % self.args
File "train.py", line 599, in __str__
return fmtstr.format(**self.__dict__)
TypeError: unsupported format string passed to numpy.ndarray.__format__
Call stack:
File "train.py", line 603, in <module>
main()
File "train.py", line 368, in main
train_proc(world_size, args)
File "train.py", line 527, in worker
total_time,
Message: 'TRAIN e%d %06d %f %s %s %s %s'
Arguments: (0, 0, 0.0625, <__main__.AverageMeter object at 0x7f5a4cf21358>, <__main__.AverageMeter object at 0x7f5a4cf21390>, <__main__.AverageMeter object at 0x7f5a4cf213c8>, <__main__.AverageMeter object at 0x7f5a4cf21400>)
以上是出现的问题,老师您看看问题出现在那里了