def apply_sparse_softmax(time_vector):
non_zeros = ~tf.equal(time_vector, 0.)
sparse_softmax = tf.nn.softmax(tf.boolean_mask(time_vector, non_zeros))
new_time_vector = sparse_softmax * tf.cast(non_zeros, tf.float64) # won't work because dimensions are different
return time_vector
112 NaN
名称:enrolled_university,dtype:float64
191 NaN
名称:enrolled_university,dtype:float64
244 NaN
名称:enrolled_university,dtype:float64
284 NaN
名称:enrolled_university,dtype:float64
315 NaN
名称:enrolled_university,dtype:float64
401 NaN
名称:enrolled_university,dtype:float64