* Test input a graph.
* Update foreach to execute the subgraph.
* print inputs/outputs in foreach.
* Remove print.
* add test code for foreach.
* exec foreach outside the engine.
* Implements forward of foreach.
* Add support for variable numbers of inputs and outputs.
* Add a python wrapper for foreach.
* Fix the order of inputs.
* add test with lstm.
* hide C version of foreach.
* fix a bug temporarily.
* Test free variables.
* change for the new interface of InputGraph attribute.
* Add attribute to the subgraph.
* Handle free variables.
* Get all input symbols of a subgraph.
* Fix shape, dtype and storage inference.
* reorganize the output of foreach.
* Add a gluon RNN unroll with symbol foreach.
* print unnecessary print.
* have imperative and symbolic foreach.
* Fix an error after moving foreach.
* Fix imperative foreach
* Fix a minor problem.
* Use CachedOp to execute subgraph.
* update TODO.
* make foreach op use FStatefulComputeEx.
TODO we need to change stateful executor to handle subgraph.
* Add backward.
* Fix bugs.
* enable backward test in lstm.
* Fix a bug in foreach backward for free variables.
* change for the new CachedOp.
* Detect the backward computation.
* Fix bugs in foreach.
* fix tests.
* update tests.
* check state shape.
* enable nested foreach.
* remove print.
* fix a bug in test.
* handle infer storage type for backward.
* address comments.
* address comments.
* move some common functions out.
* address comments.
* fix lint.
* Fix lint.
* add doc.
* undo modification in imperative.h
* add doc and remove example code.
* fix lint.
* fix lint.
* Fix lint.
* make nd.foreach and sym.foreach consistent.
* fix compile error.
* address comments.
* update.
* check for loop only works for dense arrays.
* move control flow op out of nn/
* fix include.
* add a test in gluon.
* work for GPU.
* small fix.
* remove subgraph_name
* create loop state for reuse in the future.
* move code.
* Revert "remove subgraph_name"
This reverts commit 977f5624ad0b0dedb9dcb8629f975afc56bb1e1a.
* cut graph.
* rename new var nodes.
* Fix tests.
* Fix bugs caused by ctypes (#29)
* Add save/load json in testcases for foreach (#30)
* support subgraph in stateful executor.
* Fix compilation.
* fix a bug when a subgraph has variable nodes.
* Fix a bug of getting symbols.
* copy var nodes.
* Fix getting op states.
* fix lint error.
* address comments.
* fix lint error.
* simplify the execution of subgraph in the main thread.
* fix lint error.
* avoid waiting for computation in each iteration.
* reuse cached op for inference.
* share memory across mini-batches.
* reuse memory.
reuse memory between iterations in inference.
reuse memory between mini-batches in training.
* add tests for multiple batches.
* remove entry.
* add benchmark for foreach.
* benchmark large batch size.
* Fix the benchmark for GPU.
* address comments.
* update shape/dtype/storage inference.
* update contrib API docs.
* support nested foreach.
* use a single CachedOp for all iterations.
* use large dim.
* update benchmark.
* update benchmark.
* update benchmark.
* update benchmark.
* return symbol arrays correctly in MXSymbolCutSubgraph.
* return symbol arrays in MXSymbolGetInputSymbols.
* fix lint error.
* use cachedop to infer storage in backward.
* fix scala API.
* update comments.
* fix scala.
* fix test.
* fix attribute name.
* move benchmark.
* fix the mapping of operator inputs/outputs and subgraph inputs/outputs.
* add tests for dtype/shape inference.
* reorganize tests.
* fix a bug of cutting NodeEntry.
When two node entries refer to the same output of a node, we should
create only one var node for these two node entries.
* fix lint error.
* handle the case that outputs are inputs.
* handle the case that inputs aren't used.
* handle the case without output data.
* fix a bug in foreach backward.
* fix a bug when there isn't output data.
* Fix lint error.
* test diff Gluon RNN cells.
* test all symbol RNN cells.
* adjust the test precision.
* Fix a bug in getting a list of variable names.
We can't get a list of variable names from a hashtable. The order can't
be guaranteed. Python2 and Python3 output different orders.
* fix lint error.
* Test 1D array.
* fix a bug when subgraph inputs and outputs share NDArray.
* fix.
* fix
* add comments.
* Shape Operator
* cuda
* size op
* lint issues
* docs example
* add docs, change op name to avoid conflict, add convenience confluent
method
* change name to _nd
* fix test cases, add new kernel
* test name fix.
* solve gpu memory problem for size and shape
* get rid of FIgnoreInputs attr of shape_nd
* op name change
* fix
* retrigger CI
* retrigger CI
* retrigger CI
* trigger CI
* fix comments
* cpplint
* nit
* trigger CI
* add roi align
* lint
* cpu gpu forward consistent
* roi align from caffe2
* rois and unit-test
* for cpplint
* use pointer instead of reference for lint
* fix
* add docs
* fix vector
* more unit test
* using mshadow
* omp
* omp on channels
* remove omp due to no cpu atomic add
* use lambda func for grads
* knullop return
* support broadcast_mul/div(csr, 1Ddense) = csr
* address code reviews and support broadcast_mul/div(csr, 2Ddense) = csr
* add test for both 1D and 2D dense case
* address code review and fix test error
* address code review and fix test error
* added proper overrides for basic arithmetic functions for sparse tensors.
* fix broadcast dimension
* address code reviews
* Random shuffle implementation
This operator randomly shuffles an NDArray along the first axis. The order of the elements in each subarray does not change. For exmaple, if an NDArray `x` is shuffled, the order of the subarrays `x[i]` randomly changes but the order of the elements in each `x[i]` does not change. It is modeled on `numpy.random.shuffle`.
In cpu, the shuffling of an 1D array is delegated to `__gnu_parallel::random_shuffle`, which utilizes openmp, for clang on linux and gcc on any OS and delegated to `std::shuffle` for other platforms. For an multidimensional array, the usual Fisher-Yates shuffling is implemented.
In gpu, it shuffles the array of indices representing the subarrays and then rearrange the elements of the data array according to the shuffled index array. To shuffle the index array, a random key is generated for each index and then the indices are sorted by the keys. The sorting is delegated to mshadow's `SortByKey` which again delegates the call to thrust's `sort_by_key`.
* Refactoring to avoid a preprocessing problem in Windows build
* Cosmetic changes
* Typo
* Adding const keyword at several places
* Fix the bug that integer arrays are not allowed
* Revise the comments to explain the unit test
* Add a check for correct array shape
* Revised unit test with larger arrays
* Replace the custom hash with 'str'
* Fix a bug due to the integer arithmetic in python2
* Revise comments for the unit test
* Fix the invalid fix in the commit f240714c
* Update random.md
* Update random.md
* fixed broken links from the latest blc check
* added two files in faq from how_to
* removed the two backslahes typo
* git mv files from how_to to faq and fixed the Camel case in security.md
* Add asscipy support and coo format support
* Comment misalignment change
* Add documentation for Sparse NDarray
* Change comment
* Adding comments and support for dtype
* Modifying tests
* Add spsp None check
* Fix lint
* fix rowsparsepull usage in the example
* update csr_matrix interface
* update rowsparse tutorials
* update csr/rsp constructor code&doc
* doc & bug fixes
* fix empty
* bug fix for desnity=0
* fix lint
* add more unit tests
* reduce test run time
* update infer shape test
* add one more test case with list