I want to reshape a tensor, it's shape is (?,12,12,5,512) into (?,12,12,2560) shape of tensor. Is there anyone who can help me? My code is as below.
conv5_1 = Conv3D(512, (3, 3, 3), activation='relu', padding='same')(drop4_1) # conv5_1: Tensor("conv3d_10/Relu:0", shape=(", 12, 12, 5, 512), dtype=float32)
conv5_1 = Conv3D(512, (3, 3, 3), activation='relu', padding='same')(conv5_1)
drop5_1 = Dropout(0.2)(conv5_1) # drop5_1: Tensor("dropout_8/cond/Merge:0", shape=(", 12, 12, 5, 512), dtype=float32)
I want to make (?, 12, 12, 2560) shape of tensor after drop5_1. Thanks
keras.layers.core.Reshape()
function is helpful (see also the document).
reshaped = Reshape((12, 12, 2560))(drop5_1)
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With