Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

error 1d load model #61

Open
andresdigiovanni opened this issue Mar 9, 2020 · 2 comments
Open

error 1d load model #61

andresdigiovanni opened this issue Mar 9, 2020 · 2 comments

Comments

@andresdigiovanni
Copy link

When load a model

`
# save model
model_json = model.to_json()
with open("model.json", "w") as json_file:
json_file.write(model_json)

# load json and create model
json_file = open('model.json', 'r')
loaded_model_json = json_file.read()
json_file.close()
model = model_from_json(loaded_model_json, custom_objects={
    'ResNet1D18': keras_resnet.models.ResNet1D18,
    'BatchNormalization': keras_resnet.layers.BatchNormalization })

`

I get this error:

Shape must be rank 3 but is rank 4 for 'padding_conv1_2/Pad'

@liuanhua110
Copy link

mee too bro, need help!

@aadnesd
Copy link

aadnesd commented Apr 15, 2021

I tried implementing your fixes @tackoo for my data of 1600 rows 103 columns. I've tried training the data earlier with Conv1D in a sequential model with input (103,1) but when I try to use this inpus shape for this ResNet model I get this error:
ValueError: Input 0 of layer conv1 is incompatible with the layer: : expected min_ndim=4, found ndim=3. Full shape received: (None, 103, 1)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants