Closed dimeldo closed 6 years ago
Ok so I found out that I need to change:
in corpus.py:
dialog = [(bod_utt, 0, None)] + [(utt, int(caller=="B"), feat) for caller, utt, feat in lower_utts]
to:
dialog = [(bod_utt, 0, None)] + [(utt, int(caller=="B"), None) for caller, utt, feat in lower_utts]
And in config_utils.py:
use_hcf = False
But I'm getting this error:
Traceback (most recent call last):
File "kgcvae_swda.py", line 165, in <module>
main()
File "kgcvae_swda.py", line 68, in main
model = KgRnnCVAE(sess, config, api, log_dir=None if FLAGS.forward_only else log_dir, forward=False, scope=scope)
File "/Users/ruby/Downloads/NeuralDialog-CVAE-master/models/cvae.py", line 301, in __init__
loop_func = decoder_fn_lib.context_decoder_fn_train(dec_init_state, selected_attribute_embedding)
UnboundLocalError: local variable 'selected_attribute_embedding' referenced before assignment
As the error says, the variable selected_attribute_embedding
has no value since it seems like only when use_hcf = True
you initialize it.
Can you please specify what code changes needs to be?
Also, if there need to be other code changes (maybe in testing/decoding), what are they?
Thanks. We will be looking into this.
Can you please help me with this? I really want to try your model, but I couldn't solve this on my own.
@dimeldo thanks for the interest. Currently, we are in a very busy month. We will look the issue after this.
Okay, so I was able to train successfully without dialogue acts. But I think still some other metadata was included like topics. In the code above I replaced selected_attribute_embedding
with None
, I figured it's related to dialogue acts embedding. I also commented all the parts related to da
.
And it seems to work well, but I will still prefer an official implementation from you. It will be great if you can implement the option so it will work using the flag use_hcf
and/or maybe additional flags indicating the un/use of other types of metadata, so we could try the CVAE model on other types of data.
@dimeldo Thanks! I just fixed the bug of selected_attribute_embedding is undefined
Hi,
What modifications in the code are needed to train on a dataset without dialogue acts, metadata, and features?