We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
Hi all!
I am trying to replicate the model of transfer_glove_embeddings.py. When I try to execute the model I gel the following error:
`--------------------------------------------------------------------------- TypeError Traceback (most recent call last) in () 8 weights=[embedding_weights], 9 trainable=True)) ---> 10 model.add(SpatialDropout1D(Dropout(0.2))) 11 model.add(Conv1D(filters=NUM_FILTERS, kernel_size=NUM_WORDS, 12 activation="relu"))
~/.virtualenvs/negative-scoring/lib/python3.6/site-packages/keras/legacy/interfaces.py in wrapper(*args, **kwargs) 89 warnings.warn('Update your ' + object_name + 90 ' call to the Keras 2 API: ' + signature, stacklevel=2) ---> 91 return func(*args, **kwargs) 92 wrapper._original_function = func 93 return wrapper
' + object_name + 90 '
~/.virtualenvs/negative-scoring/lib/python3.6/site-packages/keras/layers/core.py in init(self, rate, **kwargs) 162 @interfaces.legacy_spatialdropout1d_support 163 def init(self, rate, **kwargs): --> 164 super(SpatialDropout1D, self).init(rate, **kwargs) 165 self.input_spec = InputSpec(ndim=3) 166
~/.virtualenvs/negative-scoring/lib/python3.6/site-packages/keras/layers/core.py in init(self, rate, noise_shape, seed, **kwargs) 99 def init(self, rate, noise_shape=None, seed=None, **kwargs): 100 super(Dropout, self).init(**kwargs) --> 101 self.rate = min(1., max(0., rate)) 102 self.noise_shape = noise_shape 103 self.seed = seed
TypeError: '>' not supported between instances of 'Dropout' and 'float'`
Any ideas? thanks in advanced
The text was updated successfully, but these errors were encountered:
Just had to remove argument Drop(): model.add(SpatialDropout1D(0.2)) instead of model.add(SpatialDropout1D(Dropout(0.2)))
Sorry, something went wrong.
Thanks Ulises. I ran into the same problem. Indeed it says in the documentation that SpatialDropout1D only takes a rate as argument.
rate
Thank you! That was driving me mad!
No branches or pull requests
Hi all!
I am trying to replicate the model of transfer_glove_embeddings.py. When I try to execute the model I gel the following error:
`---------------------------------------------------------------------------
TypeError Traceback (most recent call last)
in ()
8 weights=[embedding_weights],
9 trainable=True))
---> 10 model.add(SpatialDropout1D(Dropout(0.2)))
11 model.add(Conv1D(filters=NUM_FILTERS, kernel_size=NUM_WORDS,
12 activation="relu"))
~/.virtualenvs/negative-scoring/lib/python3.6/site-packages/keras/legacy/interfaces.py in wrapper(*args, **kwargs)
89 warnings.warn('Update your
' + object_name + 90 '
call to the Keras 2 API: ' + signature, stacklevel=2)---> 91 return func(*args, **kwargs)
92 wrapper._original_function = func
93 return wrapper
~/.virtualenvs/negative-scoring/lib/python3.6/site-packages/keras/layers/core.py in init(self, rate, **kwargs)
162 @interfaces.legacy_spatialdropout1d_support
163 def init(self, rate, **kwargs):
--> 164 super(SpatialDropout1D, self).init(rate, **kwargs)
165 self.input_spec = InputSpec(ndim=3)
166
~/.virtualenvs/negative-scoring/lib/python3.6/site-packages/keras/legacy/interfaces.py in wrapper(*args, **kwargs)
89 warnings.warn('Update your
' + object_name + 90 '
call to the Keras 2 API: ' + signature, stacklevel=2)---> 91 return func(*args, **kwargs)
92 wrapper._original_function = func
93 return wrapper
~/.virtualenvs/negative-scoring/lib/python3.6/site-packages/keras/layers/core.py in init(self, rate, noise_shape, seed, **kwargs)
99 def init(self, rate, noise_shape=None, seed=None, **kwargs):
100 super(Dropout, self).init(**kwargs)
--> 101 self.rate = min(1., max(0., rate))
102 self.noise_shape = noise_shape
103 self.seed = seed
TypeError: '>' not supported between instances of 'Dropout' and 'float'`
Any ideas? thanks in advanced
The text was updated successfully, but these errors were encountered: