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 __future__ import print_function | |
| import sys | |
| import os | |
| import re | |
| argv = sys.argv[1:] | |
| if not argv: | |
| sys.stderr.write('Usage: python check_dataset_valid.py [IMAGE_ROOT] [OUTPUT_FNAME]\n') | |
| sys.exit(1) |
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
| import os | |
| import argparse | |
| import re | |
| import numpy as np | |
| parser = argparse.ArgumentParser() | |
| parser.add_argument("--root_dir", help="The uppermost directory to clean up") | |
| parser.add_argument("--ckpt_type", help="Ckpt type(tensorflow, caffe)") | |
| args = parser.parse_args() |
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
| #!/usr/bin/env python | |
| from PIL import Image | |
| import os | |
| # image_root = '/nas/dataset/ILSVRC2012/train/' | |
| image_root = '/data/common_datasets/ILSVRC2012/train/' | |
| cmyk_img_subpaths = ["n01739381/n01739381_1309.JPEG" | |
| ,"n02077923/n02077923_14822.JPEG" |
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
| # Apply proximal gradient for the variables with l1 lasso loss | |
| # Non-negative weights constraint | |
| if L1_LOSS_WEIGHT > 0: | |
| for var in tf.get_collection(utils.LASSO_KEY): | |
| th_t = tf.fill(tf.shape(var), tf.convert_to_tensor(L1_LOSS_WEIGHT) * lr) | |
| zero_t = tf.zeros(tf.shape(var)) | |
| var_temp = var - th_t * tf.sign(var) | |
| assign_op = var.assign(tf.select(tf.less(tf.abs(var), th_t), zero_t, var_temp)) | |
| l1_op_list.append(assign_op) | |
| print('\tL1 loss added: %s(strength: %f)' % (var.name, L1_LOSS_WEIGHT)) |
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
| (http://www.alexeyshmalko.com/2014/youcompleteme-ultimate-autocomplete-plugin-for-vim/ 따라서 완전히 그대로 해도 될 것 같긴 하지만) | |
| 1. ~/.vim/plugins.vim 에 | |
| Plug 'Valloric/YouCompleteMe' | |
| 라인 추가 | |
| 2. vim +PlugInstall | |
| 3. cd ~/.vim/plugged/YouCompleteMe | |
| ./install.sh --clang-completer |
NewerOlder