johnny12150/FGNN

About train.py

Closed this issue · 10 comments

Hey bro, do you know why the target value is batch.y - 1 in train.py? why minus 1? I just ask the auther.

The item id is actually starting from 1, 0 is for padding.

The item id is actually starting from 1, 0 is for padding.

Thank you for your answer! So if my dataset item starts from 0, I do not need to do this subtraction right?

And why the sequences do not need to minus 1?

The item id is actually starting from 1, 0 is for padding.

Thank you for your answer! So if my dataset item starts from 0, I do not need to do this subtraction right?

It depends on whether you want to pad your sequence into fixed length.

And why the sequences do not need to minus 1?

The item embedding starts from id = 0 for padding.

The item id is actually starting from 1, 0 is for padding.

Thank you for your answer! So if my dataset item starts from 0, I do not need to do this subtraction right?

It depends on whether you want to pad your sequence into fixed length.

In this code, It's just graph construction, we don't need to pad the sequence...so It's the same whether it starts from 0 or 1 right?

By the way, does n_node represent the unique item number in the dataset? Sorry to bother you these days :)

The item id is actually starting from 1, 0 is for padding.

Thank you for your answer! So if my dataset item starts from 0, I do not need to do this subtraction right?

It depends on whether you want to pad your sequence into fixed length.

In this code, It's just graph construction, we don't need to pad the sequence...so It's the same whether it starts from 0 or 1 right?

Yes, since the pyG package doesn't require all the sessions need to be the same length.

By the way, does n_node represent the unique item number in the dataset? Sorry to bother you these days :)

It's correct.

Thanks!