Tensorflow中的时间分布卷积层 [英] Time Distributed Convolutional Layers in Tensorflow

查看:76
本文介绍了Tensorflow中的时间分布卷积层的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在Keras中,有一个时间分布的包装器,该包装器将一层应用于输入的每个时间片. Tensorflow中有类似的包装器吗?或者如何在Tensorflow中构建时间分布的图层?

In Keras, there is a time distributed wrapper that applies a layer to every temporal slice of an input. Is there a similar wrapper that is available in Tensorflow? Or how do I build time distributed layers in Tensorflow?

推荐答案

您可以尝试进行基本的重塑:

You could try a basic reshape:

  • 采用形状为(?, timeSteps, ...other_dimensions...)的张量
  • 将其重塑为(-1, ...other_dimensions...)
  • 应用图层/操作
  • 将其重塑回(-1, timeSteps, ...other_dimensions...)
  • Take a tensor of shape (?, timeSteps, ...other_dimensions...)
  • Reshape it to (-1, ...other_dimensions...)
  • Apply the layer/operation
  • Reshape it back to (-1, timeSteps, ...other_dimensions...)

这篇关于Tensorflow中的时间分布卷积层的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆