阅读背景:

如何获取张量中元素的计数

来源:互联网 

I want to get the count of an element in a tensor, for example, t=[1,2,0,0,0,0] (t is a tensor), I can get the amount, 4, of '0' by calling t.count(0) in python, but in tensorflow, I can't find any functions to do this. How can i get the count of '0'? Could please someone help me? I want to get the count of an element in a tens




你的当前访问异常,请进行认证后继续阅读剩余内容。

分享到: