barronalex / Dynamic-Memory-Networks-in-TensorFlow

Dynamic Memory Network implementation in TensorFlow
MIT License
180 stars 80 forks source link

Why do you deal with rel_labels in such way? #7

Closed Irvinglove closed 6 years ago

Irvinglove commented 7 years ago

Thanks for providing an excellent for us to learn about Dynamic-Memory-Networks. However, I found something confused me in load_babi function. Why do you deal with rel_labels in such way? We will get rel_labels with zeros array in such way. Could you please correct this error?

rel_labels = np.zeros((len(rel_labels), len(rel_labels[0])))
for i, tt in enumerate(rel_labels):
     rel_labels[i] = np.array(tt, dtype=int)
barronalex commented 6 years ago

Ah this is clearly wrong - sorry! I've removed those lines.

Since the DMN+ doesn't require strong supervision with relative labels to obtain good performance, that part of the code is definitely under-tested. By default, rel_labels isn't used at all.