Posted here, I got around the problem by converting the image labels (Ids) to integers, solution courtesy of @jamesrees, see here: