From 099358675899f759110ad8ccecc22c2fab9b1888 Mon Sep 17 00:00:00 2001 From: JulianPani Date: Mon, 14 Oct 2019 02:09:53 +0300 Subject: [PATCH] remove usage of DUMMY_INPUTS Hey @thomwolf This change https://github.com/huggingface/transformers/commit/da26bae61b8c1e741fdc6735d46c61b43f649561#diff-8ddce309e88e8eb5b4d02228fd8881daL28-L29 removed the constant, but one usage of that constant remains in the code. --- transformers/modeling_tf_pytorch_utils.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/transformers/modeling_tf_pytorch_utils.py b/transformers/modeling_tf_pytorch_utils.py index 5a70d9a72b..88ce4d4610 100644 --- a/transformers/modeling_tf_pytorch_utils.py +++ b/transformers/modeling_tf_pytorch_utils.py @@ -198,7 +198,7 @@ def load_tf2_checkpoint_in_pytorch_model(pt_model, tf_checkpoint_path, tf_inputs tf_model = tf_model_class(pt_model.config) if tf_inputs is None: - tf_inputs = tf.constant(DUMMY_INPUTS) + tf_inputs = tf_model.dummy_inputs if tf_inputs is not None: tfo = tf_model(tf_inputs, training=False) # Make sure model is built