mirror of
https://github.com/saymrwulf/onnxruntime.git
synced 2026-07-30 20:18:08 +00:00
Exclude implicit inputs from dump of encoder feeds in beam search (#12222)
fix encoder feeds dump
This commit is contained in:
parent
66978c7ef5
commit
0c319d6e94
2 changed files with 2 additions and 4 deletions
|
|
@ -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]);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -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])
|
||||
|
|
|
|||
Loading…
Reference in a new issue