Tensorflow 中的递归卷积自动编码器

Recurrent Convolutional Autoencoder in Tensorflow

我正在尝试在 Tensorflow 中构建循环卷积自动编码器,但我无法将卷积自动编码器与循环层链接起来。

根据我的理解,Tensorflow RNNCell 的输入形状为 (batch_size、time_steps、info_vector),但我的一维卷积层的输出形状为 (batch_size, info_vector).有没有办法让张量流存储以前的信息向量。或者,我是否需要使用 2D 卷积,向输入添加一个额外的 time_step 维度,然后不对该维度进行卷积?

尝试扩大张量的维度:

cnn_out = last_output_of_cnn # for example shape [32,10]
cnn_out = tf.expand_dims(cnn_output, axis=-1) # new shape [32,10,1]

您可以在 RNN 的第一层使用它,这里 "timestep" 是 10。