R-NET-in-Keras icon indicating copy to clipboard operation
R-NET-in-Keras copied to clipboard

error while testing ur best model

Open akarsh42 opened this issue 7 years ago • 2 comments

:R-NET-in-Keras kh1095$ python predict.py --batch_size 100 --dev_data data/dev_data_str.pkl models/31-t3.05458271443-v3.27696280528.model prediction.json
Using TensorFlow backend.
/Users/kh1095/anaconda3/lib/python3.6/importlib/_bootstrap.py:219: RuntimeWarning: compiletime version 3.5 of module 'tensorflow.python.framework.fast_tensor_util' does not match runtime version 3.6
  return f(*args, **kwds)
Traceback (most recent call last):
  File "predict.py", line 15, in <module>
    from layers import Argmax
  File "/Users/kh1095/code/R-NET-in-Keras/layers/__init__.py", line 1, in <module>
    from QuestionAttnGRU import QuestionAttnGRU
ModuleNotFoundError: No module named 'QuestionAttnGRU'

akarsh42 avatar Feb 01 '18 05:02 akarsh42

In python2 throws the below error

python2 predict.py --batch_size 100 --dev_data data/dev_data_str.pkl models/31-t3.05458271443-v3.27696280528.model prediction.json
Using TensorFlow backend.
Preparing model...Traceback (most recent call last):
  File "predict.py", line 33, in <module>
    model = load_model(args.model, custom_objects())
  File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/keras/models.py", line 233, in load_model
    model = model_from_config(model_config, custom_objects=custom_objects)
  File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/keras/models.py", line 307, in model_from_config
    return layer_module.deserialize(config, custom_objects=custom_objects)
  File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/keras/layers/__init__.py", line 54, in deserialize
    printable_module_name='layer')
  File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/keras/utils/generic_utils.py", line 139, in deserialize_keras_object
    list(custom_objects.items())))
  File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/keras/engine/topology.py", line 2450, in from_config
    process_layer(layer_data)
  File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/keras/engine/topology.py", line 2447, in process_layer
    layer(input_tensors, **kwargs)
  File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/keras/engine/topology.py", line 571, in __call__
    self.build(input_shapes)
  File "/Users/kh1095/code/R-NET-in-Keras/layers/QuestionPooling.py", line 26, in build
    assert(isinstance(input_shape, list) and len(input_shape) == 5)
AssertionError

akarsh42 avatar Feb 01 '18 08:02 akarsh42

@akarsh42 - were you able to solve this?

TarunTater avatar Aug 11 '18 09:08 TarunTater