Open feiyang3 opened 4 years ago
UnboundLocalError: local variable 'batch_index' referenced before assignment
The reason for the problem is that the list of batches is empty!
The reason it is blank is because the number of samples for training data is too small to be divided by batch_size
You should check your data, number of samples or You should reduce batch_size to the extent that the number of samples is divided by the size of the lot with a real result, Good luck!
if batch_index == len(batches) - 1: # Last batch. UnboundLocalError: local variable 'batch_index' referenced before assignment