'some code duplication here with forward pass, but I think we want the freedom in future'

@staticmethod
def predict(batch, model, params, **kwparams):

    F = np.row_stack((x['image']['feat'] for x in batch))
    We = model['We']
    be = model['be']
    Xe = (F.dot(We) + be)
    generator_str = params['generator']
    Generator = decodeGenerator(generator_str)
    Ys = []
    for (i, x) in enumerate(batch):
        gen_Y = Generator.predict(Xe[i, :], model, model['Ws'], params, **kwparams)
        Ys.append(gen_Y)
    return Ys
