-
Notifications
You must be signed in to change notification settings - Fork 160
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
Input matrix not invertible error in Levenberg Marquardt algorithm using neupy.algorithms #258
Comments
Hi, |
Also, what is your |
tensorflow version = 1.13.2 my code import numpy as np
np.random.seed(20)
from neupy import algorithms, layers
from neupy.exceptions import StopTraining
from neupy.layers import *
import pandas as pd
import time
from sklearn import preprocessing
data = pd.read_csv("data6k.csv")
train = data.iloc[1:600,1:20]
test = data.iloc[601:671,1:20]
xTrain = train.iloc[:,3:20]
yTrain = train.iloc[:,0]
xTest = test.iloc[:,3:20]
yTest = test.iloc[:,0]
network = join(Input(16), Relu(8), Linear(1))
def on_epoch_end(optimizer):
if optimizer.errors.valid[-1] < 0.001:
raise StopTraining("Training has been interrupted")
start_time = time.time()
optimizer = algorithms.LevenbergMarquardt(network, signals=on_epoch_end,)
optimizer.train(xTrain, yTrain, xTest, yTest)
yPred = optimizer.predict(xTest) I am getting this error at optimizer.train Please help me resolve this |
please let me know |
I think this might require a fix, in the meanwhile, can you try to reduce the |
It is strange how the same code worked two days back and is giving this issue now. It will be helpful if you could fix it asap and also explain the issue. Thanks |
did you try to modify |
I am again getting the same error at mu_update_factor=1.1, mu=0.2 |
Inversion happens on the jacobian matrix and the |
Thanks. But different combinations of mu_update_factor, mu and error threshold value are giving this same error. How are these three related and how do we decide how to tune them? Is it still a bug or the user has to decide. Trial and error is a tedious method. |
Sorry, maybe I misunderstood you, did you say that it worked for
It's important for you to understand algorithm before using it. Please refer to this book in order to learn more about it: https://hagan.okstate.edu/NNDesign.pdf (see Section 12).
The |
Would it be possible for you to set optimizer = algorithms.LevenbergMarquardt(network, signals=on_epoch_end, verbose=True) |
Thanks for the information. I observed another strange thing with the parameters. The same combination of mu, mu_update_factor and error threshold always doesn't give the result. Sometimes it gives this error and sometimes it works. I think this needs to be fixed. |
same error. Even after changing mu and mu_update_factor. [ALGORITHM] LevenbergMarquardt [OPTION] loss = mse [TENSORFLOW] Initializing Tensorflow variables and functions. |
@rdx10001 do you get the same error during the first training iteration or after some number of epochs? |
Previously, I did not get any errors and the code ran properly. I even could see the results properly. Now after implementing everything, I want to save my results. For that I am running my code again and facing this new issue now. Please help me resolve this.
Please find the error below.
The text was updated successfully, but these errors were encountered: