Quantcast
Viewing all articles
Browse latest Browse all 4448

Memory error (digits recognition in python av article ) - train_x = np.stack(temp) and in test_x = np.stack(temp)

@Krishtetali wrote:

temp = []
for img_name in train.filename:
image_path = os.path.join(data_dir, ‘Train’, ‘Images’, ‘train’, img_name)
img = imread(image_path, flatten=True)
img = img.astype(‘float32’)
temp.append(img)

train_x = np.stack(temp)

temp = []
for img_name in test.filename:
image_path = os.path.join(data_dir, ‘Train’, ‘Images’, ‘test’, img_name)
img = imread(image_path, flatten=True)
img = img.astype(‘float32’)
temp.append(img)

test_x = np.stack(temp)

Posts: 1

Participants: 1

Read full topic


Viewing all articles
Browse latest Browse all 4448

Trending Articles