Because TFF is well integrated with Keras:
<aside> 💡 We strongly recommend most users construct models using Keras, see the Converters for Keras section below. These wrappers handle the aggregation of model updates as well as any metrics defined for the model automatically. (Link)
</aside>
And I have never used Keras, the plan for this week is to start learning how Keras works and do some practice following the tutorials.
To begin i will use this Keras tutorial:
Text generation with an RNN | TensorFlow Core
<aside> 💡 Given a sequence of characters from this data ("Shakespear"), train a model to predict the next character in the sequence ("e"). Longer sequences of text can be generated by calling the model repeatedly.
</aside>
My Colab notebook is available here:
So let's start. First we need to import the required libraries:
# Import tensorflow and libraries
import tensorflow as tf
tf.compat.v1.enable_v2_behavior()
import numpy as np
import os
import time
import pandas as pd
from tqdm import tqdm
import os
from google.colab import drive
import sys
As you can see i have also imported Google Drive, because we are using Colab we need something to read our dataset.
# Mount drive
drive.mount('/content/gdrive')
baseURL = '/content/gdrive/My Drive/TFF/';
directory = baseURL + 'test'
tf.gfile.MkDir(directory)