Skip to content

SyntaxError loading the model #1

Description

@aralroca

I tried to do the example from scratch, but on the line:

this.model = await tf.loadModel('/assets/model.json');

I'm getting this error:

SyntaxError: Unexpected token < in JSON at position 0

In my assets folder I just copy/pasted the same assets that this repo:

assets
├── group1-shard1of1
├── group2-shard1of1
├── group3-shard1of2
├── group3-shard2of2
├── group4-shard1of1
└── model.json

And the file that contains the line:

this.model = await tf.loadModel('/assets/model.json');

is in the same level than assets.

Any idea about why is happening this? I would like to load the model 😄

Thanks!

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions