Skip to content

Latest commit

 

History

History
59 lines (46 loc) · 6.7 KB

README.md

File metadata and controls

59 lines (46 loc) · 6.7 KB

TensorFlow_101

Deep learning playground with TensorFlow

Log

  • 10 June 2021 - Created 00 notebook on TensorFlow basics.
  • 25 June 2021 - Created 01 notebook on NN Regression with TensorFlow.
  • 1 July 2021 - Created 02 notebook on NN Classification with TensorFlow.
  • 10 July 2021 - 00 notebook uploaded on GitHub.
  • 17 July 2021 - 01 notebook uploaded on GitHub.
  • 18 July 2021 - Added Extra Curricular and Exercises in all notebooks, 02_Neural_Network_Classification_with_TensorFlow notebook uploaded and started work on 03_convolutional_neural_networks_in_tensorflow notebook.

🛠 00. TensorFlow Fundamentals Exercises

  1. Create a vector, scalar, matrix and tensor with values of your choosing using tf.constant().
  2. Find the shape, rank and size of the tensors you created in 1.
  3. Create two tensors containing random values between 0 and 1 with shape [5, 300].
  4. Multiply the two tensors you created in 3 using matrix multiplication.
  5. Multiply the two tensors you created in 3 using dot product.
  6. Create a tensor with random values between 0 and 1 with shape [224, 224, 3].
  7. Find the min and max values of the tensor you created in 6 along the first axis.
  8. Created a tensor with random values of shape [1, 224, 224, 3] then squeeze it to change the shape to [224, 224, 3].
  9. Create a tensor with shape [10] using your own choice of values, then find the index which has the maximum value.

🛠 01. Neural network regression with TensorFlow Exercises

  1. Create your own regression dataset (or make the one we created in "Create data to view and fit" bigger) and build fit a model to it.
  2. Try building a neural network with 4 Dense layers and fitting it to your own regression dataset, how does it perform?
  3. Try and improve the results we got on the insurance dataset, some things you might want to try include:
  • Building a larger model (how does one with 4 dense layers go?).
  • Increasing the number of units in each layer.
  • Lookup the documentation of Adam and find out what the first parameter is, what happens if you increase it by 10x?
  • What happens if you train for longer (say 300 epochs instead of 200)?
  1. Import the Boston pricing dataset from TensorFlow tf.keras.datasets and model it.

🛠 02. Neural network classification with TensorFlow Exercises

  1. Play with neural networks in the TensorFlow Playground for 10-minutes. Especially try different values of the learning, what happens when you decrease it? What happens when you increase it?
  2. Replicate the model pictured in the TensorFlow Playground diagram below using TensorFlow code. Compile it using the Adam optimizer, binary crossentropy loss and accuracy metric. Once it's compiled check a summary of the model. tensorflow playground example neural network Try this network out for yourself on the TensorFlow Playground website. Hint: there are 5 hidden layers but the output layer isn't pictured, you'll have to decide what the output layer should be based on the input data.
  3. Create a classification dataset using Scikit-Learn's make_moons() function, visualize it and then build a model to fit it at over 85% accuracy.
  4. Train a model to get 88%+ accuracy on the fashion MNIST test set. Plot a confusion matrix to see the results after.
  5. Recreate TensorFlow's softmax activation function in your own code. Make sure it can accept a tensor and return that tensor after having the softmax function applied to it.
  6. Create a function (or write code) to visualize multiple image predictions for the fashion MNIST at the same time. Plot at least three different images and their prediciton labels at the same time. Hint: see the classifcation tutorial in the TensorFlow documentation for ideas.
  7. Make a function to show an image of a certain class of the fashion MNIST dataset and make a prediction on it. For example, plot 3 images of the T-shirt class with their predictions.

📖 02. Neural network classification with TensorFlow Extra-curriculum