How to fix RuntimeError: expected Tensor as element X in argument 0, but got type in Python | DevErrors