cur_train_out = self.process_das(self.train_das[:self.batch_size])
log_info("Current train output:\n" +
"\n".join([unicode(tree) for tree in cur_train_out]))
cur_valid_out = self.process_das(self.valid_das)
cur_cost = self._compute_valid_cost(cur_valid_out, self.valid_trees)
After Change
cur_valid_out = self.process_das(self.valid_das[:self.batch_size])
cur_cost = self._compute_valid_cost(cur_valid_out, self.valid_trees)
log_info("Current validation output:\n" +
"\n".join([" ".join(n.t_lemma for n in tree.nodes[1:])
if self.use_tokens
else unicode(tree)
for tree in cur_valid_out]))