Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

TypeError: ('Keyword argument not understood:', 'use_chrono_initialization') #19

Open
Huii opened this issue Oct 22, 2019 · 4 comments
Open

Comments

@Huii
Copy link

Huii commented Oct 22, 2019

First of all: Thanks a lot for providing this code!

Unfortuantely, I get an error whenever I try to test the trained models, which were written to the disk. You can find the traceback below:

Traceback (most recent call last):
  File "pathToProject\Main.py", line 87, in <module>
    ANNs.evaluateSavedModels(ALSTM_FCNOutputFolderAllData,modelTypeString,annotatedDataDictionaryWithoutNoiseAndWithoutExcludedDataTruncated,resultsFolderAllData,scalerID,truncationIndizes,annotationIndizes)
  File "pathToProject\ANNs.py", line 260, in evaluateSavedModels
    [predictions,currentModelSummary] = loadAndEvaluateGivenModel(completePathToModelFile,testXScaled)
  File "pathToProject\ANNs.py", line 75, in loadAndEvaluateGivenModel
    model = load_model(pathToModel,custom_objects={'AttentionLSTM': AttentionLSTM})
  File "pathToAnaconda\Anaconda\lib\site-packages\keras\engine\saving.py", line 492, in load_wrapper
    return load_function(*args, **kwargs)
  File "pathToAnaconda\Anaconda\lib\site-packages\keras\engine\saving.py", line 584, in load_model
    model = _deserialize_model(h5dict, custom_objects, compile)
  File "pathToAnaconda\Anaconda\lib\site-packages\keras\engine\saving.py", line 274, in _deserialize_model
    model = model_from_config(model_config, custom_objects=custom_objects)
  File "pathToAnaconda\Anaconda\lib\site-packages\keras\engine\saving.py", line 627, in model_from_config
    return deserialize(config, custom_objects=custom_objects)
  File "pathToAnaconda\Anaconda\lib\site-packages\keras\layers\__init__.py", line 168, in deserialize
    printable_module_name='layer')
  File "pathToAnaconda\Anaconda\lib\site-packages\keras\utils\generic_utils.py", line 147, in deserialize_keras_object
    list(custom_objects.items())))
  File "pathToAnaconda\Anaconda\lib\site-packages\keras\engine\network.py", line 1056, in from_config
    process_layer(layer_data)
  File "pathToAnaconda\Anaconda\lib\site-packages\keras\engine\network.py", line 1042, in process_layer
    custom_objects=custom_objects)
  File "pathToAnaconda\Anaconda\lib\site-packages\keras\layers\__init__.py", line 168, in deserialize
    printable_module_name='layer')
  File "pathToAnaconda\Anaconda\lib\site-packages\keras\utils\generic_utils.py", line 149, in deserialize_keras_object
    return cls.from_config(config['config'])
  File "pathToLSTMCode/LSTM-FCN/utils\layer_utils.py", line 730, in from_config
    return cls(**config)
  File "pathToAnaconda\Anaconda\lib\site-packages\keras\legacy\interfaces.py", line 91, in wrapper
    return func(*args, **kwargs)
  File "pathToLSTMCode/LSTM-FCN/utils\layer_utils.py", line 596, in __init__
    **kwargs)
  File "pathToAnaconda\Anaconda\lib\site-packages\keras\layers\recurrent.py", line 410, in __init__
    super(RNN, self).__init__(**kwargs)
  File "pathToAnaconda\Anaconda\lib\site-packages\keras\engine\base_layer.py", line 147, in __init__
    raise TypeError('Keyword argument not understood:', kwarg)
TypeError: ('Keyword argument not understood:', 'use_chrono_initialization')

I'm using keras (Version: 2.3.1) and TensorFlow (Version: 2.0.0).

@titu1994
Copy link
Owner

Our codebase does not support this use_chrono_initialization value. May I ask where you found this flag ?

@Huii
Copy link
Author

Huii commented Oct 23, 2019

In your code it can be found in the file "layer_utils.py" for example.

@titu1994
Copy link
Owner

It's an unused flag, it can be removed from the get_config section.

@Huii
Copy link
Author

Huii commented Oct 23, 2019

Oh, ok. I, see. Thank you very much. In that case you can close this issue. I'll let you know if I run into another problem. :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants