tatk.policy.mle package

Submodules

tatk.policy.mle.loader module

class tatk.policy.mle.loader.ActMLEPolicyDataLoader

Bases: object

__init__()

Initialize self. See help(type(self)) for accurate signature.

create_dataset(part, batchsz)

tatk.policy.mle.mle module

class tatk.policy.mle.mle.MLEAbstract(archive_file, model_file)

Bases: tatk.policy.policy.Policy

__init__(archive_file, model_file)

Initialize self. See help(type(self)) for accurate signature.

init_session()

Restore after one session

load(archive_file, model_file, filename)
predict(state)

Predict an system action given state. Args:

state (dict): Dialog state. Please refer to util/state.py

Returns:

action : System act, with the form of (act_type, {slot_name_1: value_1, slot_name_2, value_2, …})

tatk.policy.mle.train module

class tatk.policy.mle.train.MLE_Trainer_Abstract(manager, cfg)

Bases: object

__init__(manager, cfg)

Initialize self. See help(type(self)) for accurate signature.

imit_test(epoch, best)

provide an unbiased evaluation of the policy fit on the training dataset

imitating(epoch)

pretrain the policy by simple imitation learning (behavioral cloning)

policy_loop(data)
save(directory, epoch)
test()