Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| from tensorflow.contrib import slim | |
| from tensorflow.contrib.slim.nets import resnet_v2 | |
| def _res_net_tfslim(self, x, n_outputs, reg=None, activation_fn=tf.nn.relu, reuse=False, is_training=True): | |
| with slim.arg_scope(self.resnet_arg_scope(is_training)): | |
| net, end_points = resnet_v2.resnet_v2_50(x, num_classes=n_outputs, reuse=reuse) | |
| net = tf.squeeze(net) # Comes out as 4D by default | |
| # Final linear layer | |
| net = fc_layer('fully_connected', net, n_outputs, activation_fn=None, reg=reg, reuse=reuse, |