CNN-Image-Classifier icon indicating copy to clipboard operation
CNN-Image-Classifier copied to clipboard

training error

Open RAMIREDDYDEVARAM opened this issue 6 years ago • 8 comments

RAMIREDDYDEVARAM avatar May 05 '18 15:05 RAMIREDDYDEVARAM

Epoch 1/20 31/31 [==============================] - 198s 6s/step - loss: 5.4380 - acc: 0.0806 - val_loss: 2.9033 - val_acc: 0.1187 Traceback (most recent call last): File "train1.py", line 125, in validation_steps=validation_steps) File "/home/ram/.local/lib/python3.5/site-packages/keras/legacy/interfaces.py", line 91, in wrapper return func(*args, **kwargs) File "/home/ram/.local/lib/python3.5/site-packages/keras/models.py", line 1276, in fit_generator initial_epoch=initial_epoch) File "/home/ram/.local/lib/python3.5/site-packages/keras/legacy/interfaces.py", line 91, in wrapper return func(*args, **kwargs) File "/home/ram/.local/lib/python3.5/site-packages/keras/engine/training.py", line 2262, in fit_generator callbacks.on_epoch_end(epoch, epoch_logs) File "/home/ram/.local/lib/python3.5/site-packages/keras/callbacks.py", line 77, in on_epoch_end callback.on_epoch_end(epoch, logs) File "/home/ram/.local/lib/python3.5/site-packages/keras/callbacks.py", line 820, in on_epoch_end raise ValueError('If printing histograms, validation_data must be ' ValueError: If printing histograms, validation_data must be provided, and cannot be a generator.

RAMIREDDYDEVARAM avatar May 05 '18 15:05 RAMIREDDYDEVARAM

I solved it. just replace Histogram_freq =0 instead Histogram_freq = 10 or 1

RAMIREDDYDEVARAM avatar May 07 '18 12:05 RAMIREDDYDEVARAM

If I see your code I can help you

RAMIREDDYDEVARAM avatar May 10 '18 08:05 RAMIREDDYDEVARAM

how can we understand without your code. we have to see your code. copy and past here your code then which error you got. than easy to find problem

RAMIREDDYDEVARAM avatar May 10 '18 14:05 RAMIREDDYDEVARAM

outputs are not showing correct.... sometimes only tp,TN shown and sometimes only fn,fp not altogether

On 10 May 2018 at 20:23, RAMIREDDYDEVARAM [email protected] wrote:

how can we understand without your code. we have to see your code. copy and past here your code then which error you got. than easy to find problem

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/tatsuyah/CNN-Image-Classifier/issues/3#issuecomment-388078067, or mute the thread https://github.com/notifications/unsubscribe-auth/AiYGvkLUpiqRyzTUTA7QmtpY2ZVZOtjnks5txFR0gaJpZM4Tzrna .

sunaina123 avatar May 10 '18 15:05 sunaina123

@RAMIREDDYDEVARAM I am able to run the test file but my predict file is not giving output True Positive AD: 0 True Negative AD: 0 False Positive Normal: 0 False Negative Normal: 0 Traceback (most recent call last): File "predict-binary.py", line 62, in precision = tp / (tp + fp) ZeroDivisionError: division by zero Infact I had trained my model and save it and it's giving accuracy around 97%

czainab avatar May 23 '18 16:05 czainab

same problem is mine.

On 23 May 2018 at 21:54, czainab [email protected] wrote:

@RAMIREDDYDEVARAM https://github.com/RAMIREDDYDEVARAM I am able to run the test file but my predict file is not giving output True Positive AD: 0 True Negative AD: 0 False Positive Normal: 0 False Negative Normal: 0 Traceback (most recent call last): File "predict-binary.py", line 62, in precision = tp / (tp + fp) ZeroDivisionError: division by zero Infact I had trained my model and save it and it's giving accuracy around 97%

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/tatsuyah/CNN-Image-Classifier/issues/3#issuecomment-391410372, or mute the thread https://github.com/notifications/unsubscribe-auth/AiYGvlTC9rG_xcZQnQfhnnDtlMo_w5LWks5t1Y0pgaJpZM4Tzrna .

sunaina123 avatar May 24 '18 04:05 sunaina123

Are you able to solve this problem?

Sent from Yahoo Mail on Android

On Thu, 24 May, 2018 at 9:00 AM, sunaina123[email protected] wrote: same problem is mine.

On 23 May 2018 at 21:54, czainab [email protected] wrote:

@RAMIREDDYDEVARAM https://github.com/RAMIREDDYDEVARAM I am able to run the test file but my predict file is not giving output True Positive AD: 0 True Negative AD: 0 False Positive Normal: 0 False Negative Normal: 0 Traceback (most recent call last): File "predict-binary.py", line 62, in precision = tp / (tp + fp) ZeroDivisionError: division by zero Infact I had trained my model and save it and it's giving accuracy around 97%

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/tatsuyah/CNN-Image-Classifier/issues/3#issuecomment-391410372, or mute the thread https://github.com/notifications/unsubscribe-auth/AiYGvlTC9rG_xcZQnQfhnnDtlMo_w5LWks5t1Y0pgaJpZM4Tzrna .

— You are receiving this because you commented. Reply to this email directly, view it on GitHub, or mute the thread.

czainab avatar May 24 '18 05:05 czainab