layer | resnet18 | resnet34 | resnet50 | resnet101 |
---|---|---|---|---|
conv1 | 7 | 7 | 7 | 7 |
maxpool | 11 | 11 | 11 | 11 |
layer1 | 43 | 59 | 35 | 35 |
layer2 | 99 | 179 | 91 | 91 |
layer3 | 211 | 547 | 267 | 811 |
layer4 | 435 | 899 | 427 | 971 |
This file contains 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
{ | |
"id": "20850d4a-310a-4ab7-b33d-d33528b832af", | |
"measurement": "gpu_mycollector", | |
"app": "gpu_mem", | |
"cells": [{ | |
"x": 0, | |
"y": 0, | |
"w": 4, | |
"h": 4, | |
"i": "da71e439-25ac-4bf7-9276-697ff69e1604", |
This file contains 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
M_C = ['.-', '-...', '-.-.', '-..', '.', '..-.', '--.', '....', '..', '.---', '-.-', '.-..', '--', '-.', '---', '.--.', '--.-', '.-.', '...', '-', '..-', '...-', '.--', '-..-', '-.--', '--..'] | |
A_C = ['A', 'B', 'C', 'D', 'E', 'F', 'G', 'H', 'I', 'J', 'K', 'L', 'M', 'N', 'O', 'P', 'Q', 'R', 'S', 'T', 'U', 'V', 'W', 'X', 'Y', 'Z'] | |
M_C += ['.----', '..---', '...--', '....-', '.....', '-....', '--...', '---..', '----.', '-----'] | |
A_C += ['1', '2', '3', '4', '5', '6', '7', '8', '9', '10'] | |
BASE_DICT = dict(zip(M_C, A_C)) | |
TASH = 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' |
This file contains 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
addpath('util/jsonlab/'); | |
addpath('src'); | |
addpath('util'); | |
addpath('util/ojwoodford-export_fig-5735e6d/'); | |
%addpath('/data/Repo/Realtime_Multi-Person_Pose_Estimation/training/dataset/COCO/coco/MatlabAPI'); | |
fid = fopen('../val2014_flist.2k.csv'); | |
data=textscan(fid,'%f %s','delimiter',','); | |
fclose(fid); | |
display(data); | |
for i = 1:length(data{1}) |
This file contains 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 cv2 | |
import sys | |
import numpy as np | |
import imutils | |
vids = [0] if len(sys.argv) < 2 else map(int, sys.argv[1].split(',')) | |
caps = [cv2.VideoCapture(_) for _ in vids] | |
scale = .5 |
This file contains 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 torch | |
from torch.nn import Conv2d, Sequential | |
import time | |
from torchvision import models | |
def score(arch, batch_size=32, num_batches=10): | |
model = models.__dict__[arch]().cuda() | |
data = torch.rand((batch_size, 3, 224, 224)).cuda() |
This file contains 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
Minimum float positive value: 1.175494E-38 | |
A: 0.403069, HEX: 0x3ece5f18 | |
A: 4.0306925774e-01, HEX: 0x3ece5f18 | |
A: 3.7674255964e-06, HEX: 0x367cd3e1 | |
A: 3.8132049561e+01, HEX: 0x42188738 | |
real 0m0.057s | |
user 0m0.056s | |
sys 0m0.000s | |
Minimum float positive value: 1.175494E-38 |
This file contains 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 multiprocessing as mp | |
import time | |
import random | |
todo = mp.Value('i', 0) | |
done = mp.Value('i', 0) | |
idx = mp.Value('i', 0) | |
finish = mp.Value('i', 0) | |
def worker(todo, done, idx, finish): |
This file contains 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 torch | |
from torch.nn.functional import log_softmax | |
def sigmoid_focal_loss(logits, target, gamma=2., alpha=0.25): | |
num_classes = logits.shape[1] | |
dtype = target.dtype | |
device = target.device | |
class_range = torch.arange(0, num_classes, dtype=dtype, device=device).unsqueeze(0) | |
t = target.unsqueeze(1) |
This file contains 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 torch | |
import torch.nn as nn | |
import time | |
class Net(nn.Module): | |
def __init__(self, ch=3): | |
super(Net, self).__init__() | |
self.model = nn.Sequential( | |
nn.Conv2d(ch, 8, 3, padding=1), | |
nn.BatchNorm2d(8), |