tsinghua-fib-lab / SIGIR21-SURGE

Official implementation of SIGIR'2021 paper: "Sequential Recommendation with Graph Neural Networks".
MIT License
85 stars 27 forks source link

I didn't understand the code. #14

Open unknowed-ER opened 2 years ago

unknowed-ER commented 2 years ago

The following 2 lines code is in surge.py. I cann't understand the function of line 197 code. It seems that the execution of this code does not change the data.

196 A_bool = tf.cast(tf.greater(A, 0), A.dtype) 197 A_bool = A_bool * (tf.ones([A.shape.as_list()[1], A.shape.as_list()[1]]) - tf.eye(A.shape.as_list()[1])) + tf.eye(A.shape.as_list()[1])