Conv3DTranspose使张量具有形状无

时间:2020-05-15 12:10:34

标签: tensorflow

Conv3DTranspose给出张量形状为[Dimension(None),Dimension(None),Dimension(None),Dimension(None),Dimension(32)]的张量,而我期望的是[Dimension(None),Dimension(80) ,维度(80),维度(64),维度(32)]。这会在我的代码中的其他地方引起问题。

您有解决办法吗?

import numpy as np
import tensorflow as tf
from keras.layers import Conv3D, Conv3DTranspose

X = tf.placeholder(tf.float32, [None, 40, 40, 32, 1])
conv = Conv3D(32, (3, 3, 3), activation='relu', padding='same')(X)
print(conv.shape.dims)
up = Conv3DTranspose(32, (2, 2, 2), strides=(2, 2, 2), padding='same')(conv)
print(up.shape.dims)

0 个答案:

没有答案