Neural Network implementation to solve the FizzBuzz problem
In this task an integer divisible by 3 is printed as Fizz, and integer divisible by 5 is printed as Buzz. An integer divisible by both 3 and 5 is printed as FizzBuzz. If the number is not divisible by both 3 and 5, then the number itself is printed as the output.
Configuration used:
● Python 3.7.6
● Keras 2.3.1
● Tensorflow 2.0.0
The following files will be part of this assignment:
● main.py - The main file of this assignment, which invokes the saved model and tests the
input from a txt file which can be passed by command line arguments. It generates two
output files - ‘Software1.txt’ and ‘Software2.txt’ which are generated by the logic based
and the machine learning code respectively.
● model.py - This is where the neural network is defined. The definitions were done using
Keras using TF in the backend.
● model.h5 - This file is generated when the file ‘model.py’ is run, and this will
subsequently get run from the ‘main.py’ code.
Enter the following command in your terminal for running the saved model.
You can change the input file by just tweaking the file name passed as the command line argument.
$ python main.py --test-data test_input.txt
A more detailed version of the analysis that was done can be found in the report that is attached.