incompatible weights
Opened this issue · 2 comments
emadeldeen24 commented
when I run the test.py file, I got the following error
Traceback (most recent call last): File "test.py", line 57, in depth_rows=rows, depth_cols=cols, gray_rows=rows, gray_cols=cols, of_rows=rows, of_cols=cols, File "D:\Projects\1.Face\codes\POSEidon-Biwi-master\model.py", line 105, in FUSION model = FUSION_DENSE_CONCAT(weights_depth, weights_gray, weights_OF, depth_rows, depth_cols, gray_rows, gray_cols, of_rows, of_cols) File "D:\Projects\1.Face\codes\POSEidon-Biwi-master\model.py", line 86, in FUSION_DENSE_CONCAT cnn_depth_out = CNN_DEPTH(input_depth, weights_depth) File "D:\Projects\1.Face\codes\POSEidon-Biwi-master\model.py", line 25, in CNN_DEPTH x = Convolution2D(30, 5, 5, trainable=False, weights=weights, subsample=(1, 1), activation='tanh')(input_img) File "C:\Users\Emad\Anaconda3\lib\site-packages\keras\engine\base_layer.py", line 436, in __call__ self.set_weights(self._initial_weights) File "C:\Users\Emad\Anaconda3\lib\site-packages\keras\engine\base_layer.py", line 1057, in set_weights 'provided weight shape ' + str(w.shape)) ValueError: Layer weight shape (5, 5, 64, 30) not compatible with provided weight shape (30, 1, 5, 5)
Any solutions?
stytim commented
This is caused by tensorfow backend in keras. Switching to Theano resolves the issue.