Skip to content
This repository has been archived by the owner on Nov 17, 2023. It is now read-only.

[Feature] Add MXNet2.0 Compatible Examples #20619

Open
11 tasks
barry-jin opened this issue Sep 28, 2021 · 0 comments
Open
11 tasks

[Feature] Add MXNet2.0 Compatible Examples #20619

barry-jin opened this issue Sep 28, 2021 · 0 comments

Comments

@barry-jin
Copy link
Contributor

Currently, most of the examples in master branch are removed in #20602 because of compatibility issues. These can be classified into 3 categories. Here is the plan to add these examples back once they are compatible.

Category 1: Using Old Gluon APIs

Influenced examples:

  • example/gluon/audio
  • example/gluon/lipnet
  • example/gluon/lstm_crf
  • example/gluon/sn_gan
  • example/gluon/tree_lstm
  • example/restricted-boltzmann-machine

The old gluon APIs, like hybrid_forward, self.name_scope() are deprecated during the MXNet2.0 developement and most of the changes are summarized in the migration guide. Adapting these examples is straight-forward, just replace the old APIs with new ones.

Category 2: NumPy/NumPy-extension Compatible Operators

Influenced examples:

  • example/autoencoder

Some legacy operators are still registered in mx.nd namespace and autoencoder will use nd.UpSampling to build the network. To fix this, we need to register UpSampling in npx namespace.

Category 3: Pretrained Models with old Symbol

Influenced examples:

  • example/automatic-mixed-precision
  • example/gluon/dc_gan
  • example/gluon/embedding_learning
  • example/gluon/style_transfer

These examples are using the get_model() API provided by gluon.model_zoo.vision. If the pretrained option is on, it will download the pretrained weights, of which the parameters' names do not match the current parameters' names because of the changes in naming mechanism. We may need to update the pretrained weights.

Others:

example/gluon/word_language_model is using deprecated API: gluon.contrib.data.text
example/multi_threaded_inference: Moved to cpp-package/example

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

1 participant