-
Notifications
You must be signed in to change notification settings - Fork 38
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
problems if classes are more than six #4
Comments
Thanks for using my repository. I guess it is due to the fact that your batch size (steps = 8) is lower than 10. You should change steps=8 to 16 or 32 (maybe more). Also, can you give me more details on your class distribution, or could you provide countplot of your target for me? |
import glob
files = glob.glob ("/Users/johnrobertus/Desktop/100DAGM/class5_anomaly_100/*.png")
files = glob.glob ("/Users/johnrobertus/Desktop/100DAGM/class4_non_anomaly/*.png")
files = glob.glob ("/Users/johnrobertus/Desktop/100DAGM/class4_anomaly_100/*.png")
files = glob.glob ("/Users/johnrobertus/Desktop/100DAGM/class3_non_anomaly_100/*.png")
files = glob.glob ("/Users/johnrobertus/Desktop/100DAGM/class3_anomaly_100/*.png")
for myFile in files:
for myFile in files:
for myFile in files:
for myFile in files:
train = np.array(train,dtype='float32') #as mnist |
If your class distribution is balanced(which I understood), you don't have to use ROC for evaluation. Accuracy and LogLoss are fine. I just used it to use it. |
thank you that worked for me |
Great to hear it worked properly. Please like the repository if you like it. |
I have another unrelated question: I ran the same code on a dataset of 50k images per class with a total amount of six classes in a high configuration cluster. After a couple of minutes I received a memory error: Traceback (most recent call last): As a consequence I reduced the amount per class gradually and it only worked with an amount of under 500 images per class. I would've liked to run this code with more data. Is there something I have to change in the code for larger datasets? |
As I understood, you became out of memory, which means your RAM isn't enough to load. You can reduce your data or you may use |
please i wanna ask , i have image classification using cnn for 5 classes ( cloudy , snowy , foggy , sunny, rainy ) in each folder i have about 1300 images , what does it mean by image label ( is that mean : rainy1.jpg , rainy2.jpg ) the names of images or somthing else like ( the real category of image ( snowy ,foggy,rainy......... ) sorry i'm begginer |
i cant find the code to convert training and testing images ( you have provided the link of kaggle) into numpy array.please provide this code |
Hi, I hope the code below is what you need.
|
How to make test_data_mc.npy? |
Download data from kaggle. Put them in a directory. Use the function below to create test_data_mc.npy
|
I try to train with 42 classes so i change the step_size to 42, but i get an error "Tensorflow Serving | Input to reshape is a tensor with 10452 values, but the requested shape has 9216." What should i do? |
If your target has 42 classes, output_classes variable should be 42 . |
what can i do to increase the accuracy? because i train with 42 classes, my accuracy is very low |
You can augment your training data using ImageDataGenerator, which is under tensorflow.keras. You can use a pretrained neural network to initialize your training. |
I am using: Multiclass_classification.ipynb
I have seen there is a output_classes = 4 which means you have four classes.
Now i want to use this Code for 10 classes. So I changed output_classes = 10. And I got this error:
ValueError: Only one class present in y_true. ROC AUC score is not defined in that case.
However, I tried this code with six classes (output_classes = 6) and it works fine. What should I change for more than six classes?
The text was updated successfully, but these errors were encountered: