Example #1
0
def get_reward_funcs(forward_path, backward_path, *args, **kwargs):
    net_forward = Seq2Seq.load(forward_path, *args, **kwargs)
    net_backward = Seq2Seq.load(backward_path, *args, **kwargs)
    minfo = MutualInformation(net_forward, net_backward)
    eanswer = EaseAnswering(net_forward)
    iflow = InformationFlow()
    return minfo, eanswer, iflow
Example #2
0
def get_mutual_information(forward_path, backward_path, *args, **kwargs):
    net_forward = Seq2Seq.load(forward_path, *args, **kwargs)
    net_backward = Seq2Seq.load(backward_path, *args, **kwargs)
    return MutualInformation(net_forward, net_backward)