akshaybahadur21/QuickDraw

Error Input Model

Closed this issue · 2 comments

Hi,

Your work is impressive, really good! But I have checked the code and I think there is an error in the input of the model, here:
model = Sequential() model.add(Conv2D(32, (5, 5), input_shape=(image_x,image_y), activation='relu'))

I think you have to define the input like:

input_shape=(image_x, image_y, 1)

Because you have only 1 channel in your images, right? Can you confirm if this is ok?

Thanks! I will try to improve it with new features, but your work is impressive, congratulations! We can keep in touch.

Hi,

@akshaybahadur21 amazing work, I already have many ideas to contribute and develop on!

@alejandrods I also faced a similar issue while running the QD_trainer.py in the line you mentioned, after applying your edits I am facing the following error after the code has printed the training summary, ie, getting the problem while fitting the model:

Traceback (most recent call last): File "QD_trainer.py", line 71, in <module> main() File "QD_trainer.py", line 67, in main model.fit(train_x, train_y, validation_data=(test_x, test_y, 1), epochs=3, batch_size=64, callbacks=[TensorBoard(log_dir="QuickDraw")]) File "C:\Users\Lycurgus Orion\AppData\Local\Programs\Python\Python36\lib\site-packages\keras\engine\training.py", line 952, in fit batch_size=batch_size) File "C:\Users\Lycurgus Orion\AppData\Local\Programs\Python\Python36\lib\site-packages\keras\engine\training.py", line 789, in _standardize_user_data exception_prefix='target') File "C:\Users\Lycurgus Orion\AppData\Local\Programs\Python\Python36\lib\site-packages\keras\engine\training_utils.py", line 138, in standardize_input_data str(data_shape)) ValueError: Error when checking target: expected dense_3 to have shape (15,) but got array with shape (4,)

Is it working for you? I am clueless about this error. I am trying to develop it further to integrate with IoT devices, any help would be much appreciated!

@alejandrods - thanks for pointing that out.
Corrected the code.
@LycurgusOrion - You can try now.