Shouldn’t the labels be 0 indexed ? For 3 outputs in the model you need to have labels from 0-2. But you are returning 3 as well (not adults nor teenagers). Also, when you get this uninformative cuda error, try running on the cpu (with a small batch size for a few batches) as my experience is the cpu errors are much more informative. And when everything runs smoothly, you can move to gpu.