Best way to flatten a 2D tensor containing a vector in TensorFlow?

Both tf.reshape(w, [-1]) and tf.squeeze(w) are “cheap” in that they operate only on the metadata (i.e. the shape) of the given tensor, and don’t modify the data itself. Of the two tf.reshape() has slightly simpler logic internally, but the performance of the two should be indistinguishable.

Leave a Comment

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)