89cc3b59e4c83baf94b96e4b1f8752779009595f,tensorflow_hub/keras_layer_test.py,KerasLayerTest,test_keras_layer_fails_if_output_is_not_dict,#KerasLayerTest#,891
Before Change
signature_outputs_as_dict=True, output_key="output")
def test_keras_layer_fails_if_output_is_not_dict(self):
path = test_utils.get_test_data_path("saved_model_v2_mini")
layer = hub.KerasLayer(path, output_key="output_0")
with self.assertRaisesRegex(
ValueError, "Specifying `output_key` is forbidden if output type *"):
layer(10.)
After Change
output_key="output")
def test_keras_layer_fails_if_output_is_not_dict(self):
export_dir = os.path.join(self.get_temp_dir(), "saved_model_v2_mini")
_save_plus_one_saved_model_v2(export_dir, save_from_keras=False)
layer = hub.KerasLayer(export_dir, output_key="output_0")
with self.assertRaisesRegex(
ValueError, "Specifying `output_key` is forbidden if output type *"):
layer(10.)
In pattern: SUPERPATTERN
Frequency: 6
Non-data size: 7
Instances
Project Name: tensorflow/hub
Commit Name: 89cc3b59e4c83baf94b96e4b1f8752779009595f
Time: 2020-06-15
Author: no-reply@google.com
File Name: tensorflow_hub/keras_layer_test.py
Class Name: KerasLayerTest
Method Name: test_keras_layer_fails_if_output_is_not_dict
Project Name: tensorflow/hub
Commit Name: 89cc3b59e4c83baf94b96e4b1f8752779009595f
Time: 2020-06-15
Author: no-reply@google.com
File Name: tensorflow_hub/keras_layer_test.py
Class Name: KerasLayerTest
Method Name: test_keras_layer_fails_if_with_outputs_as_dict_but_no_signature
Project Name: tensorflow/hub
Commit Name: 89cc3b59e4c83baf94b96e4b1f8752779009595f
Time: 2020-06-15
Author: no-reply@google.com
File Name: tensorflow_hub/keras_layer_test.py
Class Name: KerasLayerTest
Method Name: test_keras_layer_fails_if_signature_trainable
Project Name: tensorflow/hub
Commit Name: 89cc3b59e4c83baf94b96e4b1f8752779009595f
Time: 2020-06-15
Author: no-reply@google.com
File Name: tensorflow_hub/keras_layer_test.py
Class Name: KerasLayerTest
Method Name: test_keras_layer_fails_if_setting_both_output_key_and_as_dict
Project Name: tensorflow/hub
Commit Name: 89cc3b59e4c83baf94b96e4b1f8752779009595f
Time: 2020-06-15
Author: no-reply@google.com
File Name: tensorflow_hub/keras_layer_test.py
Class Name: KerasLayerTest
Method Name: test_keras_layer_fails_if_saved_model_v2_with_tags
Project Name: tensorflow/hub
Commit Name: 89cc3b59e4c83baf94b96e4b1f8752779009595f
Time: 2020-06-15
Author: no-reply@google.com
File Name: tensorflow_hub/keras_layer_test.py
Class Name: KerasLayerTest
Method Name: test_keras_layer_fails_if_signature_output_not_specified