graph-learn
graph-learn copied to clipboard
id must be int64?
In my project ,my id is bank card which length is 21.Is there any way to solve this problem?thanks!
Yes, id should be in the format of int64, in you case, you may preprocess the data to remap the card number to cardinal number.
thanks. By the way, is the accuracy lost in the calculation of ID? During the call process, when the ID is 6221888200042590280, with the query result, Id becomes 6221888200042590208. There are other examples. The last 3 or 4 bits have changed. Please confirm
For example, a method is defined as
def node_ embedding(self, type='train'): ego_ flow = gl.EgoFlow (self._ val_ sample_ seed, self._ positive_ sample, self._ receptive_ FN, self.src_ ego_ spec) iterator = ego_ flow.iterator ego_ tensor = ego_ flow.pos_ src_ ego_ tensor emb = self.encoders ['src'].encode(ego_ tensor) ids = ego_ tensor.src.ids return ids, emb, iterator
Call method
embs = trainer.get_ node_ embedding() with tf.Session () as sess: result = sess.run ( tf.math.argmax (embs[:,1:], 1, output_ type= tf.int32 ) with open("./result", 'w') as f: for i in range( embs.shape [0]): f.write(str(int(embs[i][0])) + "\t" + str(result[i]) + "\n")