You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Jan 24, 2024. It is now read-only.
TypeError Traceback (most recent call last)
<ipython-input-7-039e026fb8a7> in <module>
30 # step 8: predict
31 print('predicting..')
---> 32 results = trainer.predict(print_steps=print_steps)
~/anaconda3/envs/paddle/lib/python3.6/site-packages/paddlepalm/trainer.py in predict(self, output_dir, print_steps)
645 cur_predict_step = 0
646 for feed in iterator:
--> 647 rt_outputs = self.predict_one_batch(feed)
648 # rt_outputs = {k[len(self.name+'.'):]: v for k,v in rt_outputs.items() if k.startswith(self.name+'.')}
649 self._pred_head.batch_postprocess(rt_outputs)
~/anaconda3/envs/paddle/lib/python3.6/site-packages/paddlepalm/trainer.py in predict_one_batch(self, batch)
752 num_fakes = decode_fake(len(rt_outputs[0]), mask, self._predict_batch_size)
753 if num_fakes:
--> 754 rt_outputs = [i[:-num_fakes] for i in rt_outputs]
755 else:
756 feed = self._pred_feed_batch_process_fn(batch)
~/anaconda3/envs/paddle/lib/python3.6/site-packages/paddlepalm/trainer.py in <listcomp>(.0)
752 num_fakes = decode_fake(len(rt_outputs[0]), mask, self._predict_batch_size)
753 if num_fakes:
--> 754 rt_outputs = [i[:-num_fakes] for i in rt_outputs]
755 else:
756 feed = self._pred_feed_batch_process_fn(batch)
TypeError: slice indices must be integers or None or have an __index__ method
Debug:
ipdb> num_fakes
6.0
The text was updated successfully, but these errors were encountered:
报错信息:
Debug:
The text was updated successfully, but these errors were encountered: