Data loading problem

I would like to run RAM model on my own data set. My training set is train.t7 . I have encountered a problem while loading my data set because it is my first time that I have used python. I have tried very hard to understand both the software and package but I need your help in solving this problem.
I run the following code:



    x= tf.convert_to_tensor(o[b'data'],dtype=tf.uint8)



    dataset =, y)

But then I got the following error:

File "/home/wing92518/.local/lib/python3.6/site-packages/torch/utils/data/", line 36, in <genexpr>
    assert all(tensors[0].size(0) == tensor.size(0) for tensor in tensors)
AttributeError: 'Tensor' object has no attribute 'size'

pytorch tensor and tf tensors are different things…