2c680af3ecf0d34d589b3f9c2e424887565b453c,research/slim/nets/nasnet/nasnet_utils.py,NasNetABaseCell,_reduce_prev_layer,#NasNetABaseCell#Any#Any#,264

Before Change


    curr_filter_shape = int(curr_layer.shape[2])
    prev_filter_shape = int(prev_layer.shape[2])
    if curr_filter_shape != prev_filter_shape:
      prev_layer = tf.nn.relu(prev_layer)
      prev_layer = factorized_reduction(
          prev_layer, curr_num_filters, stride=2)
    elif curr_num_filters != prev_num_filters:
      prev_layer = tf.nn.relu(prev_layer)
      prev_layer = slim.conv2d(
          prev_layer, curr_num_filters, 1, scope="prev_1x1")
      prev_layer = slim.batch_norm(prev_layer, scope="prev_bn")
    return prev_layer

After Change


    prev_filter_shape = int(prev_layer.shape[2])
    activation_fn = tf.nn.relu6 if self._use_bounded_activation else tf.nn.relu
    if curr_filter_shape != prev_filter_shape:
      prev_layer = activation_fn(prev_layer)
      prev_layer = factorized_reduction(
          prev_layer, curr_num_filters, stride=2)
    elif curr_num_filters != prev_num_filters:
      prev_layer = activation_fn(prev_layer)
      prev_layer = slim.conv2d(
          prev_layer, curr_num_filters, 1, scope="prev_1x1")
      prev_layer = slim.batch_norm(prev_layer, scope="prev_bn")
    return prev_layer
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 3

Non-data size: 4

Instances


Project Name: tensorflow/models
Commit Name: 2c680af3ecf0d34d589b3f9c2e424887565b453c
Time: 2018-11-30
Author: sguada@google.com
File Name: research/slim/nets/nasnet/nasnet_utils.py
Class Name: NasNetABaseCell
Method Name: _reduce_prev_layer


Project Name: tensorflow/models
Commit Name: 2c680af3ecf0d34d589b3f9c2e424887565b453c
Time: 2018-11-30
Author: sguada@google.com
File Name: research/slim/nets/nasnet/nasnet_utils.py
Class Name: NasNetABaseCell
Method Name: _reduce_prev_layer


Project Name: tensorflow/models
Commit Name: 2c680af3ecf0d34d589b3f9c2e424887565b453c
Time: 2018-11-30
Author: sguada@google.com
File Name: research/slim/nets/nasnet/nasnet.py
Class Name:
Method Name: _build_nasnet_base


Project Name: tensorflow/models
Commit Name: 2c680af3ecf0d34d589b3f9c2e424887565b453c
Time: 2018-11-30
Author: sguada@google.com
File Name: research/slim/nets/nasnet/pnasnet.py
Class Name:
Method Name: _build_pnasnet_base