bmi-project icon indicating copy to clipboard operation
bmi-project copied to clipboard

ValueError: Cannot assign to variable conv3_block1_0_conv/kernel:0 due to variable shape (1, 1, 256, 512) and value shape (512, 128, 1, 1) are incompatible,with h5py==2.10.0

Open liumgg opened this issue 3 years ago • 9 comments

after load the trained weights 'bmi_model_weights.h5', it return ValueError: Cannot assign to variable conv3_block1_0_conv/kernel:0 due to variable shape (1, 1, 256, 512) and value shape (512, 128, 1, 1) are incompatible, i tried to change the data_fromat but it did not use

liumgg avatar Mar 10 '21 06:03 liumgg

after load the trained weights 'bmi_model_weights.h5', it return ValueError: Cannot assign to variable conv3_block1_0_conv/kernel:0 due to variable shape (1, 1, 256, 512) and value shape (512, 128, 1, 1) are incompatible, i tried to change the data_fromat but it did not use

liumgg avatar Mar 10 '21 08:03 liumgg

after load the trained weights 'bmi_model_weights.h5', it return ValueError: Cannot assign to variable conv3_block1_0_conv/kernel:0 due to variable shape (1, 1, 256, 512) and value shape (512, 128, 1, 1) are incompatible, i tried to change the data_fromat but it did not use

I have the same issue.. do you have any solution for this?

gadididi avatar Apr 04 '21 12:04 gadididi

Same, please help :)

luantunez avatar Aug 23 '21 14:08 luantunez

help please!!!

codexsys-7 avatar Apr 30 '22 06:04 codexsys-7

Since there's quite a couple of people having this issue:

model.load_weights(weight_file,by_name=True)

This allows loading the model. Found in https://github.com/yu4u/age-gender-estimation/issues/140

trifle avatar Jul 16 '22 14:07 trifle

Since there's quite a couple of people having this issue:

model.load_weights(weight_file,by_name=True)

This allows loading the model. Found in yu4u/age-gender-estimation#140

I tried this solution and it runs, but the predicted BMI is single digit or even negative sometimes.

noovil avatar Sep 28 '22 01:09 noovil

model.load_weights(weight_file,by_name=True) it works for me.

Learneruestc avatar Oct 08 '22 05:10 Learneruestc

Since there's quite a couple of people having this issue: model.load_weights(weight_file,by_name=True) This allows loading the model. Found in yu4u/age-gender-estimation#140

I tried this solution and it runs, but the predicted BMI is single digit or even negative sometimes.

I

neharai070 avatar Dec 20 '23 09:12 neharai070

I am also getting negative bmi , how to resolve this please help @Learneruestc @noovil

neharai070 avatar Dec 20 '23 09:12 neharai070