Closed rakehsaleem closed 2 years ago
I would like to clarify that I was using Keras backend as "Tensorflow" and I learned that Keras initializes weights differently with different backends. So I changed Keras backend to "theano" backend and when I run the test images, it raises the following exception.
Traceback (most recent call last): File "main.py", line 43, in
model = ml_net_model(img_cols=shape_c, img_rows=shape_r, downsampling_factor_product=10) File "C:\Users\mqs6680\PycharmProjects\Saliency\model.py", line 78, in ml_net_model eltprod = EltWiseProduct(init='zero', W_regularizer=l2(1/(rows_eltcols_elt)))(pre_final_conv) File "C:\Users\mqs6680\PycharmProjects\Saliency\venv\lib\site-packages\keras\engine\topology.py", line 514, in call self.add_inbound_node(inbound_layers, node_indices, tensor_indices) File "C:\Users\mqs6680\PycharmProjects\Saliency\venv\lib\site-packages\keras\engine\topology.py", line 572, in add_inbound_node Node.create_node(self, inbound_layers, node_indices, tensor_indices) File "C:\Users\mqs6680\PycharmProjects\Saliency\venv\lib\site-packages\keras\engine\topology.py", line 149, in create_node output_tensors = to_list(outbound_layer.call(input_tensors[0], mask=input_masks[0])) File "C:\Users\mqs6680\PycharmProjects\Saliency\eltwise_product.py", line 56, in call output = xT.nnet.abstract_conv.bilinear_upsampling(K.expand_dims(K.expand_dims(1 + self.W, 0), 0), self.downsampling_factor, 1, 1) File "C:\Users\mqs6680\PycharmProjects\Saliency\venv\lib\site-packages\theano\tensor\nnet\abstract_conv.py", line 1911, in bilinear_upsampling raise ValueError("can't use ratio and frac_ratio together") ValueError: can't use ratio and frac_ratio together
Any help on how to fix this will be much appreciated!
Hi @marcellacornia! thank you for open-sourcing your code. I am trying to test some sample images using your code and I have installed all the dependencies like you said, however, when I run the test file, it gives me the following error about weights incompatibility and I am wondering what changes should be adjusted to run the testing. I use the updated weights file. Thank you!![image](https://user-images.githubusercontent.com/37826897/118541416-a250b700-b71f-11eb-9769-f5d18403f6df.png)