title: tf.cast equivalent in pytorch?
body: <p>I am new to PyTorch. TensorFlow has an API <em>tf.cast()</em> and <em>tf.shape()</em>. the <em>tf.cast</em> has specific purpose in TensorFlow, is there anything equivalent in torch? 
  i have tensor x= tensor(shape(128,64,32,32)): <em>tf.shape(x)</em> create tensor of dimension 1 <em>x.shape</em> create the true dimension. i need to use <em>tf.shape(x)</em> in torch. </p>
  
  <p><em>tf.cast</em> has a different role than just changing tensor <em>dtype</em> in torch. </p>
  
  <p>did anyone have equivalent API in torch/PyTorch. </p>