Skip to content

Commit 0d4ed2a

Browse files
committed
Fix usage example
1 parent 832b242 commit 0d4ed2a

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -137,7 +137,7 @@ Jacobian descent using [UPGrad](https://torchjd.org/stable/docs/aggregation/upgr
137137
optimizer = SGD(model.parameters(), lr=0.1)
138138

139139
+ weighting = UPGradWeighting()
140-
+ engine = Engine(model.modules())
140+
+ engine = Engine(model, batch_dim=0)
141141

142142
inputs = torch.randn(8, 16, 10) # 8 batches of 16 random input vectors of length 10
143143
targets = torch.randn(8, 16) # 8 batches of 16 targets for the first task

0 commit comments

Comments
 (0)