Setting all negative values of a tensor to zero (in tensorflow)
<p>Here's my problem. I have a tensor X and I want to set all negative values to zero. In numpy, I would do the following <code>np.maximum(0, X)</code>. Is there any way to achieve the same effect in tensorflow? I tried <code>tf.maximum(tf.fill(X.get_shape(), 0.0), X)</code>, but this throws <code>ValueError: Cannot convert a partially known TensorShape to a Tensor: (?,)</code>.</p>

<p>PS. X is a 1-D tensor of shape (?,).</p>