Skip to content

Commit

Permalink
Merge branch 'refactor' of github.com:BaguaSys/bagua into refactor
Browse files Browse the repository at this point in the history
  • Loading branch information
NOBLES5E committed Jul 1, 2021
2 parents 1628a88 + cde905f commit 1cfccfe
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion bagua/torch_api/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -119,7 +119,7 @@ def set_storage(param, weight_storage, grad_storage, storage_offset):
for params in params_list:
for p in params:
# copy data
flatten_weights_tensor[offset:offset + p.numel()] = p.data.reshape(-1)
flatten_weights_tensor[offset : offset + p.numel()] = p.data.reshape(-1)

if p.grad is not None:
flatten_grads_tensor[offset : offset + p.numel()] = p.grad.data.reshape(
Expand Down

0 comments on commit 1cfccfe

Please sign in to comment.