getting started with training models...
- First of all you need to install the latest version of Anaconda
- Run Anaconda as administrator
- Then install jupyter notebook on Anaconda
- click on Environments on the top let corner
- Type Tensorflow in the "Search Environments" tab
- Then download it
- Similarly type Keras and install it too
- Open your jupyter notebook and bang-on you are all ready to go
- import tensorflow as tf >>> on jupyter notebook and it will run smoothly
- import keras >>> on jupyter and it will run smoothly
- some useful commands
- from keras.datasets import mnist # for loading datasets that are already available
- mnist.load_data() # for loading data
- from keras import models # importing models from keras
- from keras import layers # importing layers from keras
- network = models.Sequential() # using Sequential() method to add layers, etc
- network.add(layers.Dense(Density, activation = 'any activation function', input_shape= (input layes shape)))
- activation functions can be sigmoid, ReLU, Leaky ReLU, Tanh, etc. most commonly used is ReLU where as for output layer sigmoid is used.
- network.compile(optimizer='any optimizer', loss='any loss calculating method', metrics=['accuracy'])
- network.fit(train_image, train_lable, epochs=of your choice, batch_size=of your choice)
- test_loss, test_acc = network.evaluate(test_image, test_lable)
- print('test_acc:', test_acc)
- Help taken from Sir Rauf Ur Rahim (PIAIC teacher)