pythonlessons / mltu

Machine Learning Training Utilities (for TensorFlow and PyTorch)
MIT License
182 stars 108 forks source link

handwriting detection problem errors with Modelconfig #62

Open Arkyaisworking opened 3 weeks ago

Arkyaisworking commented 3 weeks ago

I am running the Handwriting detection problem block by block on jupyterlab, and have run into this error which is creating a lotta confusion and idk whether i am just not able to understand what is going on.

# Create a ModelConfigs object to store model configurations
configs = ModelConfigs()

# Save vocab and maximum text length to configs
configs.vocab = "".join(vocab)
configs.max_text_length = max_len
configs.save()

error given: NameError: name 'ModelConfigs' is not defined

i have created a ModelConfigs object on my own but it seems like its supposed to be an object which is already defined in a seperate library as i keep having to manually add variables for every new line of code. can anyone guide me as to where this particular object is supposed to originate from? Or is this an Object which i must manually create?

gwachatkozah commented 2 weeks ago

From the error it says it isn't defined meaning and you said you already defined it. My assumption is that the class was defined after the cell you were trying to. Since you're running your codes via JupyterLab, the ModelConfigs class definition should come at the top of the notebook right after import statements before loading your data. I think that should resolve your issue.