简体   繁体   English

如何在 python 中为 Tensorflow 创建 CNN 交叉过滤器?

[英]How to create a CNN cross filter for Tensorflow in python?

In general, the CNN model uses a square filter.一般来说,CNN 模型使用方形滤波器。 I would like to use a cross filter or X filter.我想使用交叉过滤器或 X 过滤器。 The function of creating a square filter in tensorflow is provided, but information on other filter-types is not available.提供了在 tensorflow 中创建方形过滤器的功能,但不提供其他过滤器类型的信息。

How can I make a cross filter and/or an X-filter?如何制作交叉过滤器和/或 X 过滤器?

If I understand your question correctly, you want to use a Cross Filter, like the one whose shape is 3*4 rather than a Square Filter, whose shape is 3*3 .如果我正确理解您的问题,您想使用交叉过滤器,例如形状为3*4过滤器,而不是形状为3*3的方形过滤器。

If that is the case, that is allowed using the Function, tf.keras.layers.Conv2D .如果是这种情况,则允许使用函数tf.keras.layers.Conv2D

In the argument, kernel_size , you need to provide (3,4) instead of just 3 or (3,3) .在参数kernel_size ,您需要提供(3,4)而不是just 3(3,3)

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM