From 2176db877e7147765f386489f4f8d79d1f2572bf Mon Sep 17 00:00:00 2001 From: Aniketos07 <51787443+Aniketos07@users.noreply.github.com> Date: Thu, 27 Jan 2022 17:39:14 +0530 Subject: [PATCH] TF 2.0 Compatibility changes --- models/sparse_graph_model.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/models/sparse_graph_model.py b/models/sparse_graph_model.py index 689df01..57323bd 100644 --- a/models/sparse_graph_model.py +++ b/models/sparse_graph_model.py @@ -174,7 +174,7 @@ def __build_graph_propagation_model(self) -> tf.Tensor: cur_node_representations = self.__ops['projected_node_features'] last_residual_representations = tf.zeros_like(cur_node_representations) for layer_idx in range(self.params['graph_num_layers']): - with tf.variable_scope('gnn_layer_%i' % layer_idx): + with tf.compat.v1.variable_scope('gnn_layer_%i' % layer_idx): cur_node_representations = \ tf.nn.dropout(cur_node_representations, rate=1.0 - self.__placeholders['graph_layer_input_dropout_keep_prob']) if layer_idx % self.params['graph_residual_connection_every_num_layers'] == 0: