pytorch运行train.py时
if (
getattr(cls, '_is_protocol', False) and
not getattr(cls, '_is_runtime_protocol', False) and
not _allow_reckless_class_checks(depth=2)
):
raise TypeError("Instance and class checks can only be used with"
" @runtime_checkable protocols")
TypeError: Instance and class checks can only be used with @runtime_checkable protocols
将python版本回退至3.7就可以解决了,这是版本不兼容导致的。