-1

I tried to recognize using mnist data as train data but failed so I want to add my train data with that so how can I train my model with mnist dataset and my own data. I tried training with my own data also but failed any suggestions are welcome ..... for example first I trained with mnist dataset followed this approach

https://medium.com/coinmonks/handwritten-digit-prediction-using-convolutional-neural-networks-in-tensorflow-with-keras-and-live-5ebddf46dc8

but the results are not satisfying so I tried to train that model by my data but looking at the results maybe I don't have enough data so now I want to train my model using mnist data + my data . so how can I do that

kritarth
  • 11
  • 3

2 Answers2

0

There are several ways how to concatenate two numpy arrays. The most obvious one is probably np.concatenate()

import numpy as np

all_train_x = np.concatenate((mnist_train_x, my_train_x))
all_train_y = np.concatenate((mnist_train_y, my_train_y))

Note the double parentheses.

sebrockm
  • 5,733
  • 2
  • 16
  • 39
0

You can also try data augmentation technique. This will increase you size of the dataset and will also improve the performance of your model. You can some useful information here.

Akhilesh Pandey
  • 868
  • 8
  • 18