keras-js
keras-js copied to clipboard
Conv2DTranspose problem
I have 2 problems with Conv2DTranspose layer:
- When I try to create model with
gpu: false
an error with shapes occurs:
Error: Mismatched array shapes for matrix product
- Same model, with
gpu: false
. There are several warnings:
WebGL: INVALID_VALUE: texImage2D: width or height out of range
And wrong prediction in the end.
I suppose there is a problem with Conv2DTranspose layer. Original TF + Keras works well.
Model summary:
_________________________________________________________________
Layer (type) Output Shape Param #
=================================================================
input (InputLayer) (None, 3, 1, 1) 0
_________________________________________________________________
ConvNd_0 (Conv2DTranspose) (None, 512, 4, 4) 25088
_________________________________________________________________
SELU_1 (Activation) (None, 512, 4, 4) 0
_________________________________________________________________
ConvNd_2 (Conv2DTranspose) (None, 256, 8, 8) 2097408
_________________________________________________________________
SELU_3 (Activation) (None, 256, 8, 8) 0
_________________________________________________________________
ConvNd_4 (Conv2DTranspose) (None, 128, 16, 16) 524416
_________________________________________________________________
SELU_5 (Activation) (None, 128, 16, 16) 0
_________________________________________________________________
ConvNd_6 (Conv2DTranspose) (None, 64, 32, 32) 131136
_________________________________________________________________
SELU_7 (Activation) (None, 64, 32, 32) 0
_________________________________________________________________
ConvNd_8 (Conv2DTranspose) (None, 32, 64, 64) 32800
_________________________________________________________________
SELU_9 (Activation) (None, 32, 64, 64) 0
_________________________________________________________________
ConvNd_10 (Conv2DTranspose) (None, 3, 128, 128) 1539
_________________________________________________________________
Tanh_11 (Activation) (None, 3, 128, 128) 0
=================================================================
Total params: 2,812,387
Trainable params: 2,812,387
A keras model: model.zip
Browser 1: Firefox 57.0 Browser 2: Chromium 62.0 Browser 3: Firefox 56.0 (Win64)
Update: I thought the problem was with dimension ordering (in previous model it was CHW), so, I've converted the model to other dimension ordering (HWC).
A new error in a console:
Error: [Model] error loading weights.