gcamfer / gym-classification

Open AI gym environment for classification task
5 stars 1 forks source link

example MNIST does not work #2

Open LeoFanCE opened 2 years ago

LeoFanCE commented 2 years ago

Hello, Thank you for your code. While I was running your MNIST example an error appeared. error

I added statements in your code to prevent the error since the truth value of an array with more than one element is ambiguous. add

But as a result, the model could not converge like that you showed in your github page. result1

I wonder if you had the same problem or is there something that I've missed.

gcamfer commented 2 years ago

Hi, thank you very much for trying it and finding issues. I don't really know why I returned a list of booleans, I guess my head was thinking about other stuff.
I have fixed that problem.

Regarding the convergence, it seems to be a hyperparameter problem. Try reducing the exploration or reducing the learning rate. You can even rerun as random initialisation will get you to another point, but it's not very stable.

You can try the branch in this Colab and next I'll merge with master.

Greetings

JuiMahind commented 2 years ago

Hello, After execution of the code I am getting this error

UndefinedMetricWarning: Precision and F-score are ill-defined and being set to 0.0 in labels with no predicted samples. Use the zero_division parameter to control this behaviour.

this error is resulting in no f1 score for some labels. can you give me any solution for this error