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
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: NifTK/NiftyNet
Commit Name: 135a56e0935fbb04811f8ce7b9f514f498212f71
Time: 2018-07-25
Author: wenqi.li@ucl.ac.uk
File Name: niftynet/layer/crf.py
Class Name:
Method Name: ftheta