无法为变量赋值,VGG16

发布于 2025-01-19 12:47:20 字数 681 浏览 1 评论 0原文

我正在使用Transfer_learning使用VGG16预处理的网络训练一个系统。如果我使用权重,它会给我一个错误,我不知道原因或如何解决。有建议吗?

input_shape = (60, 36, 3)
# Declaramos dos capas de Input
input_1 = Input(shape=input_shape)
input_2 = Input(shape=input_shape)
concate_input = Concatenate()([input_1, input_2])
input = layers.Conv2D(6,3, activation="relu") (concate_input)
base_model = applications.VGG16(weights= 'imagenet', include_top=False, input_tensor= 
concate_input)

错误消息是:

ValueError: Cannot assign value to variable ' block1_conv1/kernel:0': Shape mismatch.The variable shape (3, 3, 6, 64), and the assigned value shape (64, 3, 3, 3) are incompatible.

非常感谢

I am training a system with two images using transfer_learning using the VGG16 pretrained network. If I use the weights it gives me an error, I don't know the reason or how to solve it. Any suggestion?

input_shape = (60, 36, 3)
# Declaramos dos capas de Input
input_1 = Input(shape=input_shape)
input_2 = Input(shape=input_shape)
concate_input = Concatenate()([input_1, input_2])
input = layers.Conv2D(6,3, activation="relu") (concate_input)
base_model = applications.VGG16(weights= 'imagenet', include_top=False, input_tensor= 
concate_input)

The error message is:

ValueError: Cannot assign value to variable ' block1_conv1/kernel:0': Shape mismatch.The variable shape (3, 3, 6, 64), and the assigned value shape (64, 3, 3, 3) are incompatible.

Thanks a lot¡¡

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。
列表为空,暂无数据
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文