Fix yaml.safe_load() ignore emoji errors (#5060)
This commit is contained in:
1 parent
5afc9c25ef
commit
070af88108
3 files changed
+5
-5
No files matched your search
+1
-1
@@ -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
|
||||
|
||||
Reference in new issue
Block a user