de8a0133f01b4e9204eb81eb85ff4f9684aeb98f,keras/backend/theano_backend.py,,repeat,#Any#Any#,278

Before Change


    If x has shape (samples, dim) and n=2,
    the output will have shape (samples, 2, dim).
    """
    tensors = [x] * n
    stacked = T.stack(*tensors)
    return stacked.dimshuffle((1, 0, 2))


def tile(x, n):

After Change


    """
    assert x.ndim == 2
    x = x.dimshuffle((0, "x", 1))
    return T.extra_ops.repeat(x, n, axis=1)


def tile(x, n):
    return T.tile(x, n)
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 3

Non-data size: 4

Instances


Project Name: keras-team/keras
Commit Name: de8a0133f01b4e9204eb81eb85ff4f9684aeb98f
Time: 2016-02-02
Author: francois.chollet@gmail.com
File Name: keras/backend/theano_backend.py
Class Name:
Method Name: repeat


Project Name: keras-team/keras
Commit Name: a744b600e94ae00fbec71ef493afdff48bc3816b
Time: 2015-11-18
Author: francois.chollet@gmail.com
File Name: keras/layers/core.py
Class Name: RepeatVector
Method Name: get_output


Project Name: keras-team/keras
Commit Name: 48ce23086b18c07aba6daec86ffd91e919eadf0f
Time: 2016-02-29
Author: francois.chollet@gmail.com
File Name: keras/layers/recurrent.py
Class Name:
Method Name: time_distributed_dense