Closed Cerebrock closed 6 years ago
It might have to do with the image_data_format, see https://github.com/vlawhern/arl-eegmodels/blob/4558da71f87ac14299ea131c230f950de38de5d9/EEGModels.py#L7 If you try changing it, does it help?
I tried both reshaping the input and changing the order of the parameters in the conv layers. With the modification of the json file I get a new error.
ValueError: Error when checking target: expected softmax to have shape (11,) but got array with shape (1,)
You need to do the one-hot encoding of the class labels for multi-class classification; i.e.: an 11-column matrix of 0's and 1's indicating the class membership. To do this easily you can use a function found inside of keras:
tf.keras.utils.to_categorical
I was skipping the cell with the one-hot, its running now!!! :D. The issue at first was the change in the .json file, why not use TF default ordering? Thank you guys!
It was a habit back when I was using Keras with Theano, as Theano used NCHW (samples, channels, height, width) as default, whereas Tensorflow uses NHWC. I have a version of this code that checks for the users ordering and builds the model according to that but I haven't pushed it yet.
Let me know if there are any other issues!
InvalidArgumentError: Negative dimension size caused by subtracting 64 from 1 for 'depthwise_conv2d_1/depthwise' (op: 'DepthwiseConv2dNative') with input shapes: [?,1,64,4], [64,1,4,2]. :S