Giter Site home page Giter Site logo

Comments (4)

fabiodimarco avatar fabiodimarco commented on June 22, 2024

Hi Tanuj,

could you provide me a code to replicate the issue? Instead of using the real database you can also use a randomly generated one with same input/output dimensions.

from tf-levenberg-marquardt.

tk3016 avatar tk3016 commented on June 22, 2024

Hi

Thanks for your prompt response.
I am attaching a different code with the same issue I am facing which is based on the regression tutorial on Tensorflow's website.
tf_regression_tutorial_with_error.zip

from tf-levenberg-marquardt.

fabiodimarco avatar fabiodimarco commented on June 22, 2024

Hi Tanuj,

I ran your notebook, the error is not due to the ModelWrapper, but it is caused by this line of code:
tf.keras.models.clone_model(dnn_model_shallow)

Actually you do not need to make a clone of the model, you can just pass it directly to the ModelWrapper.

model_wrapper = lm.ModelWrapper(dnn_model_shallow)

model_wrapper.compile(
    optimizer=tf.keras.optimizers.SGD(learning_rate=0.1),
    loss=lm.MeanSquaredError())

history = model_wrapper.fit(
    train_features,
    train_labels,
    validation_split=0.2,
    verbose=1,
    epochs=100
)

Let me know if this solves your problem.

Best,
Fabio

from tf-levenberg-marquardt.

tk3016 avatar tk3016 commented on June 22, 2024

Hi Fabio,

Many thanks for the suggestion. It works!
I was having a look at the curve fitting example and similarly trying to clone the model which is what confused me.

Thanks a lot again for all your help.

Best wishes,
Tanuj

from tf-levenberg-marquardt.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.