storyandwine / LAGCN

Code and Datasets for "Predicting Drug-Disease Associations through Layer Attention Graph Convolutional Networks"
51 stars 15 forks source link

GraphConvolution中dropout的设置问题 #15

Closed porvinci closed 2 years ago

porvinci commented 2 years ago

layers.py文件中第22行

x = tf.nn.dropout(x, 1-self.dropout)

tf.nn.dropout的第2个参数含义为每个元素的值设置为0的概率,所以代码是否应该写为

x = tf.nn.dropout(x, self.dropout)
storyandwine commented 2 years ago

In TensorFlow 1.12, the second param is keep_prob, https://www.tensorflow.org/api_docs/python/tf/compat/v1/nn/dropout, which does not seem as tfv2.