def MakeModel():
    checkpoint_path = '/tmp/' + str(datetime.datetime.now())

    optimizer = keras.optimizers.Adam(lr=0.0006,
                                      beta_1=0.96,
                                      beta_2=0.99999,
                                      epsilon=1e-2)

    descriptor = 'Final training of model'
    filefmt = 'weights.Epoch-{epoch:03d};Loss-{val_loss:.6f}.hdf5'

    #Model = ML.SimpleModel(Train_data,optimizer)
    Model = ML.ModularModel(Train_data, optimizer, layers=4, nodes=4 * 256)

    History = ML.TrainModel(Model,
                            Train_data,
                            Train_label,
                            EPOCHS=500,
                            min_delta=0.0,
                            patience=20,
                            PERIOD=0,
                            BATCH=45,
                            val_data=tuple([Test_data, Test_label]),
                            checkpoint_path=checkpoint_path,
                            file_name=filefmt,
                            Descriptor=descriptor)

    ML.PlotHistory(
        History,
        save_path=checkpoint_path.replace('.', ':').replace(':', '-') + '/')
    Predictions = ML.Predict(Model, Test_data)
    grph.PlotHistory(
        Predictions, Test_label,
        os.getcwd().replace('\\', '/') +
        checkpoint_path.replace('.', ':').replace(':', '-') + '/')
    grph.PlotHistory2018(
        Predictions, Test_label,
        os.getcwd().replace('\\', '/') +
        checkpoint_path.replace('.', ':').replace(':', '-') + '/')
    grph.PlotHistoryDiff(
        Predictions, Test_label,
        os.getcwd().replace('\\', '/') +
        checkpoint_path.replace('.', ':').replace(':', '-') + '/')
    grph.PlotHistory2018percent(
        Predictions, Test_label,
        os.getcwd().replace('\\', '/') +
        checkpoint_path.replace('.', ':').replace(':', '-') + '/')

    Offset = Predictions - Test_label
    OffsetP = Offset / Test_label * 100
    return History, Model, OffsetP, Offset