Skip to content

Update mdf_to_pytorch to current spec #10

@pgleeson

Description

@pgleeson

@patrickstock The current example of mdf json you use is different from the format in the current python api,

https://github.com/ModECI/MDFTests/blob/main/mdf_to_pytorch/example_mdfs/mlp_classifier/mlp_classifier.json

Some differences:

  • it uses lists for functions. Can you update those to use dicts?
  • A "value" attribute is required on the output nodes
  • reciever_port -> receiver_port

Ignoring for now the loading of the weights from h5 for params, it should be possible to load this and export to other formats already, e.g. graphviz with these changes, e.g. using python -m modeci_mdf.export.graphviz mlp_classifier.json 2 with the latest main of mdf (using a hacked version of your file):

Screenshot 2021-04-07 at 19 32 08

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