#๐Ÿ”’ Attribute error

66 messages ยท Page 1 of 1 (latest)

keen marten
#

I'm trying to make a simple learning algo with 5 diamonds cards with py torch. I'm also geting a feeling that I can use Data_dir=~ somewhere to make it a global code but not sure where.

median swiftBOT
#

@keen marten

Python help channel opened

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.

robust mortar
#

You don't have enough underscores in your constructor

robust mortar
keen marten
#

Does the Data_dir have to be inside the class?

robust mortar
#

You didn't pass enough args to the __init__ method

keen marten
#

Where should I fix it?

#

Rather, what args do I need.

keen marten
robust mortar
#

Does the example say what to call PlayingCardDataset with?

keen marten
#

Not really, except to redefine it outside of the class.

robust mortar
#

?

keen marten
#

Here's the tutorial

robust mortar
keen marten
#

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.

robust mortar
#

You can't call Data_dir()

keen marten
#

I thought that was a data type.

robust mortar
#

??

#

It's probably best you follow the tutorial closely and get it working, then make changes to it afterwards

keen marten
#

Right..

#

I have an odd issue now

keen marten
robust mortar
keen marten
#

That one character every damn time lol

keen marten
#

hold on

robust mortar
#

Show your new code?

#

Use paste not a screenshot

#

Also @property doesn't work on __init__

keen marten
#

Bidirectional copy paste doesn't work.

keen marten
#

That's what the tutorial's calls for

robust mortar
#

You put it on __init_ which doesn't make sense

keen marten
#

it's now __init__

robust mortar
#

@property doesn't work on __init__

keen marten
#

Oh

#

no I see

#

I'm dumb

keen marten
#

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

robust mortar
#

And that bypasses the descriptor mechanism

keen marten
#

Huh...

#

Alright

keen marten
robust mortar
#

Yeah I don't know what a class folder is

keen marten
#

Alright, thanks for the help

#

!quite

#

!Quite

mild flame
#

did you mean !close?

keen marten
#

!close

median swiftBOT
#
Python help channel closed

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.