Skip to content

Where does model.jl come from in the README? #53

Open
@logankilpatrick

Description

@logankilpatrick

I am trying to follow the steps in the readme. I have downloaded the model, and it seems to load the weights file correctly despite giving me the below error:

julia> ONNX.load_model("model.onnx")
ERROR: KeyError: key :Gather not found
Stacktrace:
 [1] getindex(h::Dict{Symbol, Any}, key::Symbol)
   @ Base ./dict.jl:482
 [2] _graph(g::ONNX.Types.Graph)
   @ ONNX ~/.julia/packages/ONNX/iz0dL/src/graph/graph.jl:0
 [3] graph(g::ONNX.Types.Graph)
   @ ONNX ~/.julia/packages/ONNX/iz0dL/src/graph/graph.jl:92
 [4] code(g::ONNX.Types.Graph)
   @ ONNX ~/.julia/packages/ONNX/iz0dL/src/graph/graph.jl:100
 [5] write_julia_file(model_file::String)
   @ ONNX ~/.julia/packages/ONNX/iz0dL/src/convert.jl:235
 [6] load_model(model::String)
   @ ONNX ~/.julia/packages/ONNX/iz0dL/src/convert.jl:250
 [7] top-level scope
   @ REPL[18]:1

shell> ls -l
total 3180640
-rw-------  1 logankilpatrick  staff  1625394545 Oct 13 07:01 model.onnx
-rw-r--r--  1 logankilpatrick  staff      685933 Oct 13 07:02 weights.bson

julia> weights = ONNX.load_weights("weights.bson")
Dict{String, Any} with 521 entries:
  "Constant_123"  => fill(1.0)
  "Constant_3300" => fill(2.0)
  "Constant_2837" => fill(0)
  "Constant_2150" => fill(1.0)
  "Constant_3712" => fill(2.0)
  "Constant_1246" => fill(0.5)
  "Constant_2970" => fill(16)
  "Constant_3817" => fill(0.125)
  "Constant_1134" => fill(1.0)
  "Constant_2064" => fill(1)
  "Constant_3538" => fill(0.125)
  "Constant_3896" => fill(1.0)
  "Constant_397"  => fill(2)
  "Constant_148"  => fill(1)
  "Constant_3807" => fill(0)
  "Constant_47"   => fill(-1)
  "Constant_3215" => fill(2.0)
  "Constant_1378" => fill(2)
  "Constant_2551" => fill(1.0f-5)
                 => 

My question is what do I need to do now that I have the weights?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions