mirror of
https://github.com/mrdbourke/pytorch-deep-learning.git
synced 2026-11-27 06:07:09 +00:00
make sure model on target device
This commit is contained in:
1 parent
6237b93e01
commit
defa4faa23
1 file changed
+3
@@ -160,6 +160,9 @@ def train(model: torch.nn.Module,
|
||||
"test_loss": [],
|
||||
"test_acc": []
|
||||
}
|
||||
|
||||
# Make sure model on target device
|
||||
model.to(device)
|
||||
|
||||
# Loop through training and testing steps for a number of epochs
|
||||
for epoch in tqdm(range(epochs)):
|
||||
|
||||
Reference in new issue
Block a user