You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Tried to get a simple mnist example working from bolts and lightning, but ended up in this error. It seems like the data are downloaded correctly the first time but that the files are in wrong format or similar. All fixes Ive seen seem very complex for such a "simple" task to be running. (e.g. a separate script that prepares the data).
Replicated in google colab (see link below).
Code
`
!pip install pytorch-lightning pytorch-lightning-bolts -q
from pl_bolts.datamodules import BinaryMNISTDataModule
import torch
from torch.nn import functional as F
from torch import nn
from pytorch_lightning.core.lightning import LightningModule
from pytorch_lightning import Trainer, seed_everything
❓ Questions and Help
Before asking:
What is your question?
Tried to get a simple mnist example working from bolts and lightning, but ended up in this error. It seems like the data are downloaded correctly the first time but that the files are in wrong format or similar. All fixes Ive seen seem very complex for such a "simple" task to be running. (e.g. a separate script that prepares the data).
Replicated in google colab (see link below).
Code
`
!pip install pytorch-lightning pytorch-lightning-bolts -q
from pl_bolts.datamodules import BinaryMNISTDataModule
import torch
from torch.nn import functional as F
from torch import nn
from pytorch_lightning.core.lightning import LightningModule
from pytorch_lightning import Trainer, seed_everything
class LitMNIST(LightningModule):
def init(self):
super().init()
self.layer_1 = torch.nn.Linear(28 * 28, 128)
self.layer_2 = torch.nn.Linear(128, 256)
self.layer_3 = torch.nn.Linear(256, 10)
model = LitMNIST()
dm = BinaryMNISTDataModule('.')
Trainer().fit(model, dm)
`
What have you tried?
Have I misunderstood how to use bolts or is this a bit hard? The code should be pretty much copy paste from tutorials to get a fully working example as seen here:
https://pytorch-lightning-bolts.readthedocs.io/en/latest/api/pl_bolts.datamodules.html#pl_bolts.datamodules.BinaryMNISTDataModule
Relevant post: https://discuss.pytorch.org/t/cant-load-dataset-using-dataloader/34831/2
What's your environment?
https://colab.research.google.com/drive/1MovSwV87jxaLod3Hbs-rnmlNg0eyKBeS?usp=sharing
The text was updated successfully, but these errors were encountered: