我希望在Theano函数中实现以下功能:
a=numpy.array([ [b_row[dictx[idx]] if idx in dictx else 0 for idx in range(len(b_row))]
for b_row in b])
where a, b are narray, and dictx is a dictionary
我收到了错误信息:张量类型不支持迭代。 我需要使用 scan 吗?还是有更简单的方法? 谢谢!