Skip to content

Commit

Permalink
Add directory for flame graphs and add bash scripts
Browse files Browse the repository at this point in the history
  • Loading branch information
MarcusFra committed Oct 5, 2020
1 parent 88287c7 commit 0eaec9c
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 2 deletions.
File renamed without changes.
3 changes: 3 additions & 0 deletions chapter7/flame_graphs/create_flame_graph_bad_random.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
#!/usr/bin/env bash

py-spy record -r 99 -d 30 -o badrandom.svg -- python bad_random.py
3 changes: 3 additions & 0 deletions chapter7/flame_graphs/create_flame_graph_good_random.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
#!/usr/bin/env bash

py-spy record -r 99 -d 30 -o goodrandom.svg -- python good_random.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,7 @@
from torch.utils.tensorboard import SummaryWriter
from torchvision import datasets, transforms,models
import torch.utils.data
from PIL import Image
import numpy as np


model = models.resnet18(pretrained=True)
device = "cuda:0"
Expand Down

0 comments on commit 0eaec9c

Please sign in to comment.