start new:
tmux
start new with session name:
tmux new -s myname
| def save_model(sess, saver, checkpoint_dir, model_name, step): | |
| if not os.path.exists(checkpoint_dir): | |
| os.makedirs(checkpoint_dir) | |
| saver.save(sess, os.path.join(checkpoint_dir, model_name), global_step=step) | |
| def load_model(sess, saver, checkpoint_dir): | |
| print("[*] Reading checkpoints...") | |
| ckpt = tf.train.get_checkpoint_state(checkpoint_dir) | |
| if ckpt and ckpt.model_checkpoint_path: | |
| ckpt_name = os.path.basename(ckpt.model_checkpoint_path) |
| def generate_arrays_from_file(path): | |
| while 1: | |
| f = open(path) | |
| for line in f: | |
| # create numpy arrays of input data | |
| # and labels, from each line in the file | |
| x, y = process_line(line) | |
| img = load_images(x) | |
| yield (img, y) | |
| f.close() |
| import pickle | |
| import numpy as np | |
| import pdb | |
| img_width, img_height = 300, 300 | |
| box_configs = [ | |
| {'layer_width': 38, 'layer_height': 38, 'num_prior': 3, 'min_size': 30.0, | |
| 'max_size': None, 'aspect_ratios': [1.0, 2.0, 1/2.0]}, | |
| {'layer_width': 19, 'layer_height': 19, 'num_prior': 6, 'min_size': 60.0, | |
| 'max_size': 114.0, 'aspect_ratios': [1.0, 1.0, 2.0, 1/2.0, 3.0, 1/3.0]}, |
git config user.name USERNAME
git config user.email [email protected]
git config --list # list all configurations
~/.gitconfig # path of git config file
| login in: heroku login | |
| create: heroku create [HelloFlask] | |
| depoly: git push heroku master | |
| open: heroku open | |
| delete: heroku apps:destroy --app [sleepy-hamlet-63859] | |
| email:[email protected] passwd: !G**** |