mirror of
https://github.com/yunjey/pytorch-tutorial.git
synced 2025-07-04 16:12:12 +08:00
@ -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 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