Skip to content

Commit

Permalink
It starts working if vec.shape is [768, 1] instead of [768]
Browse files Browse the repository at this point in the history
  • Loading branch information
AXKuhta committed Aug 23, 2022
1 parent d000d73 commit 75ad160
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion RWKV-v4/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@
vec_d.fill(5)

const mat = new ort.Tensor('float32', mat_d, [768, 768])
const vec = new ort.Tensor('float32', vec_d, [768])
const vec = new ort.Tensor('float32', vec_d, [768, 1])

// prepare feeds. use model input names as keys.
var feeds = { mat: mat, vec: vec }
Expand Down
2 changes: 1 addition & 1 deletion RWKV-v4/matmul_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ def export():
model = MATMUL()

mat = torch.rand([768, 768])
vec = torch.rand([768])
vec = torch.rand([768, 1])

torch.onnx.export(model, args=(mat, vec), f="matmul.onnx", input_names = ["mat", "vec"], output_names = ["x"], verbose=True)

Expand Down

0 comments on commit 75ad160

Please sign in to comment.