e99eac292db998960b9c384cb1106998a8489b02,keras/backend/theano_backend.py,,permute_dimensions,#Any#Any#,670

Before Change


    
    // TODO: `keras_shape` inference.
    pattern = tuple(pattern)
    return x.dimshuffle(pattern)


def repeat_elements(x, rep, axis):
    Repeat the elements of a tensor along an axis, like np.repeat.

After Change


    dimension indices, e.g. [0, 2, 1].
    
    pattern = tuple(pattern)
    y = x.dimshuffle(pattern)
    if hasattr(x, "_keras_shape"):
        y._keras_shape = tuple(np.asarray(x._keras_shape)[list(pattern)])
    return y


def repeat_elements(x, rep, axis):
    Repeat the elements of a tensor along an axis, like np.repeat.
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 4

Non-data size: 5

Instances


Project Name: keras-team/keras
Commit Name: e99eac292db998960b9c384cb1106998a8489b02
Time: 2017-03-06
Author: abhai.dilip@gmail.com
File Name: keras/backend/theano_backend.py
Class Name:
Method Name: permute_dimensions


Project Name: keras-team/keras
Commit Name: b057624707be574d78a741516be2f98c03f3e193
Time: 2015-08-09
Author: francois.chollet@gmail.com
File Name: keras/layers/convolutional.py
Class Name: Convolution1D
Method Name: get_output


Project Name: keras-team/keras
Commit Name: a6c9227372c607fc356b14e17c230cb9c1d5f589
Time: 2017-01-05
Author: gvtulder@users.noreply.github.com
File Name: keras/backend/theano_backend.py
Class Name:
Method Name: _old_batch_normalization


Project Name: keras-team/keras
Commit Name: e99eac292db998960b9c384cb1106998a8489b02
Time: 2017-03-06
Author: abhai.dilip@gmail.com
File Name: keras/backend/theano_backend.py
Class Name:
Method Name: expand_dims