-
Notifications
You must be signed in to change notification settings - Fork 14
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
vgg19模型的输入size和图片的size不符合? #1
Comments
sorry,在输入通道中,图片只有长,宽,和表示RGB的高在以tensorflow为backend情况下shape表示(300,400,3),在以theano为backend情况下表示(3,300,400) |
作者你好,请问你这个对输入图像的size是有要求的吗 (pytorch) |
|
因为我跑的时候报了这么一个错 |
4通道和3通道不是受size影响的,而是格式的问题,三通道(RGB),四通道(RGBA) |
如果我想对模型进行优化,加入注意力机制模型,是要对VGG19进行修改吗,不知道作者有没有什么好想法 |
作者你好能说下你用的什么数据集训练的吗,如果可以的话请求发下训练代码 |
能回复一下吗,本人学生党(本科,期末作业很急,球球了 |
最近工作比较忙,可以参考下下面的链接 |
Welcom!
IndexError Traceback (most recent call last)
in ()
5
6 loss_weights={'style':1.0,'content':0.025,'total':1.0}
----> 7 model=vgg19_model(input_tensor)
8 #生成总的反向特征缺失
9 total_loss=total_loss(model,loss_weights,transfer_tensor)
in vgg19_model(input_tensor)
2 img_input = Input(tensor = input_tensor, shape = (3, 800, 600, 3))
3 #Blocks 1
----> 4 x=Conv2D(64,(3,3),activation='relu',padding='same',name='block1_conv1')(img_input)
5 x=Conv2D(64,(3,3),activation='relu',padding='same',name='block1_conv2')(x)
6 x=MaxPooling2D((2,2),strides=(2,2),name='block1_pooling')(x)
c:\program files\python36\lib\site-packages\keras\engine\topology.py in call(self, inputs, **kwargs)
636 # Inferring the output shape is only relevant for Theano.
637 if all([s is not None for s in _to_list(input_shape)]):
--> 638 output_shape = self.compute_output_shape(input_shape)
639 else:
640 if isinstance(input_shape, list):
c:\program files\python36\lib\site-packages\keras\layers\convolutional.py in compute_output_shape(self, input_shape)
193 new_dim = conv_utils.conv_output_length(
194 space[i],
--> 195 self.kernel_size[i],
196 padding=self.padding,
197 stride=self.strides[i],
IndexError: tuple index out of range
The text was updated successfully, but these errors were encountered: