Using your own data in Tensorflow

I already know how to make a neural network using the mnist dataset. I've been looking for neural network training tutorials on your own dataset for 3 months now, but I just don't get it. If anyone can offer any good lessons or explain how it all works, please help. PS. I will not install NLTK. It seems that many people train their neural network in text, but I won’t. If I installed NLTK, I would use it only once.

+4
source share
1 answer

I suggest you use the OpenCV library. Regardless of whether you use your MNIST or PIL data when it loads, they are all just NumPy arrays. If you want the MNIST datasets to fit your trained model, here's how I did it:

1.Use cv2.imread to download all the images you want them to act as training datasets.

2.Use cv2.cvtColor to convert all images to grayscale images and resize them to 28x28.

3. Place each pixel in all data sets at 255.

4. As usual, exercise!

I did not try to make this my own format, but theoretically this is the same.

+1
source

Source: https://habr.com/ru/post/1673817/


All Articles