microsoft / onnxjs

ONNX.js: run ONNX models using JavaScript

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Is there any function to ouput weight matrix for layers?

zhoyifan opened this issue · comments

There is not such API to get weights directly as far as I know. But there are 3 ways to get them:

  1. try use onnx(python package)
  2. use protobuf library to read from a ONNX model. The protobuf def file is at https://github.com/onnx/onnx/blob/master/onnx/onnx.proto3
  3. use https://github.com/lutzroeder/netron to visualize your model and dump the weights in GUI.