mirror of
https://github.com/yunjey/pytorch-tutorial.git
synced 2026-03-13 09:11:37 +08:00
Update main.py
Fixed typos.
This commit is contained in:
@@ -98,7 +98,7 @@ z = y.numpy()
|
||||
|
||||
|
||||
# ================================================================== #
|
||||
# 4. Input pipline #
|
||||
# 4. Input pipeline #
|
||||
# ================================================================== #
|
||||
|
||||
# Download and construct CIFAR-10 dataset.
|
||||
@@ -130,7 +130,7 @@ for images, labels in train_loader:
|
||||
|
||||
|
||||
# ================================================================== #
|
||||
# 5. Input pipline for custom dataset #
|
||||
# 5. Input pipeline for custom dataset #
|
||||
# ================================================================== #
|
||||
|
||||
# You should your build your custom dataset as below.
|
||||
@@ -186,4 +186,4 @@ model = torch.load('model.ckpt')
|
||||
|
||||
# Save and load only the model parameters (recommended).
|
||||
torch.save(resnet.state_dict(), 'params.ckpt')
|
||||
resnet.load_state_dict(torch.load('params.ckpt'))
|
||||
resnet.load_state_dict(torch.load('params.ckpt'))
|
||||
|
||||
Reference in New Issue
Block a user