037e592f2ba7c18b71bc9b39f84de11af0252863,keras/backend/tensorflow_backend.py,,flatten,#Any#,289

Before Change


    """Turn a n-D tensor into a 2D tensor where
    the first dimension is conserved.
    """
    x = tf.reshape(x, [-1, np.prod(x.get_shape()[1:].as_list())])
    return x


def expand_dims(x, dim=-1):
    """Add a 1-sized dimension at index "dim".

After Change




def flatten(x):
    return tf.reshape(x, [-1])


def batch_flatten(x):
    """Turn a n-D tensor into a 2D tensor where
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 4

Non-data size: 3

Instances


Project Name: keras-team/keras
Commit Name: 037e592f2ba7c18b71bc9b39f84de11af0252863
Time: 2016-01-08
Author: francois.chollet@gmail.com
File Name: keras/backend/tensorflow_backend.py
Class Name:
Method Name: flatten


Project Name: keras-team/keras
Commit Name: 49386e8da49f0c63c467c28456c995ad24cc99fb
Time: 2016-11-03
Author: igormq@poli.ufrj.br
File Name: keras/backend/tensorflow_backend.py
Class Name:
Method Name: ndim


Project Name: keras-team/keras
Commit Name: f11b422541cb68857d6f62ab667d7778f3f3e3a2
Time: 2017-10-23
Author: ozabluda@gmail.com
File Name: keras/backend/tensorflow_backend.py
Class Name:
Method Name: count_params


Project Name: NifTK/NiftyNet
Commit Name: c5023bafe075db2d1deb891816212f5bf297316e
Time: 2018-07-21
Author: wenqi.li@ucl.ac.uk
File Name: niftynet/layer/crf.py
Class Name:
Method Name: permutohedral_gen