Intel® Distribution of OpenVINO™ Toolkit
Community assistance about the Intel® Distribution of OpenVINO™ toolkit, OpenCV, and all aspects of computer vision-related on Intel® platforms.
6482 Discussions

Error during run time after model compilation to xml

idata
Employee
824 Views

I have compiled the following model from keras (h5) to tensorflow binary version (.pb) [ I have tried the compilation function previously with different models and it worked well ]

 

Then using intel modivus supplied kit compiled the (.pb) to xml file that can be used in runtime.

 

However resulted in the following runtime error:

 

what(): Cannot convert layer "up_sampling2d_1/ResizeNearestNeighbor" due to unsupported layer type "Resample"

 

inputs = Input((img_rows, img_cols,img_channels)) inputs_norm = Lambda(lambda x: x/127.5 - 1.) conv1 = Conv2D(8, (3, 3), padding='same')(inputs) conv1 = Activation('relu')(conv1) conv1 = Conv2D(8, (3, 3), padding='same')(conv1) conv1 = Activation('relu')(conv1) pool1 = MaxPooling2D(pool_size=(2, 2))(conv1) conv2 = Conv2D(16, (3, 3), padding='same')(pool1) conv2 = Activation('relu')(conv2) conv2 = Conv2D(16, (3, 3), padding='same')(conv2) conv2 = Activation('relu')(conv2) pool2 = MaxPooling2D(pool_size=(2, 2))(conv2) conv3 = Conv2D(32, (3, 3), padding='same')(pool2) conv3 = Activation('relu')(conv3) conv3 = Conv2D(32, (3, 3), padding='same')(conv3) conv3 = Activation('relu')(conv3) pool3 = MaxPooling2D(pool_size=(2, 2))(conv3) conv4 = Conv2D(64, (3, 3), padding='same')(pool3) conv4 = Activation('relu')(conv4) conv4 = Conv2D(64, (3, 3), padding='same')(conv4) conv4 = Activation('relu')(conv4) pool4 = MaxPooling2D(pool_size=(2, 2))(conv4) conv5 = Conv2D(128, (3, 3), padding='same')(pool4) conv5 = Activation('relu')(conv5) conv5 = Conv2D(128, (3, 3), padding='same')(conv5) conv5 = Activation('relu')(conv5) pool5 = MaxPooling2D(pool_size=(2, 2))(conv5) # # #up6 up6 = UpSampling2D()(conv5) up6 = concatenate([up6, conv4], axis=3) conv6 = Conv2D(64, (3, 3), padding='same')(up6) conv6 = Activation('relu')(conv6) conv6 = Conv2D(64, (3, 3), padding='same')(conv6) conv6 = Activation('relu')(conv6) #up 7 up7 = UpSampling2D()(conv6) up7 = concatenate([up7, conv3], axis=3) conv7 = Conv2D(32, (3, 3), padding='same')(up7) conv7 = Activation('relu')(conv7) conv7 = Conv2D(32, (3, 3), padding='same')(conv7) conv7 = Activation('relu')(conv7) # up 8 up8 = UpSampling2D()(conv7) up8 = concatenate([up8, conv2], axis=3) conv8 = Conv2D(16, (3, 3), padding='same')(up8) conv8 = Activation('relu')(conv8) conv8 = Conv2D(16, (3, 3), padding='same')(conv8) conv8 = Activation('relu')(conv8) # up 9 up9 = UpSampling2D()(conv8) up9 = concatenate([up9, conv1], axis=3) conv9 = Conv2D(8, (3, 3), padding='same')(up9) conv9 = Activation('relu')(conv9) conv9 = Conv2D(8, (3, 3), padding='same')(conv9) conv9 = Activation('relu')(conv9) conv10 = Conv2D(1, (1, 1))(conv9) conv10 = Activation('sigmoid')(conv10) model = Model(inputs=[inputs], outputs=[conv10])

 

What could be the reason, what and how i can tackle it.

0 Kudos
1 Reply
idata
Employee
516 Views

Hi @Mohammad,

 

 

Thanks for contacting us. May I ask which SDK are you using (NCSDK1, NCSDK2 or OpenVINO)? If you have any additional info that could help us reproduce this problem (host OS, VM?, NCS1 or NCS2?), perhaps sharing your model or provide steps on how to replicate.

 

Best Regards,

 

@Luis_at_Intel
0 Kudos
Reply