e99eac292db998960b9c384cb1106998a8489b02,keras/backend/theano_backend.py,,flatten,#Any#,763

Before Change



def flatten(x):
    // TODO: `keras_shape` inference.
    return T.flatten(x)


def batch_flatten(x):
    Turn a n-D tensor into a 2D tensor where

After Change




def flatten(x):
    y = T.flatten(x)
    if hasattr(x, "_keras_shape"):
        y._keras_shape = (np.prod(x._keras_shape), )
    return y


def batch_flatten(x):
    Turn a n-D tensor into a 2D tensor where
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: flatten


Project Name: NifTK/NiftyNet
Commit Name: 69e3d6d36be88b25b9ba833724129f330421bfdc
Time: 2017-09-06
Author: wenqi.li@ucl.ac.uk
File Name: niftynet/engine/sampler_grid.py
Class Name:
Method Name: _enumerate_step_points


Project Name: GPflow/GPflow
Commit Name: b313409e311f9be354c315a7c3b331d02bbdcdc9
Time: 2017-11-24
Author: james@prowler.io
File Name: gpflow/transforms.py
Class Name: DiagMatrix
Method Name: backward


Project Name: keras-team/autokeras
Commit Name: 3fb366abc93491a27f1267c4d74fe4f933fa7107
Time: 2019-07-23
Author: jhfjhfj1@gmail.com
File Name: autokeras/meta_model.py
Class Name:
Method Name: assemble