Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
1 changed file
with
40 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
#= | ||
Now, we define the new data types. | ||
Model => ModelProto | ||
Graph => GraphProto | ||
Node => NodeProto | ||
Attribute => AttributeProto | ||
The new types will consist of Julian attributes. | ||
=# | ||
|
||
mutable struct Node | ||
input::Vector{AbstractString} | ||
output::Vector{AbstractString} | ||
name::AbstractString | ||
op_type::AbstractString | ||
domain::AbstractString | ||
attribute::Dict{Any, Array{Any, 1}} #AttributeProto to Dict | ||
doc_string::AbstractString | ||
end | ||
|
||
mutable struct Graph | ||
node::Vector{Node} | ||
name::AbstractString | ||
initializer::Dict{Any, Array{Any, 1}} #Storing the array data instead of the tensorproto vector. | ||
doc_string::AbstractString #in Dict format. | ||
input::Vector{Dict} # | ||
output::Vector{Dict} # ValueInfoProto to Dict type. | ||
value_info::Vector{Dict} # | ||
end | ||
|
||
mutable struct Model | ||
ir_version::Int64 | ||
opset_import::Vector{Dict} #OperatorSetIdProto to Dict | ||
producer_name::AbstractString | ||
producer_version::AbstractString | ||
domain::AbstractString | ||
model_version::Int64 | ||
doc_string::AbstractString | ||
graph::Graph | ||
metadata_props::Vector{Dict} #StringStringEntryProto to Dict | ||
end |