WARNING:tensorflow:From reside.py:528: The name tf.set_random_seed is deprecated. Please use tf.compat.v1.set_random_seed instead.
2020-01-01 16:09:15,529 - [INFO] - {'dataset': 'data/riedel_processed.pkl', 'gpu': '0', 'wGate': True, 'lstm_dim': 192, 'pos_dim': 16, 'type_dim': 50, 'alias_dim': 32, 'de_gcn_dim': 16, 'de_layers': 1, 'dropout': 0.8, 'rec_dropout': 0.8, 'lr': 0.001, 'l2': 0.001, 'max_epochs': 2, 'batch_size': 32, 'chunk_size': 1000, 'restore': False, 'only_eval': False, 'opt': 'adam', 'eps': 1e-08, 'name': 'new_run', 'seed': 1234, 'log_dir': './log/', 'config_dir': './config/', 'embed_loc': './glove/glove.6B.50d.txt', 'embed_dim': 50}
{'alias_dim': 32,
'batch_size': 32,
'chunk_size': 1000,
'config_dir': './config/',
'dataset': 'data/riedel_processed.pkl',
'de_gcn_dim': 16,
'de_layers': 1,
'dropout': 0.8,
'embed_dim': 50,
'embed_loc': './glove/glove.6B.50d.txt',
'eps': 1e-08,
'gpu': '0',
'l2': 0.001,
'log_dir': './log/',
'lr': 0.001,
'lstm_dim': 192,
'max_epochs': 2,
'name': 'new_run',
'only_eval': False,
'opt': 'adam',
'pos_dim': 16,
'rec_dropout': 0.8,
'restore': False,
'seed': 1234,
'type_dim': 50,
'wGate': True}
WARNING:tensorflow:
The TensorFlow contrib module will not be included in TensorFlow 2.0.
For more information, please see:
2020-01-01 16:09:36,994 - [INFO] - Document count [train]: 292459, [test]: 96676
WARNING:tensorflow:From reside.py:58: The name tf.placeholder is deprecated. Please use tf.compat.v1.placeholder instead.
WARNING:tensorflow:From reside.py:82: The name tf.placeholder_with_default is deprecated. Please use tf.compat.v1.placeholder_with_default instead.
WARNING:tensorflow:From reside.py:360: The name tf.variable_scope is deprecated. Please use tf.compat.v1.variable_scope instead.
WARNING:tensorflow:From reside.py:362: The name tf.get_variable is deprecated. Please use tf.compat.v1.get_variable instead.
WARNING:tensorflow:From reside.py:383: GRUCell.init (from tensorflow.python.ops.rnn_cell_impl) is deprecated and will be removed in a future version.
Instructions for updating:
This class is equivalent as tf.keras.layers.GRUCell, and will be replaced by that in Tensorflow 2.0.
WARNING:tensorflow:From reside.py:385: bidirectional_dynamic_rnn (from tensorflow.python.ops.rnn) is deprecated and will be removed in a future version.
Instructions for updating:
Please use keras.layers.Bidirectional(keras.layers.RNN(cell))
, which is equivalent to this API
WARNING:tensorflow:From /usr/local/lib/python3.6/dist-packages/tensorflow_core/python/ops/rnn.py:464: dynamic_rnn (from tensorflow.python.ops.rnn) is deprecated and will be removed in a future version.
Instructions for updating:
Please use keras.layers.RNN(cell)
, which is equivalent to this API
WARNING:tensorflow:From /usr/local/lib/python3.6/dist-packages/tensorflow_core/python/ops/rnn_cell_impl.py:559: Layer.add_variable (from tensorflow.python.keras.engine.base_layer) is deprecated and will be removed in a future version.
Instructions for updating:
Please use layer.add_weight
method instead.
WARNING:tensorflow:From /usr/local/lib/python3.6/dist-packages/tensorflow_core/python/ops/rnn_cell_impl.py:565: calling Constant.init (from tensorflow.python.ops.init_ops) with dtype is deprecated and will be removed in a future version.
Instructions for updating:
Call initializer instance with the dtype argument instead of passing it to the constructor
WARNING:tensorflow:From /usr/local/lib/python3.6/dist-packages/tensorflow_core/python/ops/rnn_cell_impl.py:575: calling Zeros.init (from tensorflow.python.ops.init_ops) with dtype is deprecated and will be removed in a future version.
Instructions for updating:
Call initializer instance with the dtype argument instead of passing it to the constructor
WARNING:tensorflow:From /usr/local/lib/python3.6/dist-packages/tensorflow_core/python/ops/rnn.py:244: where (from tensorflow.python.ops.array_ops) is deprecated and will be removed in a future version.
Instructions for updating:
Use tf.where in 2.0, which has the same broadcast rule as np.where
WARNING:tensorflow:From reside.py:283: The name tf.sparse_transpose is deprecated. Please use tf.sparse.transpose instead.
WARNING:tensorflow:From reside.py:284: The name tf.sparse_tensor_dense_matmul is deprecated. Please use tf.sparse.sparse_dense_matmul instead.
WARNING:tensorflow:From reside.py:287: calling dropout (from tensorflow.python.ops.nn_ops) with keep_prob is deprecated and will be removed in a future version.
Instructions for updating:
Please use rate
instead of keep_prob
. Rate should be set to rate = 1 - keep_prob
.
WARNING:tensorflow:From reside.py:458: The name tf.nn.xw_plus_b is deprecated. Please use tf.compat.v1.nn.xw_plus_b instead.
WARNING:tensorflow:From /content/RESIDE/base.py:277: The name tf.get_collection is deprecated. Please use tf.compat.v1.get_collection instead.
WARNING:tensorflow:From /content/RESIDE/base.py:277: The name tf.GraphKeys is deprecated. Please use tf.compat.v1.GraphKeys instead.
WARNING:tensorflow:From /content/RESIDE/base.py:294: The name tf.train.AdamOptimizer is deprecated. Please use tf.compat.v1.train.AdamOptimizer instead.
WARNING:tensorflow:From /content/RESIDE/base.py:39: The name tf.summary.scalar is deprecated. Please use tf.compat.v1.summary.scalar instead.
WARNING:tensorflow:From /content/RESIDE/base.py:40: The name tf.summary.merge_all is deprecated. Please use tf.compat.v1.summary.merge_all instead.
WARNING:tensorflow:From reside.py:535: The name tf.ConfigProto is deprecated. Please use tf.compat.v1.ConfigProto instead.
WARNING:tensorflow:From reside.py:537: The name tf.Session is deprecated. Please use tf.compat.v1.Session instead.
2020-01-01 16:09:45.004854: I tensorflow/core/platform/cpu_feature_guard.cc:142] Your CPU supports instructions that this TensorFlow binary was not compiled to use: AVX512F
2020-01-01 16:09:45.112223: I tensorflow/core/platform/profile_utils/cpu_utils.cc:94] CPU Frequency: 2000179999 Hz
2020-01-01 16:09:45.115414: I tensorflow/compiler/xla/service/service.cc:168] XLA service 0x2ec5480 initialized for platform Host (this does not guarantee that XLA will be used). Devices:
2020-01-01 16:09:45.115452: I tensorflow/compiler/xla/service/service.cc:176] StreamExecutor device (0): Host, Default Version
2020-01-01 16:09:45.148794: I tensorflow/stream_executor/platform/default/dso_loader.cc:44] Successfully opened dynamic library libcuda.so.1
2020-01-01 16:09:45.317052: I tensorflow/stream_executor/cuda/cuda_gpu_executor.cc:983] successful NUMA node read from SysFS had negative value (-1), but there must be at least one NUMA node, so returning NUMA node zero
2020-01-01 16:09:45.317793: I tensorflow/compiler/xla/service/service.cc:168] XLA service 0x2ec52c0 initialized for platform CUDA (this does not guarantee that XLA will be used). Devices:
2020-01-01 16:09:45.317823: I tensorflow/compiler/xla/service/service.cc:176] StreamExecutor device (0): Tesla P100-PCIE-16GB, Compute Capability 6.0
2020-01-01 16:09:45.318236: I tensorflow/stream_executor/cuda/cuda_gpu_executor.cc:983] successful NUMA node read from SysFS had negative value (-1), but there must be at least one NUMA node, so returning NUMA node zero
2020-01-01 16:09:45.318739: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1618] Found device 0 with properties:
name: Tesla P100-PCIE-16GB major: 6 minor: 0 memoryClockRate(GHz): 1.3285
pciBusID: 0000:00:04.0
2020-01-01 16:09:45.339971: I tensorflow/stream_executor/platform/default/dso_loader.cc:44] Successfully opened dynamic library libcudart.so.10.1
...
2020-01-01 17:37:50,009 - [INFO] - E:1 Train Accuracy (163552/292459): 95.643 0.14488 new_run 94.474
2020-01-01 17:37:53,422 - [INFO] - E:1 Train Accuracy (163872/292459): 95.644 0.14483 new_run 94.474
2020-01-01 17:37:57,689 - [INFO] - E:1 Train Accuracy (164192/292459): 95.644 0.14484 new_run 94.474
...
2020-01-01 18:01:56,983 - [INFO] - E:1 Train Accuracy (287712/292459): 95.664 0.13823 new_run 94.474
2020-01-01 18:02:00,141 - [INFO] - E:1 Train Accuracy (288032/292459): 95.664 0.13822 new_run 94.474
2020-01-01 18:02:06,500 - [INFO] - E:1 Train Accuracy (288352/292459): 95.665 0.13823 new_run 94.474
2020-01-01 18:02:09,965 - [INFO] - E:1 Train Accuracy (288672/292459): 95.663 0.13825 new_run 94.474
2020-01-01 18:02:13,536 - [INFO] - E:1 Train Accuracy (288992/292459): 95.663 0.13824 new_run 94.474
2020-01-01 18:02:17,056 - [INFO] - E:1 Train Accuracy (289312/292459): 95.662 0.13824 new_run 94.474
...
2020-01-01 18:02:53,866 - [INFO] - E:1 Train Accuracy (292192/292459): 95.658 0.13819 new_run 94.474
2020-01-01 18:02:56,696 - [INFO] - Training Loss:0.1381186544895172, Accuracy: 95.6602156162262
2020-01-01 18:02:56,697 - [INFO] - [Epoch 1]: Training Loss: 0.13812, Training Acc: 95.66
INFO:tensorflow:Restoring parameters from checkpoints/new_run/best_model
2020-01-01 18:02:57,883 - [INFO] - Evaluating on Test (32/96676): 96.875 0.085916 new_run
2020-01-01 18:03:17,846 - [INFO] - Evaluating on Test (3232/96676): 97.556 0.081206 new_run
2020-01-01 18:03:37,863 - [INFO] - Evaluating on Test (6432/96676): 97.683 0.079807 new_run
2020-01-01 18:03:57,750 - [INFO] - Evaluating on Test (9632/96676): 97.799 0.077063 new_run
2020-01-01 18:04:18,123 - [INFO] - Evaluating on Test (12832/96676): 97.81 0.080971 new_run
2020-01-01 18:04:38,361 - [INFO] - Evaluating on Test (16032/96676): 97.754 0.084688 new_run
2020-01-01 18:04:58,311 - [INFO] - Evaluating on Test (19232/96676): 97.754 0.08457 new_run
2020-01-01 18:05:17,626 - [INFO] - Evaluating on Test (22432/96676): 97.762 0.084693 new_run
2020-01-01 18:05:36,826 - [INFO] - Evaluating on Test (25632/96676): 97.749 0.085677 new_run
2020-01-01 18:05:55,400 - [INFO] - Evaluating on Test (28832/96676): 97.739 0.084639 new_run
2020-01-01 18:06:14,745 - [INFO] - Evaluating on Test (32032/96676): 97.746 0.083909 new_run
2020-01-01 18:06:34,200 - [INFO] - Evaluating on Test (35232/96676): 97.775 0.083634 new_run
2020-01-01 18:06:54,216 - [INFO] - Evaluating on Test (38432/96676): 97.77 0.083335 new_run
2020-01-01 18:07:14,300 - [INFO] - Evaluating on Test (41632/96676): 97.771 0.082361 new_run
2020-01-01 18:07:34,194 - [INFO] - Evaluating on Test (44832/96676): 97.769 0.082067 new_run
2020-01-01 18:07:52,966 - [INFO] - Evaluating on Test (48032/96676): 97.772 0.081363 new_run
2020-01-01 18:08:12,089 - [INFO] - Evaluating on Test (51232/96676): 97.787 0.081485 new_run
2020-01-01 18:08:32,589 - [INFO] - Evaluating on Test (54432/96676): 97.766 0.082547 new_run
2020-01-01 18:08:52,092 - [INFO] - Evaluating on Test (57632/96676): 97.756 0.082637 new_run
2020-01-01 18:09:11,821 - [INFO] - Evaluating on Test (60832/96676): 97.756 0.083055 new_run
2020-01-01 18:09:31,836 - [INFO] - Evaluating on Test (64032/96676): 97.759 0.082874 new_run
2020-01-01 18:09:51,079 - [INFO] - Evaluating on Test (67232/96676): 97.764 0.082702 new_run
2020-01-01 18:10:10,474 - [INFO] - Evaluating on Test (70432/96676): 97.769 0.082184 new_run
2020-01-01 18:10:30,843 - [INFO] - Evaluating on Test (73632/96676): 97.758 0.082614 new_run
2020-01-01 18:10:50,781 - [INFO] - Evaluating on Test (76832/96676): 97.748 0.082557 new_run
2020-01-01 18:11:09,929 - [INFO] - Evaluating on Test (80032/96676): 97.75 0.082459 new_run
2020-01-01 18:11:29,581 - [INFO] - Evaluating on Test (83232/96676): 97.75 0.082377 new_run
2020-01-01 18:11:48,420 - [INFO] - Evaluating on Test (86432/96676): 97.743 0.082698 new_run
2020-01-01 18:12:08,105 - [INFO] - Evaluating on Test (89632/96676): 97.747 0.082548 new_run
2020-01-01 18:12:27,132 - [INFO] - Evaluating on Test (92832/96676): 97.758 0.082317 new_run
2020-01-01 18:12:47,005 - [INFO] - Evaluating on Test (96032/96676): 97.762 0.082606 new_run
2020-01-01 18:12:50,929 - [INFO] - Test Accuracy: 1.0
2020-01-01 18:12:53,532 - [INFO] - Final results: Prec:0.39756866276273045 | Rec:0.5014196479244667 | F1:0.44349572585304514 | Area:0.3837338804383346
Traceback (most recent call last):
File "reside.py", line 539, in
model.fit(sess)
File "/content/RESIDE/base.py", line 498, in fit
one_100, one_200, one_300 = self.getPscore(self.test_one, label='P@1 Evaluation')
File "/content/RESIDE/base.py", line 432, in getPscore
test_loss, test_acc, y, y_pred, logit_list, y_hot = self.predict(sess, data, label)
NameError: name 'sess' is not defined