Skip to content

nnet2 to nnet3 model converter #886

@vijayaditya

Description

@vijayaditya

There have been multiple requests for a tool to convert nnet2 models into nnet3 models.
There is no such tool currently available. However it would be simple to write and does not even need accessing the C++ parts of the nnet2 or nnet3 code.

The procedure is

  1. Convert nnet2 model to text format using nnet-am-copy
  2. Isolate the parameter matrices corresponding to components (e.g. NaturalGradientAffineComponent) into separate files
  3. Use these files to initialize the components in the nnet3 model using the file-name argument in the config string. For this write a nnet3 config which replicates the nnet2 model architecture and nnet3-am-init to initialize this model and write it out.

This would be a simple python script involving some string parsing.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions