Exclude implicit inputs from dump of encoder feeds in beam search (#12222)

fix encoder feeds dump
This commit is contained in:
Tianlei Wu 2022-07-19 09:44:12 -07:00 committed by GitHub
parent 66978c7ef5
commit 0c319d6e94
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 2 additions and 4 deletions

View file

@ -143,7 +143,7 @@ Status BeamSearchT5<T>::Execute(const FeedsFetchesManager& encoder_feeds_fetches
#ifdef DEBUG_BEAM_SEARCH
const IConsoleDumper* dumper = this->GetConsoleDumper();
for (size_t i = 0; i < encoder_feeds.size(); i++) {
for (int i = 0; i < this->encoder_subgraph_.num_subgraph_inputs; i++) {
dumper->Print("encoder_feeds", static_cast<int>(i), true);
dumper->Print("", encoder_feeds[i]);
}

View file

@ -677,7 +677,7 @@ def remove_shared_initializers(
if value_info.name in mapping_initializers_2:
value_info.name = mapping_initializers_2[value_info.name]
# Rename nodes inputs in graph 1:
# Rename nodes inputs in graph 2:
for node in graph2.node:
for j in range(len(node.input)):
if node.input[j] in mapping_initializers_2:
@ -854,8 +854,6 @@ def convert_model(args: argparse.Namespace):
else:
node.attribute.append(onnx.helper.make_attribute("decoder", decoder_model.graph))
from onnx import TensorProto
# graph inputs
input_ids = onnx.helper.make_tensor_value_info("input_ids", TensorProto.INT32, ["batch_size", "sequence_length"])
max_length = onnx.helper.make_tensor_value_info("max_length", TensorProto.INT32, [1])