Comments (8)
Hi @Mageshwaran2314,
thanks for downloading our code.
Please check your Keras and Theano versions. Our code is compatible with Keras 1.1.0 and Theano 0.9.0.
from sam.
yes I try to run this code with keras 2.1.3
I made some changes to the code, after that, I got this error
Using Theano backend.
Traceback (most recent call last):
File "main.py", line 63, in
m = Model(input=[x, x_maps], output=sam_resnet([x, x_maps]))
File "E:\sam-master\models.py", line 130, in sam_resnet
dcn = dcn_resnet(input_tensor=x[0])
File "E:\sam-master\dcn_resnet.py", line 143, in dcn_resnet
x = conv_block(x, 3, [64, 64, 256], stage=2, block='a', strides=(1, 1))
File "E:\sam-master\dcn_resnet.py", line 50, in conv_block
name=conv_name_base + '2a')(input_tensor)
File "C:\ProgramData\Anaconda3\lib\site-packages\keras\legacy\interfaces.py", line 56, in wrapper
raise_duplicate_arg_error(old_name, new_name)
File "C:\ProgramData\Anaconda3\lib\site-packages\keras\legacy\interfaces.py", line 106, in raise_duplicate_arg_error
'' + new_arg + '
. Stick to the latter!')
TypeError: For the strides
argument, the layer received both the legacy keyword argument subsample
and the Keras 2 keyword argument strides
. Stick to the latter!
Help me with this
from sam.
It seems that you are still using Keras 2.
You have to check your keras.json
file. It should be in the following format:
{
"image_dim_ordering": "th",
"epsilon": 1e-07,
"floatx": "float32",
"backend": "theano"
}
from sam.
already I change this
{
"floatx": "float32",
"epsilon": 1e-07,
"image_dim_ordering": "th",
"backend": "theano"
}
from sam.
Traceback (most recent call last):
File "/home/bl/PycharmProjects/Predicting Human Eye Fixations via an LSTM-based Saliency Attentive Model/main.py", line 66, in
m = Model(input=[x, x_maps], output=sam_vgg([x, x_maps]))
File "/home/bl/PycharmProjects/Predicting Human Eye Fixations via an LSTM-based Saliency Attentive Model/models.py", line 107, in sam_vgg
nb_cols=3, nb_rows=3)(att_convlstm)
File "/usr/local/lib/python2.7/dist-packages/Keras-2.0.3-py2.7.egg/keras/engine/topology.py", line 578, in call
output = self.call(inputs, **kwargs)
File "/home/bl/PycharmProjects/Predicting Human Eye Fixations via an LSTM-based Saliency Attentive Model/attentive_convlstm.py", line 143, in call
initial_states = self.get_initial_states(x)
File "/home/bl/PycharmProjects/Predicting Human Eye Fixations via an LSTM-based Saliency Attentive Model/attentive_convlstm.py", line 42, in get_initial_states
initial_state = K.conv2d(initial_state, K.zeros((self.nb_filters_out, self.nb_filters_in, 1, 1)), border_mode='same')
TypeError: conv2d() got an unexpected keyword argument 'border_mode'
why?
from sam.
import keras
print keras.version
import theano as th
print th.version
2.0.3
0.8.2
from sam.
Traceback (most recent call last):
File "/home/bl/PycharmProjects/Predicting Human Eye Fixations via an LSTM-based Saliency Attentive Model/main.py", line 77, in
m = Model(input=[x, x_maps], output=sam_resnet([x, x_maps]))
File "/home/bl/PycharmProjects/Predicting Human Eye Fixations via an LSTM-based Saliency Attentive Model/models.py", line 136, in sam_resnet
nb_cols=3, nb_rows=3)(att_convlstm)
File "/usr/local/lib/python2.7/dist-packages/Keras-2.0.3-py2.7.egg/keras/engine/topology.py", line 578, in call
output = self.call(inputs, **kwargs)
File "/home/bl/PycharmProjects/Predicting Human Eye Fixations via an LSTM-based Saliency Attentive Model/attentive_convlstm.py", line 147, in call
initial_states = self.get_initial_states(x)
File "/home/bl/PycharmProjects/Predicting Human Eye Fixations via an LSTM-based Saliency Attentive Model/attentive_convlstm.py", line 43, in get_initial_states
initial_state = K.conv2d(initial_state, K.zeros((self.nb_filters_out, self.nb_filters_in, 1, 1)), padding='same')
File "/usr/local/lib/python2.7/dist-packages/Keras-2.0.3-py2.7.egg/keras/backend/tensorflow_backend.py", line 2921, in conv2d
data_format='NHWC')
File "/usr/local/lib/python2.7/dist-packages/tensorflow/python/ops/nn_ops.py", line 650, in convolution
num_spatial_dims]))
ValueError: number of input channels does not match corresponding dimension of filter, 512 != 1
from sam.
initial_state = K.conv2d(initial_state, K.zeros((self.nb_filters_out, self.nb_filters_in, 1, 1)), padding='same')
This solves the issue
from sam.
Related Issues (20)
- raise NotImplementedError HOT 2
- 'NoneType' object is not subscriptable HOT 2
- Why dose the "loss" reduce first and then increase during the training? HOT 1
- Support in TX2 HOT 2
- where is the prediction HOT 1
- train model HOT 3
- On the CPU HOT 1
- ImportError: cannot import name get_from_module HOT 1
- Error in virtual env HOT 1
- I met this error about CorrMM images and kernel must have the same stack size HOT 1
- Retraining the models
- how to calculate this fix and map
- Getting this IOError HOT 1
- Adapting different testing image shapes? HOT 1
- fix_map = scipy.io.loadmat(path)["I"] HOT 1
- How to learn the prior maps in your method?
- Is there a Pytorch version
- Outputs must be theano variables or Out instances
- cannot import name 'RMSprop' from 'keras.optimizers' HOT 2
- how to visualize the Saliency Maps?
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from sam.