98c87b768221e7c2d7db33f0cefbc8ca6336e16a,my/tensorflow/general.py,,flatten,#Any#Any#,95

Before Change


    :param shape:
    :return:
    
    shape_rank = len(shape)
    assert shape_rank >= dim
    keep = dim - 1
    out = [reduce(mul, shape[:shape_rank-keep], 1)] + shape[shape_rank-keep:]
    return out

After Change



def flatten(tensor, keep):
    assert keep >= 1
    flat = tf.reshape(tensor, [-1] + tensor.get_shape().as_list()[-keep:])
    return flat

Italian Trulli
In pattern: SUPERPATTERN

Frequency: 3

Non-data size: 3

Instances


Project Name: wenwei202/iss-rnns
Commit Name: 98c87b768221e7c2d7db33f0cefbc8ca6336e16a
Time: 2016-08-13
Author: seominjoon@gmail.com
File Name: my/tensorflow/general.py
Class Name:
Method Name: flatten


Project Name: reinforceio/tensorforce
Commit Name: dcd32c30c1295ea2f24adf46f0f67a2701f1c69a
Time: 2017-12-29
Author: svenmika1977@gmail.com
File Name: tensorforce/models/model.py
Class Name: Model
Method Name: tf_action_exploration


Project Name: tensorflow/models
Commit Name: 90f63a1e1653bfa17fde8260a4aa20231b269b7d
Time: 2017-06-29
Author: alexleegk@gmail.com
File Name: video_prediction/prediction_model.py
Class Name:
Method Name: cdna_transformation