introduction to pytorch sometimes we need to create tensors with dimensions similar to existing tensors the example in listing - illustrates this listing - creating tensor with dimensions similar to another tensor in [ ] torch tensor([[ ],[ ]]in [ ] torch zeros_like(ain [ ] out[ ]tensor([[ ][ ]]in [ ] torch ones_like(ain [ ] out[ ]tensor([[ ][ ]]so farwe have considered only floating-point numbers pytorch tensorshoweverare not limited to floating-point numbers here are few examples of constructing tensors with integers and longs as side notenotice that the dtype functions can be used to find the type of the objects the tensor comprises listing - demonstrates creating tensor with integer datatypes listing - creating tensor with integer datatypes in [ ] torch tensor([[ , ],[ , ]]in [ ] out[ ]tensor([[ ][ ]]