我正在使用Tensorflow构建CNN模型。但是,使用tf.image.resize_images
函数时出现两个错误:
第一个错误,
TypeError: Expected binary or unicode string, got <tensorlayer.layers.PReluLayer object at 0x0000000031962D68>
第二个错误
TypeError: Failed to convert object of type <class 'tensorlayer.layers.PReluLayer'> to Tensor. Contents: Last layer is: PReluLayer. Consider casting elements to a supported type.
我的代码的一部分是
#########################################################
conv4 = Conv2d(conv3_bn_relu_pool, 256, (3, 3), (1, 1), act=None, padding='SAME', W_init=w_init, name='conv4')
conv4_bn = BatchNormLayer(conv4, act=tf.identity, is_train=is_train, gamma_init=g_init, name='conv4_bn')
conv4_bn_relu = PReluLayer(conv4_bn, name='conv4_bn_relu')
################################Deconvolution (up-sample + Conv)#########################
deconv1_upsample = tf.image.resize_images(conv4_bn_relu, size=[64,64], method=tf.image.ResizeMethod.BILINEAR)