October 2018
Intermediate to advanced
472 pages
10h 57m
English
Now that we have the mandatory inputs, that is, the dataset file path, the vocab file path, and the model name, we will initiate the training process. Let's define all of the hyperparameters for the model:
import osimport argparsefrom modules.Model import *from modules.Batch import *def main(): parser = argparse.ArgumentParser() parser.add_argument('--training_file', type=str, required=True) parser.add_argument('--vocabulary_file', type=str, required=True) parser.add_argument('--model_name', type=str, required=True) parser.add_argument('--epoch', type=int, default=200) parser.add_argument('--batch_size', type=int, default=50) parser.add_argument('--sequence_length', type=int, default=50) parser.add_argument('--log_frequency', ...Read now
Unlock full access