frame

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Sign In

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Error during run time after model compilation to xml

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.

Comments

This discussion has been closed.