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
{{ message }}
This repository has been archived by the owner on May 31, 2024. It is now read-only.
The Model is an encapsulation of gonum.DirectedWeightedBuilder's interface.
This gives some great flexibility for implementing a backend.
For example, you can create a very simple backend (see the example in "simple") simply to display the graph in case you do not need actually to compute the result.
For example, I am using this to create a dot representation of the onnx graph.
If the backend needs more feature, the backend can fulfill this interface, and the corresponding method is applied at runtime :
This would break the API which is, by now, not a problem.
What do you think?
The text was updated successfully, but these errors were encountered:
owulveryck
changed the title
Evaluate the opportunity to replace gonum.DirectedWeightedBuilder in Model
Evaluate the opportunity to replace gonum.DirectedWeightedBuilder in the top level Model
Mar 26, 2019
// AttributesUnmarshaler is the interface implemented by types that can unmarshal to// themselves. AttributesUnmarshaler must copy the data if it wished to retain the data after returning.typeAttributesUnmarshalerinterface {
UnmarshalONNXAttributes(map[string]interface{}) error
}
The map[string]interface{} is a key value of the attributes; ex:
When decoding the attributes, I will first check if the Operator is fulfilling AttributesUnmarshaler, otherwise a call to unmarshalAttributes is performed. unmarshalAttributes will use the tags of the operator and this should be carefully documented.
The Model is an encapsulation of
gonum.DirectedWeightedBuilder
's interface.This gives some great flexibility for implementing a backend.
For example, you can create a very simple backend (see the example in "simple") simply to display the graph in case you do not need actually to compute the result.
For example, I am using this to create a dot representation of the onnx graph.
If the backend needs more feature, the backend can fulfill this interface, and the corresponding method is applied at runtime :
The problem is that a type inference is made at runtime and this process is slow.
Proposal: I am considering to replace the embedded
gonum.DirectedWeightedBuilder
bya Graph
interface that would look like:This would break the API which is, by now, not a problem.
What do you think?
The text was updated successfully, but these errors were encountered: