payload: {"action":"created","issue":{"url":"https://api.github.com/repos/microsoft/onnxruntime/issues/1212","repository_url":"https://api.github.com/repos/microsoft/onnxruntime","labels_url":"https://api.github.com/repos/microsoft/onnxruntime/issues/1212/labels{/name}","comments_url":"https://api.github.com/repos/microsoft/onnxruntime/issues/1212/comments","events_url":"https://api.github.com/repos/microsoft/onnxruntime/issues/1212/events","html_url":"https://github.com/microsoft/onnxruntime/issues/1212","id":455184115,"node_id":"MDU6SXNzdWU0NTUxODQxMTU=","number":1212,"title":"[TypeInferenceError] Graph attribute inferencing failed","user":{"login":"vsooda","id":5305112,"node_id":"MDQ6VXNlcjUzMDUxMTI=","avatar_url":"https://avatars3.githubusercontent.com/u/5305112?v=4","gravatar_id":"","url":"https://api.github.com/users/vsooda","html_url":"https://github.com/vsooda","followers_url":"https://api.github.com/users/vsooda/followers","following_url":"https://api.github.com/users/vsooda/following{/other_user}","gists_url":"https://api.github.com/users/vsooda/gists{/gist_id}","starred_url":"https://api.github.com/users/vsooda/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/vsooda/subscriptions","organizations_url":"https://api.github.com/users/vsooda/orgs","repos_url":"https://api.github.com/users/vsooda/repos","events_url":"https://api.github.com/users/vsooda/events{/privacy}","received_events_url":"https://api.github.com/users/vsooda/received_events","type":"User","site_admin":false},"labels":[{"id":1122493979,"node_id":"MDU6TGFiZWwxMTIyNDkzOTc5","url":"https://api.github.com/repos/microsoft/onnxruntime/labels/bug","name":"bug","color":"d73a4a","default":true}],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":2,"created_at":"2019-06-12T12:27:17Z","updated_at":"2019-06-19T18:57:46Z","closed_at":null,"author_association":"NONE","body":"**Describe the bug**\r\nI use c api to load [tacotron](https://github.com/keithito/tacotron/blob/master/models/tacotron.py) model witch I had converted to onnx fp format. It report error:\r\n\r\n```\r\nLoad model from decoder_fp16.onnx failed:[TypeInferenceError] Graph attribute inferencing failed: Node:generic_loop_Loop__97 Tensor element type mismatch. 10 != 1\r\n```\r\n\r\nWhat is `Node:generic_loop_Loop__97`,  how can I debug.  \r\n\r\n**System information**\r\n- OS Platform and Distribution (e.g., Linux Ubuntu 16.04): macOS\r\n- ONNX Runtime installed from (source or binary): binary\r\n- ONNX Runtime version: 0.4.0\r\n- Python version: c++ cpu\r\n\r\n**To Reproduce**\r\nthe origin tensorflow model is something like:\r\n```\r\n      attention_cell = AttentionWrapper(\r\n        GRUCell(hp.attention_depth),\r\n        BahdanauAttention(hp.attention_depth, encoder_outputs),\r\n        alignment_history=True,\r\n        output_attention=False)                                                  # [N, T_in, attention_depth=256]\r\n      \r\n      # Apply prenet before concatenation in AttentionWrapper.\r\n      attention_cell = DecoderPrenetWrapper(attention_cell, is_training, hp.prenet_depths)\r\n\r\n      # Concatenate attention context vector and RNN cell output into a 2*attention_depth=512D vector.\r\n      concat_cell = ConcatOutputAndAttentionWrapper(attention_cell)              # [N, T_in, 2*attention_depth=512]\r\n\r\n      # Decoder (layers specified bottom to top):\r\n      decoder_cell = MultiRNNCell([\r\n          OutputProjectionWrapper(concat_cell, hp.decoder_depth),\r\n          ResidualWrapper(GRUCell(hp.decoder_depth)),\r\n          ResidualWrapper(GRUCell(hp.decoder_depth))\r\n        ], state_is_tuple=True)                                                  # [N, T_in, decoder_depth=256]\r\n\r\n      # Project onto r mel spectrograms (predict r outputs at each RNN step):\r\n      output_cell = OutputProjectionWrapper(decoder_cell, hp.num_mels * hp.outputs_per_step)\r\n      decoder_init_state = output_cell.zero_state(batch_size=batch_size, dtype=tf.float32)\r\n\r\n      if is_training:\r\n        helper = TacoTrainingHelper(inputs, mel_targets, hp.num_mels, hp.outputs_per_step)\r\n      else:\r\n        helper = TacoTestHelper(batch_size, hp.num_mels, hp.outputs_per_step)\r\n\r\n      (decoder_outputs, _), final_decoder_state, _ = tf.contrib.seq2seq.dynamic_decode(\r\n        BasicDecoder(output_cell, helper, decoder_init_state),\r\n        maximum_iterations=hp.max_iters)                                         # [N, T_out/r, M*r]\r\n\r\n      # Reshape outputs to be one output per entry\r\n      mel_outputs = tf.reshape(decoder_outputs, [batch_size, -1, hp.num_mels])   # [N, T_out, M]\r\n\r\n      # Add post-processing CBHG:\r\n      post_outputs = post_cbhg(mel_outputs, hp.num_mels, is_training,            # [N, T_out, postnet_depth=256]\r\n                               hp.postnet_depth)\r\n      linear_outputs = tf.layers.dense(post_outputs, hp.num_freq)                # [N, T_out, F]\r\n\r\n      # Grab alignments from the final decoder state:\r\n      alignments = tf.transpose(final_decoder_state[0].alignment_history.stack(), [1, 2, 0])\r\n\r\n```\r\n\r\n**Additional context**\r\nI can load model and inference with model float 32, but fail with fp 16.  I use the script to convert model from float 32 to float 16:\r\n\r\n```\r\nimport onnxmltools\r\nfrom onnxmltools.utils.float16_converter import convert_float_to_float16\r\ninput_onnx_model = 'decoder.onnx'\r\noutput_onnx_model = 'decoder_fp16.onnx'\r\nonnx_model = onnxmltools.utils.load_model(input_onnx_model)\r\nonnx_model = convert_float_to_float16(onnx_model)\r\nonnxmltools.utils.save_model(onnx_model, output_onnx_model)\r\n```\r\n"},"comment":{"url":"https://api.github.com/repos/microsoft/onnxruntime/issues/comments/503686918","html_url":"https://github.com/microsoft/onnxruntime/issues/1212#issuecomment-503686918","issue_url":"https://api.github.com/repos/microsoft/onnxruntime/issues/1212","id":503686918,"node_id":"MDEyOklzc3VlQ29tbWVudDUwMzY4NjkxOA==","user":{"login":"hariharans29","id":9969784,"node_id":"MDQ6VXNlcjk5Njk3ODQ=","avatar_url":"https://avatars2.githubusercontent.com/u/9969784?v=4","gravatar_id":"","url":"https://api.github.com/users/hariharans29","html_url":"https://github.com/hariharans29","followers_url":"https://api.github.com/users/hariharans29/followers","following_url":"https://api.github.com/users/hariharans29/following{/other_user}","gists_url":"https://api.github.com/users/hariharans29/gists{/gist_id}","starred_url":"https://api.github.com/users/hariharans29/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/hariharans29/subscriptions","organizations_url":"https://api.github.com/users/hariharans29/orgs","repos_url":"https://api.github.com/users/hariharans29/repos","events_url":"https://api.github.com/users/hariharans29/events{/privacy}","received_events_url":"https://api.github.com/users/hariharans29/received_events","type":"User","site_admin":false},"created_at":"2019-06-19T18:57:46Z","updated_at":"2019-06-19T18:57:46Z","author_association":"MEMBER","body":"Hi @vsooda,\r\n\r\nWere you able to resolve this ?\r\n\r\nThanks\r\n"}}
other: {"actor":{"display_login":"hariharans29"}}