GithubHelp home page GithubHelp logo

Unknown layer: Functional about tfjs HOT 3 CLOSED

GodsDusk avatar GodsDusk commented on May 27, 2024
Unknown layer: Functional

from tfjs.

Comments (3)

gaikwadrahul8 avatar gaikwadrahul8 commented on May 27, 2024

Hi, @GodsDusk

Thank you for bringing this issue to our attention and I see in your model.json file the model format is "format": "layers-model" so you'll have to use tf.loadLayersModel so please give it try with tf.loadLayersModel() instead of tf.loadGraphModel()

I tried to load model with tf.loadLayersModel() and it's loading I confirmed by printing the model summary please refer below output log :

image

Here is my tfjs.html file :

<!DOCTYPE html>
<html>
  <head>
    <title>TensorFlow.js Model Loading Example</title>
  </head>
  <body>
    <script src="https://cdn.jsdelivr.net/npm/@tensorflow/tfjs/dist/tf.min.js"></script>
    <script>
      async function demo() {
        try {
          const model = await tf.loadLayersModel("http://127.0.0.1:5500/test-8178/model/model.json");
          console.log("Model summary:", model.summary());
        } catch (error) {
          console.error("Error loading model:", error);
        }
      }
      demo();
    </script>
  </body>
</html>

If I have missed something here please let me know and if possible please help with your Github repo with complete steps to replicate the same behavior from our end to investigate this issue further. Thank you for your cooperation and patience.

from tfjs.

GodsDusk avatar GodsDusk commented on May 27, 2024

it worked, thanks

from tfjs.

google-ml-butler avatar google-ml-butler commented on May 27, 2024

Are you satisfied with the resolution of your issue?
Yes
No

from tfjs.

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.