Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion docs/source/examples/monitoring.rst
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ they have a negative inner product).
optimizer = SGD(params, lr=0.1)
aggregator = UPGrad()

aggregator.weighting.register_forward_hook(print_weights)
aggregator.weighting.weighting.register_forward_hook(print_weights)
aggregator.register_forward_hook(print_gd_similarity)

inputs = torch.randn(8, 16, 10) # 8 batches of 16 random input vectors of length 10
Expand Down
2 changes: 1 addition & 1 deletion tests/doc/test_rst.py
Original file line number Diff line number Diff line change
Expand Up @@ -300,7 +300,7 @@ def print_gd_similarity(_, inputs: tuple[torch.Tensor, ...], aggregation: torch.
optimizer = SGD(params, lr=0.1)
aggregator = UPGrad()

aggregator.weighting.register_forward_hook(print_weights)
aggregator.weighting.weighting.register_forward_hook(print_weights)
aggregator.register_forward_hook(print_gd_similarity)

inputs = torch.randn(8, 16, 10) # 8 batches of 16 random input vectors of length 10
Expand Down
Loading