Skip to content

Instantly share code, notes, and snippets.

View maarten-devries's full-sized avatar

Maarten de Vries maarten-devries

View GitHub Profile

cleanthes

Keybase proof

I hereby claim:

  • I am maarten-devries on github.
  • I am cleanthes (https://keybase.io/cleanthes) on keybase.
  • I have a public key ASBlkR01M6zxl_sb-cEFESm1Vf18yHTVB4OjPsr1u-8YNwo

To claim this, I am signing this object:

def get_cnn_model_weights(model):
"""retrieves the regularizable weights from a model
given a cnn model (acording to the spec above) this function will
return a flatted `tf.Tensor` of all the model weights
Arguments:
model: the `K.models.Model` object
Returns:
import argparse
import os
import sys
##############################################
parser = argparse.ArgumentParser()
parser.add_argument('--epochs', type=int, default=100)
parser.add_argument('--batch_size', type=int, default=64)
parser.add_argument('--lr', type=float, default=1e-4)