02d5f72be4ae1bc37a30336d3d83be24d0d2db35,keras/backend/theano_backend.py,,placeholder,#Any#Any#Any#Any#,37

Before Change


        return T.vector(name=name, dtype=dtype)
    elif ndim == 2:
        return T.matrix(name=name, dtype=dtype)
    elif ndim == 3:
        return T.tensor3(name=name, dtype=dtype)
    elif ndim == 4:
        return T.tensor4(name=name, dtype=dtype)
    else:
        raise Exception("ndim too large: " + str(ndim))


def shape(x):
    """Return the shape of a tensor.

After Change


        raise Exception("Specify either a shape or ndim value.")
    if shape is not None:
        ndim = len(shape)
    broadcast = (False,) * ndim
    return T.TensorType(dtype, broadcast)(name)

Italian Trulli
In pattern: SUPERPATTERN

Frequency: 3

Non-data size: 6

Instances


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


Project Name: keras-team/keras
Commit Name: defa1283c44653c29b81403f9d9f19fb3df0a27d
Time: 2016-07-21
Author: francois.chollet@gmail.com
File Name: keras/optimizers.py
Class Name: Optimizer
Method Name: set_weights


Project Name: keras-team/keras
Commit Name: d4fce4f5f1b9c164de6a873dbb877d46e00c75e1
Time: 2016-03-24
Author: eder@macbook.com
File Name: keras/backend/theano_backend.py
Class Name:
Method Name: batch_dot