Skip to content

Commit

Permalink
make lasagne.utils.concatenate support negative axes.
Browse files Browse the repository at this point in the history
  • Loading branch information
benanne committed Jan 30, 2015
1 parent 5a7ff66 commit a53867d
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions lasagne/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -91,6 +91,9 @@ def concatenate(tensor_list, axis=0):
- out : tensor
the concatenated tensor expression.
"""
if axis < 0:
axis += tensor_list[0].ndim

concat_size = sum(tensor.shape[axis] for tensor in tensor_list)

output_shape = ()
Expand Down

0 comments on commit a53867d

Please sign in to comment.