Closed purabimanna closed 5 years ago
It seems like you are running the example on CPU? We implement the BiDAF model with CuDNN based LSTM to gain 10x speedup, so it's recommended to use gpu version of tf.
If you insist using CPU, you can change the LSTM layer in BiDAF, e.g. https://github.com/sogou/SMRCToolkit/blob/master/sogou_mrc/model/bidaf.py#L92 to its vanilla version https://github.com/sogou/SMRCToolkit/blob/master/sogou_mrc/nn/recurrent.py#L20 by removing the "cudnn" prefix :)
yes i was using cpu.thanks for the solution
/home/purabi/anaconda3/envs/smrc/bin/python /home/purabi/SMRCToolkit-master/examples/run_bidaf/main.py WARNING: Logging before flag parsing goes to stderr. W0415 17:05:55.514122 139645281789760 init.py:56] Some hub symbols are not available because TensorFlow version is less than 1.14 87599it [30:24, 48.01it/s] 10570it [03:26, 51.23it/s] 100%|██████████| 98169/98169 [01:22<00:00, 1194.49it/s]
WARNING: The TensorFlow contrib module will not be included in TensorFlow 2.0. For more information, please see:
2019-04-15 17:41:39.343160: I tensorflow/core/platform/cpu_feature_guard.cc:141] Your CPU supports instructions that this TensorFlow binary was not compiled to use: AVX2 FMA 2019-04-15 17:41:39.370044: I tensorflow/core/platform/profile_utils/cpu_utils.cc:94] CPU Frequency: 2712000000 Hz 2019-04-15 17:41:39.370318: I tensorflow/compiler/xla/service/service.cc:150] XLA service 0x55756a467530 executing computations on platform Host. Devices: 2019-04-15 17:41:39.370343: I tensorflow/compiler/xla/service/service.cc:158] StreamExecutor device (0):,
Traceback (most recent call last):
File "/home/purabi/anaconda3/envs/smrc/lib/python3.6/site-packages/tensorflow/python/client/session.py", line 1334, in _do_call
return fn(*args)
File "/home/purabi/anaconda3/envs/smrc/lib/python3.6/site-packages/tensorflow/python/client/session.py", line 1317, in _run_fn
self._extend_graph()
File "/home/purabi/anaconda3/envs/smrc/lib/python3.6/site-packages/tensorflow/python/client/session.py", line 1352, in _extend_graph
tf_session.ExtendSession(self._session)
tensorflow.python.framework.errors_impl.InvalidArgumentError: No OpKernel was registered to support Op 'CudnnRNN' used by {{node cu_dnnlstm/CudnnRNN}}with these attrs: [is_training=true, seed2=0, dropout=0, seed=0, T=DT_FLOAT, input_mode="linear_input", direction="unidirectional", rnn_mode="lstm"]
Registered devices: [CPU, XLA_CPU]
Registered kernels: