Skip to content

Instantly share code, notes, and snippets.

View jacobsn's full-sized avatar

Nathan Jacobs jacobsn

View GitHub Profile
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,
@eamartin
eamartin / notebook.ipynb
Last active April 22, 2025 08:11
Understanding & Visualizing Self-Normalizing Neural Networks
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.