math_ops.floor equivalent in Keras
问题 I'm trying to implement a custom layer in Keras where I need to convert a tensor of floats [a, 1+a) to a binary tensor for masking. I can see that Tensorflow has a floor function that can do that, but Keras doesn't seem to have it in keras.backend . Any idea how I can do this? 回答1: As requested by OP, I will mention the answer I gave in my comment and elaborate more: Short answer: you won't encounter any major problems if you use tf.floor() . Long answer: Using Keras backend functions (i.e.