Created
October 8, 2018 10:33
-
-
Save ceshine/789d1a793160aae8ebd5e7432cf2f80f to your computer and use it in GitHub Desktop.
Plotting Script for the TPU blog psot
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
library(ggplot2) | |
library(ggthemes) | |
dat <- data.frame( | |
name = c("CPU", "GPU", "TPU"), | |
time = c(3 * 3600 + 6 * 60 + 4, 3 * 60 + 16, 1 * 60 + 42) | |
) | |
dat$log_time = log(dat$time) | |
ggplot(data=dat, aes(x=name, y=log_time)) + | |
geom_bar(stat='identity') + | |
geom_text(aes(label=paste(time, "s", sep=" ")), vjust=-0.25, size=rel(4)) + | |
theme_wsj() + labs( | |
title="Fashion MNIST Training Time\n(y in log scale)", | |
x="Hardware", | |
y="Time(seconds) - Log Scale" | |
) + theme( | |
title=element_text(size=rel(1.1)), | |
axis.text.y=element_blank(), | |
axis.text.x=element_text(size=rel(.9)) | |
) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment