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
| sudo lsblk -f |
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: | |
| https://github.com/tensorflow/tensorflow/blob/9e8a4938c06301cc3afa4cd3a3c6c2279e81c98f/tensorflow/core/ops/training_ops.cc#L443-L465 | |
| Update '*var' according to the RMSProp algorithm. | |
| Note that in dense implement of this algorithm, ms and mom will | |
| update even if the grad is zero, but in this sparse implement, ms | |
| and mom will not update in iterations the grad is zero. | |
| mean_square = decay * mean_square + (1-decay) * gradient ** 2 | |
| Delta = learning_rate * gradient / sqrt(mean_square + epsilon) |
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
| name: "Inception_Resnet2_Imagenet" | |
| layer { | |
| name: "data" | |
| type: "Data" | |
| top: "data" | |
| top: "label" | |
| include { | |
| phase: TRAIN | |
| } | |
| transform_param { |
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
| macro nowarn(expr) | |
| quote | |
| stderr = STDERR | |
| stream = open("/dev/null", "a") | |
| redirect_stderr(stream) | |
| result = $(esc(expr)) | |
| redirect_stderr(stderr) | |
| close(stream) | |
| result | |
| end |
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
| ax = gca() | |
| ax2 = ax[:twinx]() |
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
| h5ls | |
| h5ls -d file.h5/dataset/ |
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
| $ tree -L 2 share/some/directory/ | tail -1 | |
| 120 directories, 3 files |
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
| # resize images to 256x256 using packages | |
| # identify -format "(%w,%h)" n12552309_5.JPEG | |
| # mogrify -resize 256x256! n12552309_10.JPEG | |
| imgsize(img) = eval(parse(readstring(`identify -format "(%w,%h)" $img`))) | |
| resize(img) = run(`mogrify -resize 256x256! $img`) | |
| for folder in filter(x->isdir(x), readdir()) | |
| println("\n>$folder") | |
| for img in filter(x->isfile("$folder/$x") && length(x)>5 && lowercase(x[end-4:end]) == ".jpeg", readdir(folder)) |
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
| # This script untars all the .tar file to their own folers | |
| # | |
| # for all tar files | |
| # if not tarred, i.e., no dir with same name | |
| # tar it to its temp folder | |
| # rename this temp folder to filename | |
| for tar in map(x->x[1:end-4], filter(x->isfile(x) && length(x) > 4 && x[end-3:end] == ".tar", readdir())) | |
| if(!isdir(tar)) | |
| isdir("$tar.temp") && rm("$tar.temp") |
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
| /etc/default/grub | |
| GRUB_CMDLINE_LINUX_DEFAULT="quiet splash acpi=off" | |
| sudo grub-update |