i was building a simple demo that would load a model that i have converted a JSON and binary using tensorfjs. The model is utilizing the following architecture
model = Sequential([
Flatten(input_shape=(28, 28)),
Dense(128, activation='relu'),
Dense(10, activation='softmax')
])
importing this model in the site gives me this issue
my code:
const model = await tf.loadLayersModel('model.json');
error received :
Error occurred: n: An InputLayer should be passed either a batchInputShape or an inputShape. at new n (
This feels like an intercompatibility issue between tensorflow and tensorflow where the json is missing some parameters. Are there any workarounds for this? How do i solve this issue?
what ive tried
- ive tried adding input_shape to the JSON (not sure if i did it right though)
- i tried mentioning Input explicitly in the model architecture