-
Notifications
You must be signed in to change notification settings - Fork 103
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Spatial Transform Input: build() takes exactly 1 argument (2 given), Keras 1.0 #36
Comments
Checked keras1 branch and it works fine! |
The keras1 branch doesn't handle the Error message (on
|
you mean if you have dropout on your |
yea, it won't build the layer. You can make it but as soon as you add it to a model (sequential) or call it with another layer it throws the message |
The same issue occurs if you add weight regularization to a layer in the locnet. (I'm guessing the Input layer in the locnet is what is causing this). |
a friend of mine was having trouble trying to build models that were not Do you guys think that if we compile the @rburt were you having similar problems the last time you played with |
Yeah, I've had this problem too. When the locnet has the learning_phase parameter but the main model does not, the parameter isn't passed when during the build. I was able to get around this error by adding a dropout layer in my model like below:
Obviously it isn't the most elegant solution but it works as a quick fix for me. |
Hello, I'm also trying to use the spatial transformer code available on the following link (https://github.com/EderSantana/seya/blob/master/examples/Spatial%20Transformer%20Networks.ipynb) On executing the code, I'm getting following error in the line where we add SpatialTransformer layer : Traceback (most recent call last): Version of Theano that I'm using is 1.0.5 Kindly help me solve this issue. |
@innovator1108 check if your version of keras is > 1.0, if so, use Seya's |
@kmader @EderSantana I met the same problem if adding dropout in the locnet. Has any of you solve the problem? |
Unfortunately, it seems the keras-1 branch does not support many of the features I'm using (or will be using). Deconvolution2D doesn't seem to be implemented, and ModelCheckpoint doesn't support save_weights_only (although I could get around that one). I wouldn't mind using a Dropout(), as I was planning on doing that anyway; however, back at the main Keras branch, I still do get the error, even with Dropout. Also, the error happens at the addition of the SpatialTransformer, before Dropout. How does the Dropout resolve the problem for others? (I'm really not advanced enough in this to move the Deconv2d and ModelCheckpoint features into the Keras-1 branch. Nor fix the build() argument errors in the master branch. :) 242 locnet = Sequential() File "./keras_stn_imgtransform.py", line 834, in |
hey , @EderSantana what do you exactly mean by " use Seya's keras1 brach" if keras version is>1 .Since I am getting same error and I want to know what change should I make in the code https://github.com/EderSantana/seya/blob/master/examples/Spatial%20Transformer%20Networks.ipynb) or should i clone seya once again to my anaconda can you make it clear please? |
@rammadhav987 @EderSantana meant cloning the keras1 branch, instead of the default master branch which is causing the error. You can do that with I did the same, and it works fine now. |
The easiest code example is below but the ipython notebook does not work either with keras 1.0.3
The text was updated successfully, but these errors were encountered: