Coder Social home page Coder Social logo

id must be int64? about graph-learn HOT 2 CLOSED

alibaba avatar alibaba commented on May 5, 2024
id must be int64?

from graph-learn.

Comments (2)

archwalker avatar archwalker commented on May 5, 2024

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.

from graph-learn.

chenshthu avatar chenshthu commented on May 5, 2024

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")

from graph-learn.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.