Creating the tensors seems to work, while you are now facing an error stating the data and labels have a different length.
I would recommend to check the correspondence between both tensors, as apparently you have either missing labels or missing data.