Dose PyTorch has something similar to tf.set_shape(). Link to the TF set_shape.
tf.set_shape()
You can use the .view() function. view
You can use either .view() or torch.reshape