I am training a CNN model for facial recognition using Google Colab. I am facing issue with python list function i.e. array(). Everything was fine when the list had 28000 instances. I increased the samples and list size increased to 170000. After increasing list size, it gives the following error. Thanks
Here is the code sample;
x_train = np.array(x_train, 'float32') x_test = np.array(x_test, 'float32') y_train = np.array(y_train, 'float32') y_test = np.array(y_test, 'float32')
TypeError: only size-1 arrays can be converted to Python scalars
The above exception was the direct cause of the following exception:
ValueError: setting an array element with a sequence.
Go to Source
Author: Mansoor Alam