You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Description
Hello,
You mention in the README of the project that tested models include BERT.
I am trying to prepare BERT model for usage with WONNX.
When I try to run nnx prepare -i ./data/models/bert.onnx ./data/models/bert-prepared.onnx --set batch_size=1
I get the following error: Setting dimension param 0 (batch_size) to value 1 for /bert/Unsqueeze_output_0 Setting dimension param 0 (batch_size) to value 1 for /bert/Unsqueeze_1_output_0 Setting dimension param 0 (batch_size) to value 1 for /bert/Cast_output_0 Setting dimension param 0 (batch_size) to value 1 for /bert/Sub_output_0 Setting dimension param 0 (batch_size) to value 1 for /bert/Mul_output_0 Setting dimension param 0 (batch_size) to value 1 for /bert/embeddings/word_embeddings/Gather_output_0 Setting dimension param 0 (batch_size) to value 1 for /bert/embeddings/Add_output_0 Setting dimension param 0 (batch_size) to value 1 for input_ids Setting dimension param 0 (batch_size) to value 1 for attention_mask Setting dimension param 0 (batch_size) to value 1 for logits Error: Could not infer shapes: missing shape for input attention_mask
Can you look into it and hint what should I do differently?
To Reproduce
Steps to reproduce the behavior:
Generate ONNX model from HF BERT according to their sample script:
Description
Hello,
You mention in the README of the project that tested models include BERT.
I am trying to prepare BERT model for usage with WONNX.
When I try to run
nnx prepare -i ./data/models/bert.onnx ./data/models/bert-prepared.onnx --set batch_size=1
I get the following error:
Setting dimension param 0 (batch_size) to value 1 for /bert/Unsqueeze_output_0 Setting dimension param 0 (batch_size) to value 1 for /bert/Unsqueeze_1_output_0 Setting dimension param 0 (batch_size) to value 1 for /bert/Cast_output_0 Setting dimension param 0 (batch_size) to value 1 for /bert/Sub_output_0 Setting dimension param 0 (batch_size) to value 1 for /bert/Mul_output_0 Setting dimension param 0 (batch_size) to value 1 for /bert/embeddings/word_embeddings/Gather_output_0 Setting dimension param 0 (batch_size) to value 1 for /bert/embeddings/Add_output_0 Setting dimension param 0 (batch_size) to value 1 for input_ids Setting dimension param 0 (batch_size) to value 1 for attention_mask Setting dimension param 0 (batch_size) to value 1 for logits Error: Could not infer shapes: missing shape for input attention_mask
Can you look into it and hint what should I do differently?
To Reproduce
Steps to reproduce the behavior:
nnx prepare -i ./data/models/bert.onnx ./data/models/bert-prepared.onnx --set batch_size=1
Expected behavior
Command should generate the prepared model without errors.
Desktop:
The text was updated successfully, but these errors were encountered: