Reputation: 11
I am building a website that uses facial emotion recognition system on the browser. I built and trained a CNN model in tensorflow and converted it to tensorflow.js. However, while loading the model I keep getting the error,
Uncaught (in promise) Error: Provided weight data has no target variable: sequential/conv2d/kernel
Upon reading some suggestions online, I tried to use tensorflow version 2.15.0 instead of 2.16.0 but it didn't work. I even thoroughly checked the names of weights in my model.json file and the names are exactly the same as the weight names of my model. Here's the weightsManifest block in my model.json file
{"weightsManifest": [{"paths": ["group1-shard1of3.bin", "group1-shard2of3.bin", "group1-shard3of3.bin"], "weights": [{"name": "sequential/conv2d/kernel", "shape": [3, 3, 1, 32], "dtype": "float32"}, {"name": "sequential/conv2d/bias", "shape": [32], "dtype": "float32"}, {"name": "sequential/conv2d_1/kernel", "shape": [3, 3, 32, 64], "dtype": "float32"}, {"name": "sequential/conv2d_1/bias", "shape": [64], "dtype": "float32"}, {"name": "sequential/conv2d_2/kernel", "shape": [3, 3, 64, 128], "dtype": "float32"}, {"name": "sequential/conv2d_2/bias", "shape": [128], "dtype": "float32"}, {"name": "sequential/conv2d_3/kernel", "shape": [3, 3, 128, 128], "dtype": "float32"}, {"name": "sequential/conv2d_3/bias", "shape": [128], "dtype": "float32"}, {"name": "sequential/dense/kernel", "shape": [2048, 1024], "dtype": "float32"}, {"name": "sequential/dense/bias", "shape": [1024], "dtype": "float32"}, {"name": "sequential/dense_1/kernel", "shape": [1024, 7], "dtype": "float32"}, {"name": "sequential/dense_1/bias", "shape": [7], "dtype": "float32"}]}]}
Upvotes: 0
Views: 106