Compare commits
10 Commits
0afab746b2
...
b80531bad7
Author | SHA1 | Date | |
---|---|---|---|
b80531bad7 | |||
|
a0fdef95dc | ||
|
73f8d37f14 | ||
|
c2adbc287d | ||
|
d928dc72f6 | ||
|
74fb87dc6f | ||
|
b48b92b5e7 | ||
|
684801b0ca | ||
|
8572d2f5d8 | ||
|
9f23babfe3 |
@ -1,4 +1,4 @@
|
|||||||
FROM gcr.io/tensorflow/tensorflow:1.3.0
|
FROM tensorflow/tensorflow:1.3.0
|
||||||
|
|
||||||
RUN pip install networkx==1.11
|
RUN pip install networkx==1.11
|
||||||
RUN rm /notebooks/*
|
RUN rm /notebooks/*
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
FROM gcr.io/tensorflow/tensorflow:1.3.0-gpu
|
FROM tensorflow/tensorflow:1.3.0-gpu
|
||||||
|
|
||||||
RUN pip install networkx==1.11
|
RUN pip install networkx==1.11
|
||||||
RUN rm /notebooks/*
|
RUN rm /notebooks/*
|
||||||
|
@ -7,6 +7,7 @@
|
|||||||
|
|
||||||
### Overview
|
### Overview
|
||||||
|
|
||||||
|
|
||||||
This directory contains code necessary to run the GraphSage algorithm.
|
This directory contains code necessary to run the GraphSage algorithm.
|
||||||
GraphSage can be viewed as a stochastic generalization of graph convolutions, and it is especially useful for massive, dynamic graphs that contain rich feature information.
|
GraphSage can be viewed as a stochastic generalization of graph convolutions, and it is especially useful for massive, dynamic graphs that contain rich feature information.
|
||||||
See our [paper](https://arxiv.org/pdf/1706.02216.pdf) for details on the algorithm.
|
See our [paper](https://arxiv.org/pdf/1706.02216.pdf) for details on the algorithm.
|
||||||
@ -35,7 +36,11 @@ If you make use of this code or the GraphSage algorithm in your work, please cit
|
|||||||
|
|
||||||
### Requirements
|
### Requirements
|
||||||
|
|
||||||
Recent versions of TensorFlow, numpy, scipy, and networkx are required (but networkx must be <=1.11). To guarantee that you have the right package versions, you can use [docker](https://docs.docker.com/) to easily set up a virtual environment. See the Docker subsection below for more info.
|
Recent versions of TensorFlow, numpy, scipy, sklearn, and networkx are required (but networkx must be <=1.11). You can install all the required packages using the following command:
|
||||||
|
|
||||||
|
$ pip install -r requirements.txt
|
||||||
|
|
||||||
|
To guarantee that you have the right package versions, you can use [docker](https://docs.docker.com/) to easily set up a virtual environment. See the Docker subsection below for more info.
|
||||||
|
|
||||||
#### Docker
|
#### Docker
|
||||||
|
|
||||||
|
@ -477,7 +477,7 @@ class Node2VecModel(GeneralizedModel):
|
|||||||
|
|
||||||
def _loss(self):
|
def _loss(self):
|
||||||
aff = tf.reduce_sum(tf.multiply(self.outputs1, self.outputs2), 1) + self.outputs2_bias
|
aff = tf.reduce_sum(tf.multiply(self.outputs1, self.outputs2), 1) + self.outputs2_bias
|
||||||
neg_aff = tf.matmul(self.outputs2, tf.transpose(self.neg_outputs)) + self.neg_outputs_bias
|
neg_aff = tf.matmul(self.outputs1, tf.transpose(self.neg_outputs)) + self.neg_outputs_bias
|
||||||
true_xent = tf.nn.sigmoid_cross_entropy_with_logits(
|
true_xent = tf.nn.sigmoid_cross_entropy_with_logits(
|
||||||
labels=tf.ones_like(aff), logits=aff)
|
labels=tf.ones_like(aff), logits=aff)
|
||||||
negative_xent = tf.nn.sigmoid_cross_entropy_with_logits(
|
negative_xent = tf.nn.sigmoid_cross_entropy_with_logits(
|
||||||
|
@ -8,7 +8,7 @@ import os
|
|||||||
|
|
||||||
import networkx as nx
|
import networkx as nx
|
||||||
from networkx.readwrite import json_graph
|
from networkx.readwrite import json_graph
|
||||||
version_info = map(int, nx.__version__.split('.'))
|
version_info = list(map(int, nx.__version__.split('.')))
|
||||||
major = version_info[0]
|
major = version_info[0]
|
||||||
minor = version_info[1]
|
minor = version_info[1]
|
||||||
assert (major <= 1) and (minor <= 11), "networkx major version > 1.11"
|
assert (major <= 1) and (minor <= 11), "networkx major version > 1.11"
|
||||||
|
25
requirements.txt
Normal file
25
requirements.txt
Normal file
@ -0,0 +1,25 @@
|
|||||||
|
absl-py==0.2.2
|
||||||
|
astor==0.6.2
|
||||||
|
backports.weakref==1.0.post1
|
||||||
|
bleach==1.5.0
|
||||||
|
decorator==4.3.0
|
||||||
|
enum34==1.1.6
|
||||||
|
funcsigs==1.0.2
|
||||||
|
futures==3.2.0
|
||||||
|
gast==0.2.0
|
||||||
|
grpcio==1.12.1
|
||||||
|
html5lib==0.9999999
|
||||||
|
Markdown==2.6.11
|
||||||
|
mock==2.0.0
|
||||||
|
networkx==1.11
|
||||||
|
numpy==1.14.5
|
||||||
|
pbr==4.0.4
|
||||||
|
protobuf==3.6.0
|
||||||
|
scikit-learn==0.19.1
|
||||||
|
scipy==1.1.0
|
||||||
|
six==1.11.0
|
||||||
|
sklearn==0.0
|
||||||
|
tensorboard==1.8.0
|
||||||
|
tensorflow==1.8.0
|
||||||
|
termcolor==1.1.0
|
||||||
|
Werkzeug==0.14.1
|
Loading…
Reference in New Issue
Block a user