Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

AttributeError in Chapter_2.ipynb #5

Open
gustavovelascoh opened this issue Feb 19, 2021 · 1 comment
Open

AttributeError in Chapter_2.ipynb #5

gustavovelascoh opened this issue Feb 19, 2021 · 1 comment

Comments

@gustavovelascoh
Copy link

Hi,

when executing the 2nd cell:

import torch
import torch.nn as nn
import torch.nn.functional as F
from torch.utils.data import * 
from idlmam import *

I get this error:

---------------------------------------------------------------------------
AttributeError                            Traceback (most recent call last)
<ipython-input-2-376bfb908340> in <module>()
      2 import torch.nn as nn
      3 import torch.nn.functional as F
----> 4 from torch.utils.data import *
      5 from idlmam import *

AttributeError: module 'torch.utils.data' has no attribute 'BatchSamplerDistributedSamplerDataset'

it is solved by importing only the used modules

from torch.utils.data import Dataset, DataLoader, TensorDataset

I'm not sure if it has something to do with my setup at Collab, but based on this post, it is related to version 1.7.0 of PyTorch

Thanks

@EdwardRaff
Copy link
Owner

Gah, 1.7.0 goofed a number of things I wrote before it was released. I'll close this when I revise the master copy of Chapter 2 (following order with editor - not ignoring). Appreciate the catch!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants