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
I just noticed something weird in the code and thought it would be helpful to share it with you: the fact that the copy function makes a copy of the regularizer with no arguments, i.e.,
functioncopy(r::Regularizer)
newr =typeof(r)()
for field in@compatfieldnames(r)
setfield!(newr, field, copy(getfield(r, field)))
end
newr
end
make it impossible to use regularizers that do require an argument, for instance fixed_latent_features and fixed_last_latent_features.
I guess one could solve this by also copying the arguments?
The text was updated successfully, but these errors were encountered:
There are a few ways to fix this. One is to define default parameters for
every regularizer, so typeof(r)() works. Another is to more cleverly copy
the fields of the regularizer. I'd welcome a PR.
On Thu, Dec 22, 2016 at 9:57 PM, Andre Manoel ***@***.***> wrote:
Hello,
I just noticed something weird in the code and thought it would be helpful
to share it with you: the fact that the copy function makes a copy of the
regularizer with no arguments, i.e.,
function copy(r::Regularizer)
newr = typeof(r)()
for field in @compat fieldnames(r)
setfield!(newr, field, copy(getfield(r, field)))
end
newrend
make it impossible to use regularizers that do require an argument, for
instance fixed_latent_features and fixed_last_latent_features.
I guess one could solve this by also copying the arguments?
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
<#71>, or mute
the thread
<https://github.com/notifications/unsubscribe-auth/AAyp9LM1r-oDAodfBaT904lasKoi9soZks5rKoHFgaJpZM4LUAOp>
.
--
Madeleine Udell
Assistant Professor, Operations Research and Information Engineering
Cornell University
https://people.orie.cornell.edu/mru8/
(415) 729-4115
Hello,
I just noticed something weird in the code and thought it would be helpful to share it with you: the fact that the copy function makes a copy of the regularizer with no arguments, i.e.,
make it impossible to use regularizers that do require an argument, for instance
fixed_latent_features
andfixed_last_latent_features
.I guess one could solve this by also copying the arguments?
The text was updated successfully, but these errors were encountered: