self.data[index][1] stores labels as '0'or '1', I think that’s the reason why float( ) gives no error.  About the recommendation, I think I’m not understanding what “class index” is. Is it a specific class like class class_name() ...  or something else?