keras2c icon indicating copy to clipboard operation
keras2c copied to clipboard

What is the reason for the significant difference between the predicted values on the python side and those predicted by keras2c?

Open LaoChang2012 opened this issue 1 year ago • 0 comments

Hallo; Here is my problem: This is the predicted value on the python side: [[0.00516781 0.99483216]] This is the predicted value of keras2c: 0.0138991503 0.986100852 Keras version 2.15.0 keras2c complied by QT5.12. ​The following is my network structure:


Layer (type) Output Shape Param #

conv2d (Conv2D) (None, 43, 43, 32) 896
activation (Activation) (None, 43, 43, 32) 0
conv2d_1 (Conv2D) (None, 14, 14, 32) 9248
activation_1 (Activation) (None, 14, 14, 32) 0
max_pooling2d (MaxPooling2D) (None, 7, 7, 32) 0 dropout (Dropout) (None, 7, 7, 32) 0
conv2d_2 (Conv2D) (None, 3, 3, 64) 18496
activation_2 (Activation) (None, 3, 3, 64) 0
conv2d_3 (Conv2D) (None, 1, 1, 64) 36928
activation_3 (Activation) (None, 1, 1, 64) 0
max_pooling2d_1 (MaxPooling2D) (None, 1, 1, 64) 0
dropout_1 (Dropout) (None, 1, 1, 64) 0
flatten (Flatten) (None, 64) 0
dense (Dense) (None, 512) 33280
activation_4 (Activation) (None, 512) 0
dropout_2 (Dropout) (None, 512) 0
dense_1 (Dense) (None, 2) 1026 activation_5 (Activation) (None, 2) 0

Total params: 99874 (390.13 KB) Trainable params: 99874 (390.13 KB) Non-trainable params: 0 (0.00 Byte)


Regards, LC

LaoChang2012 avatar Jan 07 '24 11:01 LaoChang2012