DongjunLee / conversation-tensorflow

TensorFlow implementation of Conversation Models
143 stars 27 forks source link

KeyError when training #7

Closed dianad96 closed 6 years ago

dianad96 commented 6 years ago

Hi,

I downloaded your repo and followed all the instructions but I have a problem after running python main.py --config cornell-movie-dialogs --mode train_and_evaluate. I get that

  File "F:\conversation-tensorflow-master\model.py", line 23, in model_fn
    self.build_graph()
  File "F:\conversation-tensorflow-master\model.py", line 61, in build_graph
    self._build_encoder()
  File "F:\conversation-tensorflow-master\model.py", line 104, in _build_encoder
    beam_width = Config.predict.get('beam_width', 0)
  File "C:\Users\AppData\Local\Programs\Python\Python36\lib\site-packages\hbconfig\__init__.py", line 76, in __getattr__
    config_value = self.config[name]
KeyError: 'predict'

Any idea how this might be fixed?

I am using Python -3.6 andTensorflow -1.4

DongjunLee commented 6 years ago

Hi @DianaD96

Could you fill this information to cornell-movie-dialogs.yml?

train:
  ...

predict:
  beam_width: 0
  length_penalty_weight: 1.0

It will fix that bug.