lanking520 opened a new pull request #11844: [MXNET-689] add DataDesc type for the Scala Package URL: https://github.com/apache/incubator-mxnet/pull/11844 ## Description ## This PR includes massive changes on all Iterators that extends `DataIter`, two new fields are added (`dtype` and `layout`). @nswamy @yzhliu @andrewfayres It intends to solve some issues about the layout information missing in DataDesc. However I found it hard to have a general solution that both address backward compatibility as well as adding this information. Currently, there are several ways to address this issue: 1. Assume Shape == 2 follows `NT` format, Shape == 3 follows `TNC`, Shape == 4 follows `NCHW` and only change the implicit function in [here](https://github.com/apache/incubator-mxnet/blob/master/scala-package/core/src/main/scala/org/apache/mxnet/IO.scala#L358-L363). 2. This PR: add `Layout` and `DType` defs for all iterator, then users can pass these information to create `DataDesc` instead of `ListMap[Name, Shape]`. However, it breaks the input args for `NDArrayIter` as well as other iterators. Users are required to add more inputs. However, if the iterator are passed in with dynamic shapes (shapes are not determined), it will break the DataDesc checking scheme. Historical issues: - https://github.com/apache/incubator-mxnet/issues/11775 - [MLP problem](https://github.com/apache/incubator-mxnet/issues/10753) - [RNN problem](https://github.com/apache/incubator-mxnet/issues/11571) ## Checklist ## ### Essentials ### Please feel free to remove inapplicable items for your PR. - [x] The PR title starts with [MXNET-$JIRA_ID], where $JIRA_ID refers to the relevant [JIRA issue](https://issues.apache.org/jira/projects/MXNET/issues) created (except PRs with tiny changes) - [x] Changes are complete (i.e. I finished coding on this PR) - [x] All changes have test coverage: - Unit tests are added for small changes to verify correctness (e.g. adding a new operator) - Nightly tests are added for complicated/long-running ones (e.g. changing distributed kvstore) - Build tests will be added for build configuration changes (e.g. adding a new build option with NCCL) - [ ] Code is well-documented: - For user-facing API changes, API doc string has been updated. - For new C++ functions in header files, their functionalities and arguments are documented. - For new examples, README.md is added to explain the what the example does, the source of the dataset, expected performance on test set and reference to the original paper if applicable - Check the API doc at http://mxnet-ci-doc.s3-accelerate.dualstack.amazonaws.com/PR-$PR_ID/$BUILD_ID/index.html - [x] To the my best knowledge, examples are either not affected by this change, or have been fixed to be compatible with this change
---------------------------------------------------------------- This is an automated message from the Apache Git Service. To respond to the message, please log on GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org With regards, Apache Git Services