I'm distinguish the keras.layer about Droupout and SpatialDropout1D, however, I call K.eval() and find the two result is different.
It's running in tensorflow1.12.1
x = np.arange(2*4*3).reshape((2, 4, 3))
inputs = K.variable(x) # generate a variable
dropout_1 = K.eval(SpatialDropout1D(0.5)(inputs))
print(dropout_1)
noise_shape=(2, 4, 1)
dropout_2 = K.eval(K.dropout(inputs, 0.5, noise_shape))
print(dropout_2)
dropout_1:
[[[ 0. 1. 2.]
[ 3. 4. 5.]
[ 6. 7. 8.]
[ 9. 10. 11.]]
[[12. 13. 14.]
[15. 16. 17.]
[18. 19. 20.]
[21. 22. 23.]]]
dropout_2:
[[[ 0. 2. 4.]
[ 6. 8. 10.]
[ 0. 0. 0.]
[ 0. 0. 0.]]
[[24. 26. 28.]
[30. 32. 34.]
[36. 38. 40.]
[ 0. 0. 0.]]]