Skip to content

Commit

Permalink
remove gradient clipping i dont think its needed at this small scale
Browse files Browse the repository at this point in the history
  • Loading branch information
karpathy committed Aug 20, 2022
1 parent 35435ec commit 4e0137d
Showing 1 changed file with 0 additions and 1 deletion.
1 change: 0 additions & 1 deletion makemore.py
Original file line number Diff line number Diff line change
Expand Up @@ -382,7 +382,6 @@ def create_datasets(input_file):
# calculate the gradient, clip it, update the weights
model.zero_grad(set_to_none=True)
loss.backward()
torch.nn.utils.clip_grad_norm_(model.parameters(), 1.0)
optimizer.step()
if args.device.startswith('cuda'):
torch.cuda.synchronize()
Expand Down

0 comments on commit 4e0137d

Please sign in to comment.