提交 d8616a44 authored 作者: Pascal Lamblin's avatar Pascal Lamblin

Fix crossentropy_to_crossentropy_with_softmax when applied on softmax(vec+vec)

上级 a3711937
......@@ -367,7 +367,14 @@ def local_softmax_with_bias(node):
else:
non_vectors.append(x_in)
# If all the inputs were vectors or broadcasted vectors,
# we broadcast one of them to be used as a matrix
if len(non_vectors) == 0:
assert len(vectors) > 0 # we should have at least 1 input...
promoted_vector = vectors.pop()
non_vectors.append(tensor.shape_padleft(promoted_vector))
assert non_vectors #not empty
if vectors:
#we're in business...
if len(vectors)>1:
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论