Skip to content

Commit

Permalink
Move dataclass import to code block
Browse files Browse the repository at this point in the history
Signed-off-by: Thomas J. Fan <[email protected]>
  • Loading branch information
thomasjpfan committed Oct 31, 2023
1 parent 645e0e7 commit 2fa4db3
Showing 1 changed file with 2 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,6 @@ def pytorch_native_wf():
# %% [markdown]
# Passing around tensors and modules is no more a hassle!

from dataclasses import dataclass

# %% [markdown]
# ## Checkpoint
Expand All @@ -85,6 +84,8 @@ def pytorch_native_wf():
# As per PyTorch [docs](https://pytorch.org/tutorials/beginner/saving_loading_models.html#save-load-entire-model), it is recommended to
# store the module's `state_dict` rather than the module itself. However, the serialization should work either way.
# %%
from dataclasses import dataclass

import torch.nn as nn
import torch.nn.functional as F
import torch.optim as optim
Expand Down

0 comments on commit 2fa4db3

Please sign in to comment.