TensorFlow has tf.expand_dims(x, -1). It’s not a big deal, but being able to write x.unsqueeze(-1) is a lot nicer than x.unsqueeze(len(x.size()). Agree? Disagree?
TensorFlow has tf.expand_dims(x, -1). It’s not a big deal, but being able to write x.unsqueeze(-1) is a lot nicer than x.unsqueeze(len(x.size()). Agree? Disagree?