Skip to content

Commit

Permalink
Update network.py -- move hyperparameter to cpu -- li
Browse files Browse the repository at this point in the history
  • Loading branch information
memoryunreal authored Jun 5, 2023
1 parent bf91284 commit e6e1592
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion tracker/model/network.py
Original file line number Diff line number Diff line change
Expand Up @@ -142,7 +142,7 @@ def init_hyperparameters(self, config, model_path=None, map_location=None):
if model_path is not None:
# load the model and key/value/hidden dimensions with some hacks
# config is updated with the loaded parameters
model_weights = torch.load(model_path, map_location=map_location)
model_weights = torch.load(model_path, map_location="cpu")
self.key_dim = model_weights['key_proj.key_proj.weight'].shape[0]
self.value_dim = model_weights['value_encoder.fuser.block2.conv2.weight'].shape[0]
self.disable_hidden = 'decoder.hidden_update.transform.weight' not in model_weights
Expand Down

0 comments on commit e6e1592

Please sign in to comment.