-
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
Char-LSTM example fails on eval_metric #368
Comments
diff --git a/examples/char-lstm/lstm.jl b/examples/char-lstm/lstm.jl
index d930240..46f36c2 100644
--- a/examples/char-lstm/lstm.jl
+++ b/examples/char-lstm/lstm.jl
@@ -123,7 +123,7 @@ mutable struct NLL <: mx.AbstractEvalMetric
NLL() = new(0.0, 0)
end
-function mx.update!(metric :: NLL, labels :: Vector{mx.NDArray}, preds :: Vector{mx.NDArray})
+function mx.update!(metric::NLL, labels::Vector{<:mx.NDArray}, preds::Vector{<:mx.NDArray})
@assert length(labels) == length(preds)
nll = 0.0
for (label, pred) in zip(labels, preds) It failed because of this change: #331 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
The provided example will run completely only if I remove the eval_metric argument from the mx.fit() process. Using:
The provided example code shows:
which produces on my machine:
Removing the eval_metric to rely on the default allows the iteration to perform to a conclusion.
I also get many warnings:
WARNING: Task iteration is now deprecated. Use Channels for inter-task communication. A for-loop on a Channel object is terminated by calling
closeon the object.
The text was updated successfully, but these errors were encountered: