Skip to content

Commit

Permalink
Fix issue with generate at level=3
Browse files Browse the repository at this point in the history
  • Loading branch information
pgleeson committed Aug 1, 2023
1 parent 2227052 commit 6b248ae
Show file tree
Hide file tree
Showing 11 changed files with 240,671 additions and 43 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -278,3 +278,4 @@ Thumbs.db #thumbnail cache on Windows
/examples/NeuroML/arm64
/examples/MDF/RNN/iaf.net
/examples/MDF/RNN/iaf.net2
/examples/TensorFlow/Keras/keras_to_MDF
57 changes: 57 additions & 0 deletions examples/TensorFlow/Keras/keras2MDF.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,57 @@
{
"keras_to_MDF": {
"format": "ModECI MDF v0.4",
"generating_application": "Python modeci-mdf v0.4.7",
"graphs": {
"Keras_to_MDF_graph": {
"nodes": {
"input_node": {
"parameters": {
"input_node_in": {
"value": [
1.0
]
}
},
"output_ports": {
"input_node_out": {
"value": "input_node_in"
}
}
},
"dense_node": {
"input_ports": {
"dense_node_in": {}
},
"parameters": {
"wgts": {
"value": "weights"
},
"bias": {
"value": "bias"
},
"Output": {
"value": "(dense_node_in @ wgts) + bias"
}
},
"output_ports": {
"dense_node_out": {
"value": "Output"
}
}
},
"activation_node": {
"input_ports": {
"activation_node_in": {}
},
"output_ports": {
"activation_node_out": {
"value": "Output"
}
}
}
}
}
}
}
}
33 changes: 33 additions & 0 deletions examples/TensorFlow/Keras/keras2MDF.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
keras_to_MDF:
format: ModECI MDF v0.4
generating_application: Python modeci-mdf v0.4.7
graphs:
Keras_to_MDF_graph:
nodes:
input_node:
parameters:
input_node_in:
value:
- 1.0
output_ports:
input_node_out:
value: input_node_in
dense_node:
input_ports:
dense_node_in: {}
parameters:
wgts:
value: weights
bias:
value: bias
Output:
value: (dense_node_in @ wgts) + bias
output_ports:
dense_node_out:
value: Output
activation_node:
input_ports:
activation_node_in: {}
output_ports:
activation_node_out:
value: Output
4 changes: 2 additions & 2 deletions examples/TensorFlow/Keras/keras2MDFfunc_cal.py
Original file line number Diff line number Diff line change
Expand Up @@ -62,8 +62,8 @@


# Save the model to file
mod.to_json_file("keras_to_MDF.json")
mod.to_yaml_file("keras_to_MDF.yaml")
mod.to_json_file("keras2MDF.json")
mod.to_yaml_file("keras2MDF.yaml")

"""
mod.to_graph_image(
Expand Down
Loading

0 comments on commit 6b248ae

Please sign in to comment.