torchfix lint

pull/380/head
evelynmitchell 1 year ago
parent fd28876f6d
commit 97f1a52f31

@ -38,13 +38,14 @@ def load_model_torch(
try: try:
if model is None: if model is None:
model = torch.load( model = torch.load(
model_path, map_location=map_location, *args, **kwargs model_path, map_location=map_location, weights_only=True, *args, **kwargs
) )
else: else:
model.load_state_dict( model.load_state_dict(
torch.load( torch.load(
model_path, model_path,
map_location=map_location, map_location=map_location,
weights_only=True,
*args, *args,
**kwargs, **kwargs,
), ),

Loading…
Cancel
Save