023331ec2a7b0086abfc81eca16c84a1692ee653,keras/layers/convolutional.py,Cropping2D,__init__,#Cropping2D#Any#Any#,1754
Before Change
self.cropping = tuple(cropping)
if len(self.cropping) != 2:
raise ValueError("`cropping` must be a tuple length of 2.")
if len(self.cropping[0] ) != 2:
raise ValueError("`cropping[0]` must be a tuple length of 2.")
if len(self.cropping[1]) != 2:
raise ValueError("`cropping[1]` must be a tuple length of 2.")
After Change
self.data_format = conv_utils.normalize_data_format(data_format)
if isinstance(cropping, int):
self.cropping = ((cropping, cropping), (cropping, cropping))
if hasattr(cropping, "__len__"):
if len(cropping) != 2:
raise ValueError("TODO")
height_cropping = conv_utils.normalize_tuple(
cropping[0], 2,
"1st entry of cropping")
width_cropping = conv_utils.normalize_tuple(
cropping[1], 2,
"2nd entry of cropping")
self.cropping = (height_cropping, width_cropping)
else:
raise ValueError("`cropping` should be either an int, "
"a tuple of 2 ints "
"(symmetric_height_crop, symmetric_width_crop), "
"or a tuple of 2 tuples of 2 ints "
"((top_crop, bottom_crop), (left_crop, right_crop))."
"Found: " + str(cropping))
self.input_spec = [InputSpec(ndim=4)]
def get_output_shape_for(self, input_shape):
if self.data_format == "channels_first":
In pattern: SUPERPATTERN
Frequency: 5
Non-data size: 5
Instances Project Name: keras-team/keras
Commit Name: 023331ec2a7b0086abfc81eca16c84a1692ee653
Time: 2017-02-09
Author: francois.chollet@gmail.com
File Name: keras/layers/convolutional.py
Class Name: Cropping2D
Method Name: __init__
Project Name: catalyst-team/catalyst
Commit Name: aab3902d4a7d55f5a86058854adc36b8a12c873f
Time: 2019-05-20
Author: ekhvedchenya@gmail.com
File Name: catalyst/dl/callbacks/base.py
Class Name: OptimizerCallback
Method Name: on_batch_end
Project Name: keras-team/keras
Commit Name: 023331ec2a7b0086abfc81eca16c84a1692ee653
Time: 2017-02-09
Author: francois.chollet@gmail.com
File Name: keras/layers/convolutional.py
Class Name: Cropping3D
Method Name: __init__
Project Name: NervanaSystems/coach
Commit Name: 125c7ee38d413e4709271292c473f5930196b137
Time: 2017-12-19
Author: 30383381+itaicaspi-intel@users.noreply.github.com
File Name: environments/gym_environment_wrapper.py
Class Name: GymEnvironmentWrapper
Method Name: __init__
Project Name: chainer/chainercv
Commit Name: f5ff0f5fb3933bb4e704ce7947e2bd5a99ef8358
Time: 2018-05-02
Author: Hakuyume@users.noreply.github.com
File Name: tests/links_tests/model_tests/yolo_tests/test_yolo_base.py
Class Name: DummyYOLO
Method Name: _decode