@@ -242,8 +242,8 @@ def cifar10_resnet_v2_generator(resnet_size, num_classes, data_format=None):
242
242
def model (inputs , is_training ):
243
243
"""Constructs the ResNet model given the inputs."""
244
244
if data_format == 'channels_first' :
245
- # Convert from channels_last (NHWC) to channels_first (NCHW). This
246
- # provides a large performance boost on GPU. See
245
+ # Convert the inputs from channels_last (NHWC) to channels_first (NCHW).
246
+ # This provides a large performance boost on GPU. See
247
247
# https://www.tensorflow.org/performance/performance_guide#data_formats
248
248
inputs = tf .transpose (inputs , [0 , 3 , 1 , 2 ])
249
249
@@ -302,8 +302,9 @@ def imagenet_resnet_v2_generator(block_fn, layers, num_classes,
302
302
def model (inputs , is_training ):
303
303
"""Constructs the ResNet model given the inputs."""
304
304
if data_format == 'channels_first' :
305
- # Convert from channels_last (NHWC) to channels_first (NCHW). This
306
- # provides a large performance boost on GPU.
305
+ # Convert the inputs from channels_last (NHWC) to channels_first (NCHW).
306
+ # This provides a large performance boost on GPU. See
307
+ # https://www.tensorflow.org/performance/performance_guide#data_formats
307
308
inputs = tf .transpose (inputs , [0 , 3 , 1 , 2 ])
308
309
309
310
inputs = conv2d_fixed_padding (
0 commit comments