Skip to content

Commit

Permalink
Update README.md
Browse files Browse the repository at this point in the history
  • Loading branch information
YeonwooSung committed Apr 24, 2021
1 parent fc9e560 commit b7f8c39
Showing 1 changed file with 2 additions and 10 deletions.
12 changes: 2 additions & 10 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -134,17 +134,9 @@ glom = LightningGLOM(
img_channels=1
)

checkpoint_callback = ModelCheckpoint(
monitor='val_loss',
dirpath='.',
filename='mnist-{epoch:02d}-{val_loss:.2f}',
save_top_k=3,
mode='min',
)

gpus = torch.cuda.device_count()
trainer = pl.Trainer(callbacks=[checkpoint_callback], gpus=gpus)
trainer.fit(glom, DataLoader(train, batch_size=8, num_workers=2), DataLoader(val, batch_size=32, num_workers=2))
trainer = pl.Trainer(gpus=gpus, max_epochs=5)
trainer.fit(glom, DataLoader(train, batch_size=8, num_workers=2), DataLoader(val, batch_size=8, num_workers=2))
```

## 3. ToDo
Expand Down

0 comments on commit b7f8c39

Please sign in to comment.