AdeDZY / K-NRM

K-NRM: End-to-End Neural Ad-hoc Ranking with Kernel Pooling
BSD 3-Clause "New" or "Revised" License
202 stars 43 forks source link

Errors? when initial idf values in testing part. #13

Open WonderMind opened 5 years ago

WonderMind commented 5 years ago

Hi zhuyun, Please help me check this problem: https://github.com/AdeDZY/K-NRM/blob/fa5d60c38d894c3ef6cc7e580f60938773c3a8b3/knrm/data/generator.py#L93 I think when 'with_idf=True', this line should be: if len(cols) < 3: idf = np.ones(len(q)) else: idf = np.array([int(t) for t in cols[2].split(',')])

all right?

Thanks for you attention.

AdeDZY commented 5 years ago

Hi,

Yes, you are correct about this. Thank you!

On Fri, Nov 23, 2018 at 3:14 AM EdwardLorenz notifications@github.com wrote:

Hi zhuyun, Please help me check this problem:

https://github.com/AdeDZY/K-NRM/blob/fa5d60c38d894c3ef6cc7e580f60938773c3a8b3/knrm/data/generator.py#L93 I think when 'with_idf=True', this line should be: if len(cols) < 3: idf = np.ones(len(q)) else: idf = np.array([int(t) for t in cols[2].split(',')])

all right?

Thanks for you attention.

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/AdeDZY/K-NRM/issues/13, or mute the thread https://github.com/notifications/unsubscribe-auth/AE8DmAxOZb0ktoyfz1FkjG96qqfKDfwtks5ux65qgaJpZM4YwPyr .

-- Zhuyun Dai Language Technologies Institute School of Computer Science Carnegie Mellon University