def pred_func(model: NeuralNetwork, timestep):
    global data_q

    if len(data_q) > timestep:
        data = np.expand_dims(np.asarray(
            [data_q.pop() for _ in range(timestep)]),
                              axis=0)
        return model.predict(x=data)
    else:
        print('Not Enough Data to predict')
        return None
示例#2
0
def pred_func(model: NeuralNetwork, data):
    return model.predict(x=data)