Commit Graph
12 Commits
Author SHA1 Message Date
Sheng Zha 199bc7eef6 make rat-excludes compliant with apache release policy (#14142)
* remove md from whitelist

* remove rst from whitelist

* remove docker folder from whitelist

* remove docs from whitelist
2019-02-13 10:12:12 -08:00
Da Zheng 4cd3355130 Add graph_compact operator. (#13436)
* add graph_compact.

* fix.

* add doc.

* add tests for graph_compact.

* address comments.

* update docs.

* trigger CI
2018-11-30 23:46:50 -08:00
Da Zheng 388a5f4834 A few operators on graphs stored as CSR (#13290)
* edge_id op csr forward on CPU (#34)

* add node subgraph generator. (#35)

* create DGLSubgraph.

* fix.

* return old eids in node_subgraph.

* accelerate subgraph construction.

* Add neighborhood op (#37)

* add csr_neighborhood op

* update neighborhood sample

* Update csr_neighborhood_sample-inl.h

* Update csr_neighborhood_sample-inl.h

* Update csr_neighborhood_sample.cc

* add graph compact operator.

* fix a bug in dgl_subgraph.

* fix a bug in dgl_graph_compact.

* Update csr sample op (#39)

* add csr_neighborhood op

* update neighborhood sample

* Update csr_neighborhood_sample-inl.h

* Update csr_neighborhood_sample-inl.h

* Update csr_neighborhood_sample.cc

* Update csr_neighborhood_sample-inl.h

* Update csr_neighborhood_sample.cc

* Update csr_neighborhood_sample-inl.h

* remove space.

* move to dgl_graph to contrib.

* move code.

* move edge id.

* fix compilation error.

* add test for subgraph.

* cleanup.

* fix.

* fix.

* fix compile error.

* fix compile error.

* fix compile error.

* fix.

* add operator doc.

* remove graph_compact

* update doc.

* address comments.

* retrigger.

* address comments.

* retrigger

* fix a bug in test.

* retrigger

* add check_format
2018-11-23 17:18:16 -08:00
Chaitanya Prakash Bapat a362df1eb1 [MXNET-1173] Debug operators - isfinite, isinf and isnan (#12967)
* is_finite and is_inf implementation for front-end python api debug operator

* updated unit-tests

* updated test cases and incorporated is_nan function

* solved index out of bounds issue and added comments

* simplified abs function call and added isnan to contrib.py and all debug ops to doc

* changed dimensions, added regular number, assert_equal instead of almost, removed ctx and added data.abs
2018-10-29 11:25:47 -07:00
Haibin Lin 1b96fc9514 getnnz operator for CSR matrix (#12908)
* nnz

* update err msg

* skip nnz test on gpu
2018-10-24 16:14:47 -07:00
Junru Shao 4bb141d682 [MXNET-684] Add cond operator (#11760)
* Initial commit for `Ifelse`

* Address comments

* Rename ifelse to condition

* API change

* Trigger CI

* Rename condition to cond

* Fix lint
2018-07-23 21:18:17 -07:00
Junru Shao 54632bcb38 [MXNET-626] Add while_loop (#11566)
* Add while_loop

* Avoid input/output overlap for nnvm graph cut

* Add more testcases

* Enhance test 4.2

* Add more complicated testcases; Add testcase for nested loop

* Check unused loop_vars in while_loop

* Add testcases for RNN

* Make lint happy

* Make lint happy

* Address TODOs

* Fix flaky test for while_loop

* Address comments

* Improve docstring

* Improve error message

* Add benchmark code

* Update benchmarks

* Allow sparse types

* Make max_iterations default to None

* Add while_loop to docs/api/python/{symbol|ndarray}/contrib.md

* Pad imperative while_loop so that it has the same shape with the symbolic one

* Add example result into the example section

* Remove unused class member

* Rename unittest to test_contrib_control_flow.py

* Update docstring

* Update docstring

* Trigger CI

* Change threshold for assert_almost_equal

* Trigger CI

* Address comments from szha

* Rewrite benchmark code

* Fix sphinx warning
2018-07-18 17:09:10 -07:00
Da Zheng 030fbc3c7b [MXNET-432] Add Foreach (#11531)
* 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.
2018-07-02 15:26:51 -07:00
Hang Zhang 98e671e2ac [MXNET-411] Add ROI Align (#10852)
* 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
2018-05-23 11:30:36 -07:00
Hang Zhang 09b880a82f [MXNET-108] Adding BilinearResize2D and AdaptiveAvgPool2d operators (#9688)
* bilinear upsample from PYTorch

* fix cpu backward

* fix indent, add req

* fix lint

* fix lint

* lint

* handle req

* add adaptive avg pooling operator

* rename to bilinear resize

* fix name

* change assertion

* rm unused var

* refactor using mshadow tensor

* rm devicetensor, only using mshadow

* add docs

* naming

* merge

* Revert "merge"

This reverts commit a2a809a17034c6887c1b919764ca0a2e6280e69a.

* add unit test for BilinearResize2D and AdaptiveAvgPool2D

* for test in python2, cast into float

* mv function inside

* link docs

* address the comments

* lint

* add back private ()

*  correct lint

* decleare var

* link params docs

* fix bug

* mv to contrib and upodate docs

* contrib header

* change include path for contrib

* lint

* register to contrib

* lint

* rename width, height, docs

* rename param

* Patch1 (#1)

* two shapes input

* docs

* typo

* lint

* lint
2018-04-09 10:33:37 -07:00
Haibin Lin 2abee10abd correct file path for API reference auto index (#7818)
* correct path for autoindex.js

* correct path for ImageRecordDataset
2017-09-09 15:25:14 -07:00
Haibin Lin 10a72c8275 Python symbol/ndarray api re-org (#7712)
* add ndarray folder

* add sparse.md draft

* update sparse.md

* add contrib, linalg, random to ndarray.md

* add contrib, linalg random to symbol

* add sparse.md

* update notes and op docs for sparse

* remove unused files

* add back random & la

* fix inherited methods for sparse ndarray

* remove speical members

* fix lint

* add contrib

* add random.md
2017-09-07 13:45:21 -07:00