minor cands fix
@@ -273,6 +273,7 @@ class DefaultTeacher(FixedDialogTeacher):
if 'annotation' in shared:
self.annotation = shared['annotation']
self.image_loader = shared['image_loader']
+ if 'cands' in shared:
self.cands = shared['cands']
else:
# need to set up data from scratch
@@ -322,6 +323,7 @@ class DefaultTeacher(FixedDialogTeacher):
def get(self, episode_idx, entry_idx=0):
action = {
+ 'text': '',
'episode_done': True
}
@@ -398,6 +400,7 @@ class DefaultTeacher(FixedDialogTeacher):
if hasattr(self, 'annotation'):
shared['annotation'] = self.annotation
shared['image_loader'] = self.image_loader
+ if hasattr(self, 'cands'):
shared['cands'] = self.cands
return shared
