Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How to read the output file by Python #11

Open
Zziwei opened this issue Jun 12, 2019 · 2 comments
Open

How to read the output file by Python #11

Zziwei opened this issue Jun 12, 2019 · 2 comments

Comments

@Zziwei
Copy link

Zziwei commented Jun 12, 2019

Hi,

Thank you so much for the efficient code. I do not know how to read the binary output file by python. Can you provide some information about that?

@xgfs
Copy link
Owner

xgfs commented Jun 12, 2019

Hi,

You can use np.fromfile('embedding.bin', np.float32).reshape(num_nodes, embedding_dim). Note that this will load it into numpy array that has the same order as the converted graph, see https://github.com/xgfs/deepwalk-c/blob/master/deepwalk/cli.py#L69-L72

Best,
Anton

@Zziwei
Copy link
Author

Zziwei commented Jun 12, 2019 via email

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants