Fix yaml.safe_load() ignore emoji errors (#5060)

This commit is contained in:
Glenn Jocher authored and GitHub committed 2021-10-05 13:41:52 -07:00
1 parent 5afc9c25ef
commit 070af88108
3 files changed
+5 -5

No files matched your search

+1 -1
View File
@@ -87,7 +87,7 @@ class Model(nn.Module):
else: # is *.yaml
import yaml # for torch hub
self.yaml_file = Path(cfg).name
with open(cfg) as f:
with open(cfg, errors='ignore') as f:
self.yaml = yaml.safe_load(f) # model dict
# Define model