We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 9aca1fa commit 160421aCopy full SHA for 160421a
examples/models/checkpoint.py
@@ -64,7 +64,7 @@ def get_checkpoint_dtype(checkpoint: Dict[str, Any]) -> Optional[str]:
64
mismatched_dtypes = [
65
(key, value.dtype)
66
for key, value in checkpoint.items()
67
- if value.dtype != dtype
+ if hasattr(value, "dtype") and value.dtype != dtype
68
]
69
if len(mismatched_dtypes) > 0:
70
print(
0 commit comments