keras gru输入形状
我构建了一个自定义生成器,该自定义生成器输出X数据,其形状(100,2,2048)属于Y 16(16)类,以传递给GRU模型进行视频分类。
100是序列长度,2用于2个同时摄像机视图,每个摄像头都有2048个功能,并带有特征提取器。
我需要将其传递给GRU模型,但是它会引发错误(输入0与图层不兼容的输入0:预期ndim = 3,找到ndim = 4。接收到:(无,100,2 ,2048)
)当我将输入层中的输入形状设置为(100,2,2048)时。
仅使用一个摄像头视图并将其设置为(100,2048)。
我需要设置什么输入形状来容纳两个相机?
I have built a custom generator that outputs X data with shape (100,2,2048) belonging to Y 16 (16) classes to be passed to a GRU model for video classification.
100 is the sequence length, 2 is for 2 simultaneous camera views, each with 2048 features, extracted earlier with a feature extractor.
I need to pass this to GRU model, but it throws an error (Input 0 of layer "gru" incompatible with the layer: expected ndim=3, found ndim=4. Sull shape received: (None,100,2,2048)
) when I set the input shape in the input layer to (100,2,2048).
Using just one camera view and setting the it to (100,2048) works.
What input shape do I need to set to accommodate the two cameras?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论