cfcb1e87038e33d22fa4d8f38ec96c949767ebb7,keras/backend/tensorflow_backend.py,,resize_images,#Any#Any#Any#Any#,265
Before Change
"""
if dim_ordering == "th":
new_height = shape(X)[2].value * height_factor
new_width = shape(X)[3].value * width_factor
X = permute_dimensions(X, [0, 2, 3, 1])
X = tf.image.resize_nearest_neighbor(X, (new_height, new_width))
return permute_dimensions(X, [0, 3, 1, 2])
After Change
"""
if dim_ordering == "th":
new_shape = tf.shape(X)[2:]
new_shape *= tf.constant(np.array([height_factor, width_factor]).astype("int32"))
X = permute_dimensions(X, [0, 2, 3, 1])
X = tf.image.resize_nearest_neighbor(X, new_shape)
return permute_dimensions(X, [0, 3, 1, 2])
elif dim_ordering == "tf":
In pattern: SUPERPATTERN
Frequency: 3
Non-data size: 2
Instances
Project Name: keras-team/keras
Commit Name: cfcb1e87038e33d22fa4d8f38ec96c949767ebb7
Time: 2016-03-07
Author: francois.chollet@gmail.com
File Name: keras/backend/tensorflow_backend.py
Class Name:
Method Name: resize_images
Project Name: tflearn/tflearn
Commit Name: 0f99087deba0facc0ec2b90acf27815efca497f4
Time: 2016-10-06
Author: simanek@spaceknow.com
File Name: tflearn/objectives.py
Class Name:
Method Name: weak_cross_entropy_2d
Project Name: NVIDIA/OpenSeq2Seq
Commit Name: f791b89909d8ac69cac38610a4b1ed31d219920d
Time: 2018-08-01
Author: chipn@nvidia.com
File Name: open_seq2seq/encoders/lm_encoders.py
Class Name: AWDLSTMEncoder
Method Name: _encode