dmlc / dmlc/MXNet.jl

No tools for many index operations DArrays

Open
#425 1 comment 0 reactions 0 assignees View on GitHub
Dominant language
No language data
Stars
369
Forks
63
PR merge metrics
No merged PRs in 30d

Description

From the http://dmlc.ml/MXNet.jl documentation as well as reading source code, the tools for comparison-based index operations on NDArrays are not apparent. Because NDArray is not compatible with common Julia index methods `find()`, etc the alternative is to write a method. However, there is no way to retrieve a conditional out of an NDArray, even an array of ones/zeros.

For example how would one find the index of the maximum element of an array? The `mx.maximum()` function returns the maximum element, and the `mx._equal()` function can do NDArray element-wise comparison. Thus, an NDArray of ones or a single element NDArray is found, but this can't be used as a Julia-compatible `Bool`.

This seems like a major flaw, and so it must be the case that I'm missing something simple here.

Edit:
`argmax()`, etc are in dlmc.ml documentation, but they throw errors:

`Check failed: mshadow::DataType::kFlag == type_flag_ TBlob.get_with_shape: data type do not match specified type.Expected: 6 v.s. given 0` ...

Edit2:
Found the `@mx.nd_as_jl` macro. If this is the only way to do index operations (i.e. while `argmax()`, etc are being fixed/implemented), then it should be highlighted more in documentation.

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.