-
Notifications
You must be signed in to change notification settings - Fork 70
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
call mx.forward with kwargs occured an error. #431
Comments
Hi @bethetops , diff --git a/julia/src/executor.jl b/julia/src/executor.jl
index e56561797..37f2dde61 100644
--- a/julia/src/executor.jl
+++ b/julia/src/executor.jl
@@ -176,7 +176,7 @@ end
function forward(self::Executor; is_train::Bool = false, kwargs...)
for (k,v) in kwargs
- @assert(k ∈ self.arg_dict, "Unknown argument $k")
+ @assert(k ∈ keys(self.arg_dict), "Unknown argument $k")
@assert(isa(v, NDArray), "Keyword argument $k must be an NDArray")
copy!(self.arg_dict[k], v)
end |
iblislin
added a commit
to apache/mxnet
that referenced
this issue
Sep 11, 2019
It works! Thank you. |
ghost
closed this as completed
Sep 11, 2019
ah, but let this issue open until the PR got merged. |
iblislin
added a commit
to apache/mxnet
that referenced
this issue
Sep 12, 2019
iblislin
added a commit
to apache/mxnet
that referenced
this issue
Sep 12, 2019
larroy
pushed a commit
to larroy/mxnet
that referenced
this issue
Sep 28, 2019
iblislin
added a commit
to apache/mxnet
that referenced
this issue
Dec 17, 2019
* julia: bump window prebult binary version to v1.5.0 (#15608) - remove file REQUIRE, it's stale for Pkg3.jl * update julia install doc (#15609) * julia: fix `mx.forward` kwargs checking (#16138) close dmlc/MXNet.jl#431 * Julia: add API docs back (#16348) `ndarray` and `symbolic-node` have been refactored by splitting into a few files in commits ed83071 and 36a3cb8, but the corresponding document setting for MXNet.jl is not updated yet. List all split source files into the `at_autodoc` setting. Also refer to the `at_autodoc` setting in `julia/docs/src/api/optimizer.md`
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
julia> mx.forward(ex1, data=mydata)
ERROR: AbstractDict collections only contain Pairs;
Either look for e.g. A=>B instead, or use the
keys
orvalues
function if you are looking for a key or value respectively.
Enviroments:
julia 1.2.0
MXNet 1.5.0
The text was updated successfully, but these errors were encountered: