Commit 376dc8dd authored by Mark Sandler's avatar Mark Sandler Committed by Sergio Guadarrama
Browse files

Pulling internal changes to github (#3583)

* Internal change.

PiperOrigin-RevId: 187042423

* Internal change.

PiperOrigin-RevId: 187072380

* Opensource float and eight-bit fixed-point mobilenet_v1 training and eval scripts.

PiperOrigin-RevId: 187106140

* Initial check-in for Mobilenet V2

PiperOrigin-RevId: 187213595

* Allow configuring batch normalization decay and epsilon in MobileNet v1

PiperOrigin-RevId: 187425294

* Allow overriding NASNet model HParams.

This is a change to the API that will allow users to pass in their own configs
to the building functions, which should make these APIs much more customizable
for end-user cases.

This change removes the use_aux_head argument from the model construction
functions, which is no longer necessary given that the use_aux_head option is
configurable in the model config. For example, for the mobile ImageNet model,
the auxiliary head can be disabled using:

config = nasnet.mobile_imagenet_config()
config.set_hparam('use_aux_head', 0)
logits, endpoints = nasnet.build_nasnet_mobile(
    inputs, num_classes, config=config)
PiperOrigin-RevId: 188617685

* Automated g4 rollback of changelist 188617685

PiperOrigin-RevId: 188619139

* Removes spurious comment
parent 81a34cbe
...@@ -30,6 +30,7 @@ from nets import overfeat ...@@ -30,6 +30,7 @@ from nets import overfeat
from nets import resnet_v1 from nets import resnet_v1
from nets import resnet_v2 from nets import resnet_v2
from nets import vgg from nets import vgg
from nets.mobilenet import mobilenet_v2
from nets.nasnet import nasnet from nets.nasnet import nasnet
slim = tf.contrib.slim slim = tf.contrib.slim
...@@ -58,6 +59,7 @@ networks_map = {'alexnet_v2': alexnet.alexnet_v2, ...@@ -58,6 +59,7 @@ networks_map = {'alexnet_v2': alexnet.alexnet_v2,
'mobilenet_v1_075': mobilenet_v1.mobilenet_v1_075, 'mobilenet_v1_075': mobilenet_v1.mobilenet_v1_075,
'mobilenet_v1_050': mobilenet_v1.mobilenet_v1_050, 'mobilenet_v1_050': mobilenet_v1.mobilenet_v1_050,
'mobilenet_v1_025': mobilenet_v1.mobilenet_v1_025, 'mobilenet_v1_025': mobilenet_v1.mobilenet_v1_025,
'mobilenet_v2': mobilenet_v2.mobilenet,
'nasnet_cifar': nasnet.build_nasnet_cifar, 'nasnet_cifar': nasnet.build_nasnet_cifar,
'nasnet_mobile': nasnet.build_nasnet_mobile, 'nasnet_mobile': nasnet.build_nasnet_mobile,
'nasnet_large': nasnet.build_nasnet_large, 'nasnet_large': nasnet.build_nasnet_large,
...@@ -88,6 +90,7 @@ arg_scopes_map = {'alexnet_v2': alexnet.alexnet_v2_arg_scope, ...@@ -88,6 +90,7 @@ arg_scopes_map = {'alexnet_v2': alexnet.alexnet_v2_arg_scope,
'mobilenet_v1_075': mobilenet_v1.mobilenet_v1_arg_scope, 'mobilenet_v1_075': mobilenet_v1.mobilenet_v1_arg_scope,
'mobilenet_v1_050': mobilenet_v1.mobilenet_v1_arg_scope, 'mobilenet_v1_050': mobilenet_v1.mobilenet_v1_arg_scope,
'mobilenet_v1_025': mobilenet_v1.mobilenet_v1_arg_scope, 'mobilenet_v1_025': mobilenet_v1.mobilenet_v1_arg_scope,
'mobilenet_v2': mobilenet_v2.training_scope,
'nasnet_cifar': nasnet.nasnet_cifar_arg_scope, 'nasnet_cifar': nasnet.nasnet_cifar_arg_scope,
'nasnet_mobile': nasnet.nasnet_mobile_arg_scope, 'nasnet_mobile': nasnet.nasnet_mobile_arg_scope,
'nasnet_large': nasnet.nasnet_large_arg_scope, 'nasnet_large': nasnet.nasnet_large_arg_scope,
......
...@@ -47,7 +47,7 @@ def distort_color(image, color_ordering=0, fast_mode=True, scope=None): ...@@ -47,7 +47,7 @@ def distort_color(image, color_ordering=0, fast_mode=True, scope=None):
Each color distortion is non-commutative and thus ordering of the color ops Each color distortion is non-commutative and thus ordering of the color ops
matters. Ideally we would randomly permute the ordering of the color ops. matters. Ideally we would randomly permute the ordering of the color ops.
Rather than adding that level of complication, we select a distinct ordering Rather then adding that level of complication, we select a distinct ordering
of color ops for each preprocessing thread. of color ops for each preprocessing thread.
Args: Args:
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment