Usually, located at /usr/local/cuda/bin
$ nvprof python train_mnist.py
I prefer to use --print-gpu-trace.
| import os | |
| import json | |
| import subprocess | |
| import numpy as np | |
| import pandas as pd | |
| from skimage.measure import find_contours | |
| class CocoDatasetHandler: | |
| def __init__(self, jsonpath, imgpath): |
| import torchvision.datasets as datasets | |
| import torchvision.transforms as transforms | |
| import torch | |
| import torchvision | |
| import matplotlib.pyplot as plt | |
| import numpy as np | |
| from custom_transforms import NRandomCrop | |
| set-window-option -g mode-keys vi | |
| # set -g default-terminal "screen" | |
| # enable mouse | |
| set -g mouse on | |
| # vi like navigation | |
| bind h select-pane -L | |
| bind j select-pane -D |
| '''This script goes along the blog post | |
| "Building powerful image classification models using very little data" | |
| from blog.keras.io. | |
| It uses data that can be downloaded at: | |
| https://www.kaggle.com/c/dogs-vs-cats/data | |
| In our setup, we: | |
| - created a data/ folder | |
| - created train/ and validation/ subfolders inside data/ | |
| - created cats/ and dogs/ subfolders inside train/ and validation/ | |
| - put the cat pictures index 0-999 in data/train/cats |
| #!/bin/bash | |
| # | |
| # Example using getopt (vs builtin getopts) that can also handle long options. | |
| # Another clean example can be found at: | |
| # http://www.bahmanm.com/blogs/command-line-options-how-to-parse-in-bash-using-getopt | |
| # | |
| aflag=n | |
| bflag=n |
| =Navigating= | |
| visit('/projects') | |
| visit(post_comments_path(post)) | |
| =Clicking links and buttons= | |
| click_link('id-of-link') | |
| click_link('Link Text') | |
| click_button('Save') | |
| click('Link Text') # Click either a link or a button | |
| click('Button Value') |