pip install torchsummary or
git clone https://github.com/sksq96/pytorch-summary
from torchsummary import summary
summary(your_model, input_size=(channels, H, W))| # References: | |
| # https://github.com/NVIDIA/nvidia-docker#usage | |
| # http://peterforgacs.github.io/2017/04/18/Docker-basics/ | |
| # | |
| docker run --gpus '"device=1"' -it --rm -v /home/kuohsin/workspace/tensorrt_lab/torch2trt:/workspace tensorrt | |
| docker container ls -a | |
| docker container rm container_id | |
| sudo docker commit container_id image_name |
| # Output one image every second, named out1.png, out2.png, out3.png, etc. | |
| # The %01d dictates that the ordinal number of each output image will be formatted using 1 digits. | |
| ffmpeg -i input.mov -vf fps=1 out%d.png |
pip install torchsummary or
git clone https://github.com/sksq96/pytorch-summary
from torchsummary import summary
summary(your_model, input_size=(channels, H, W))| import tensorflow.contrib.slim as slim | |
| model_vars = tf.trainable_variables() | |
| slim.model_analyzer.analyze_vars(model_vars, print_info=True) | |
| slim.model_analyzer.analyze_ops(tf.compat.v1.get_default_graph(), print_info=True) |
| keys = list(finger_label_dict.keys()) | |
| keys.sort(key=lambda f: int(''.join(filter(str.isdigit, f)))) |
| import sys | |
| import json | |
| import os | |
| import numpy as np | |
| import cv2 | |
| def get_out_filename(input_path): | |
| dir_path = os.path.dirname(input_path) | |
| dir_name = os.path.basename(dir_path) | |
| out_path = dir_name + '_label.txt' |
| """ | |
| """ | |
| import os | |
| import cv2 | |
| IMAGE_WIDTH = 640 | |
| IMAGE_HEIGHT = 480 |
| import sys | |
| import json | |
| import os | |
| import numpy as np | |
| import cv2 | |
| def get_out_filename(input_path): | |
| dir_path = os.path.dirname(input_path) | |
| dir_name = os.path.basename(dir_path) | |
| out_path = dir_name + '_label.txt' |
| name: "CIFAR10_BN" | |
| layer { | |
| name: "data" | |
| type: "Input" | |
| top: "data" | |
| input_param { shape: { dim: 1 dim: 3 dim: 32 dim: 32 } } | |
| } | |
| layer { | |
| name: "conv1" | |
| type: "Convolution" |
| { | |
| "layer": [ | |
| { | |
| "name":"ip1", | |
| "input":[ | |
| "data"], | |
| "output":[ | |
| "ip1"], | |
| "weight":[ | |
| "ip1_0", |