Recurrent-Knowledge-Graph-Embedding icon indicating copy to clipboard operation
Recurrent-Knowledge-Graph-Embedding copied to clipboard

How can I deal with the problem in the LSTMTrain.py?

Open panchengrui opened this issue 5 years ago • 1 comments

Hello,when I run your code,I get the Error in the LSTMTrain.py as below: "UnboundLocalError:local variable 'ur_id' referenced before assignment". Then I add the code "global ur_id" at the first line of "dump_post_embedding" function, but I received another error “NameError:name 'usr_id' is not defined. How can I handle this problem?

panchengrui avatar Oct 24 '19 14:10 panchengrui

I have solved this problem, I replaced the ur_id=ur_id.cuda() by node_id=node_id.cuda() in the LSTMTrain.py

panchengrui avatar Oct 29 '19 03:10 panchengrui