Comments (4)
Maybe I just answer to myself. Need to double check that my addition is okay.
In levenberg_marquardt.py
def _compute_jacobian(self, inputs, targets):
...
jacobians = tape.jacobian(
residuals,
self.model.trainable_variables,
experimental_use_pfor=self.experimental_use_pfor, unconnected_gradients=tf.UnconnectedGradients.ZERO)
...
jacobians = [tf.reshape(j, (num_residuals, -1)) for j in jacobians if j is not None]
from tf-levenberg-marquardt.
Hi Raphael,
I executed the code you provided, it seems that adding unconnected_gradients=tf.UnconnectedGradients.ZERO does solves the error.
Does it also work as expected?
from tf-levenberg-marquardt.
Hi Fabio,
yes, it is working perfectly for my case.
Thanks a lot !
Raphael.
from tf-levenberg-marquardt.
Perfect, I'll commit your changes then.
from tf-levenberg-marquardt.
Related Issues (20)
- Getting a shape error while trying to fit another dataset HOT 4
- how can I use model_wrapper to test the model and get the predicted value? HOT 7
- Getting error when trying to wrap a model with a tf keras Normalization layer HOT 4
- damping method and matrix solver HOT 3
- Random results HOT 1
- How to save this model and load weights? HOT 12
- How to use LM algorithm in a custom train loop with custom loss function? HOT 11
- Retracing warning on latest tensorflow version HOT 1
- Loss function returns 0 after first epoch for training set only when using validation data in training HOT 4
- Error when running the code test_curve_fitting.py HOT 4
- TypeError when trying to train model HOT 1
- Applying the LM optimizer for PINNs HOT 13
- Hyperparameter tuning to avoid overfitting HOT 1
- Input matrix is not invertible HOT 2
- Combine fireTS library for NARX network with Levenberg Marquardt HOT 6
- Return value for ModelWrapper fit() HOT 1
- Need help HOT 4
- Applying Levenberg-Marquardt to physically informed neural networks (PINNs) HOT 9
- Error in resuduals when labels given as int instead of float64 HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from tf-levenberg-marquardt.