Skip to content

Instantly share code, notes, and snippets.

@ceshine
Created October 8, 2018 10:33
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save ceshine/789d1a793160aae8ebd5e7432cf2f80f to your computer and use it in GitHub Desktop.
Save ceshine/789d1a793160aae8ebd5e7432cf2f80f to your computer and use it in GitHub Desktop.
Plotting Script for the TPU blog psot
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