-
Notifications
You must be signed in to change notification settings - Fork 12
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
Problems with compute/predict.nn (CRAN v1.44.2) #24
Comments
(important?) note: the model I'm using was created using version v1.33. Could that be the problem? Edit: I trained a new model using v1.44.2, problem is still there. |
Hm... On my machine library(neuralnet)
nn <- neuralnet(Species == "setosa" ~ Petal.Length + Petal.Width, iris, linear.output = FALSE)
predict(nn, iris) and get a 150x1 numeric back. |
Hi @mnwright I solved the issue--my bad after all. My script saves a 'minimal' (using as less space as possible) trained model which can be used for prediction in a later stage (using .Rdata format). Version 1.33 only required the 'linear output' and 'weights' elements from the model object, but it turns out v1.44.2 requires the 'model.list' element as well. I might have missed this, but I don't think there is a nice solution/function to save such models? Thanks ! |
We need |
I've made sure the 'model.list' is included in the output and retrained my model, to avoid compatibility issues with CRAN versions when used by others. Thanks for your solution anyway! |
Hi,
I recently updated neuralnet to v1.44.2 from v1.33. The newest version appears to contain a broken compute() function, which worked fine in v1.33. It throws following error:
Error in cbind(1, pred) %*% weights[[i]] : non-conformable arguments Calls: predict -> compute -> predict.nn -> <Anonymous> In addition: Warning message: In cbind(1, pred) : number of rows of result is not a multiple of vector length (arg 1) Execution halted
I've read that compute() was decrypted, yet R seems to be unable to find the 'new' predict(), neuralnet::predict() or predict.nn() functions.
The text was updated successfully, but these errors were encountered: