I think the problem is that the python variable train refers to two things in your code.
Your dataset object here train = data_utils.TensorDataset(data_train.float(), labels_train) and also a function that you use to perform training given the way you try to use it.