#๐ Attribute error
66 messages ยท Page 1 of 1 (latest)
@keen marten
Remember to:
- Ask your Python question, not if you can ask or if there's an expert who can help.
- Show a code sample as text (rather than a screenshot) and the error message, if you've got one.
- Explain what you expect to happen and what actually happens.
:warning: Do not pip install anything that isn't related to your question, especially if asked to over DMs.
You don't have enough underscores in your constructor
You wrote __init_ you want __init__
Does the Data_dir have to be inside the class?
You didn't pass enough args to the __init__ method
This is what I'm following.
Does the example say what to call PlayingCardDataset with?
?
Here's the tutorial
So you see how your code is different for this bit https://www.kaggle.com/code/robikscube/train-your-first-pytorch-model-card-classifier/notebook#Create-Test-Dataset
Yeah cause I was trying to make so that I could just call Data_dir instead of Data_dir+ the file location.
to save time.
or is that not possible here?
I'm not understanding what you're trying to say
You can't call Data_dir()
I thought that was a data type.
??
It's probably best you follow the tutorial closely and get it working, then make changes to it afterwards
It's saying a folder doesn't exist when it does, may be spelling but I don't think so.
You have the typo with __init_ back
That one character every damn time lol
Show your new code?
Use paste not a screenshot
Also @property doesn't work on __init__
I'm running it in Virtual Machine.
Bidirectional copy paste doesn't work.
@property def classes(self): return self.data.classes
That's what the tutorial's calls for
You put it on __init_ which doesn't make sense
I fixxed that
it's now __init__
@property doesn't work on __init__
Wait... Explain why that won't work with __init__? I'm still learning here.
And I'd like to know why
I feel like this one has to do with the file format.
I got the images as png
I'm gonna take a break for a bit
It's a bit complicated but __init__ is looked up like type(self).__init__(self, ...)
And that bypasses the descriptor mechanism
What about this issue?
Yeah I don't know what a class folder is
did you mean !close?
!close
This help channel has been closed and it's no longer possible to send messages here. If your question wasn't answered, feel free to create a new post in #1035199133436354600. To maximize your chances of getting a response, check out this guide on asking good questions.