You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hey 👋
as always, thanks for the great work you are doing, so inspiring! 🙇
I'm reaching out because I'm getting an error with the latest version of axon (v0.4.0) when using Axon.dropout in the model and then one of the following optimizers in the Axon.trainer api:
rmsprop
adagrad
yogi
While, it works fine with the previous version of Axon (v0.3.1).
Here the snippet that you can use to reproduce the issue:
Mix.install([{:exla,"~> 0.4"},{:nx,"~> 0.4"},{:axon,"~> 0.4"}# {:axon, "~> 0.3.0"} # to install the prev. version of Axon],config: [nx: [default_backend: EXLA.Backend]])# Generate the datakey=Nx.Random.key(42){inputs,_new_key}=Nx.Random.normal(key,0,1,shape: {1000,2},type: :f32)labels=Enum.map(0..999,fn_->Enum.random([0,1])end)|>Nx.tensor()|>Nx.reshape({:auto,1})|>Nx.equal(Nx.tensor([0,1]))# Create model and trainmodel=Axon.input("data",shape: {nil,2})|>Axon.dense(100,activation: :sigmoid)|>Axon.dropout()|>Axon.dense(2,activation: :softmax)# Erros with `rmsprop`, `adagrad` and `yogi` optimizersmodel|>Axon.Loop.trainer(:categorical_cross_entropy,:rmsprop)|>Axon.Loop.run([{inputs,labels}],%{},epochs: 10,compiler: EXLA)
When running the livebook I'm receiving this error:
Hey 👋
as always, thanks for the great work you are doing, so inspiring! 🙇
I'm reaching out because I'm getting an error with the latest version of axon (v0.4.0) when using
Axon.dropout
in the model and then one of the following optimizers in theAxon.trainer
api:rmsprop
adagrad
yogi
While, it works fine with the previous version of Axon (v0.3.1).
It might be the same issue described in #443 ?
Here the snippet that you can use to reproduce the issue:
When running the livebook I'm receiving this error:
For what I can see in the printed error, there is a type mismatch in the dropout layer, in the 2nd element of the tuple (I mean
%{nu: …}
):In "Body matches template" there is:
while in "initial argument has template" there is:
Let me know if there is anything else I can do to ease the debugging 🙇
Cheers ✌️
My setup:
The text was updated successfully, but these errors were encountered: