让我假设我想改变卷积的核心,这样内核的WeigTs会根据内核中的传入值来改变。如何在tensorflow中编写这样一个层
Kernel -> Image
|a b c| |2 3 2|
|d e f| -> |5 4 5|
|g h i| |5 3 1|
----> because e would be 4, if both were overlapping, the other wheigths should change like f(x):
f(x)=x*wheigt
|4a 4b 4c|
|4d e 4f|
|4g 4h 4i|
所以,至少,改变中间的所有wheights,比如f(x)
如果我理解正确,我认为这是您想要的(TF2.x,但在1.x中是相同的):
相关问题 更多 >
编程相关推荐