Skip to content

Commit

Permalink
Commented latex plotting out
Browse files Browse the repository at this point in the history
  • Loading branch information
FeGeyer committed Oct 22, 2020
1 parent 89cf708 commit 521c77c
Show file tree
Hide file tree
Showing 4 changed files with 40 additions and 40 deletions.
20 changes: 10 additions & 10 deletions dl_framework/callbacks.py
Original file line number Diff line number Diff line change
Expand Up @@ -138,16 +138,16 @@ def plot_loss(self, log=True):
import matplotlib as mpl

# make nice Latex friendly plots
mpl.use("pgf")
mpl.rcParams.update(
{
"font.size": 12,
"font.family": "sans-serif",
"text.usetex": True,
"pgf.rcfonts": False,
"pgf.texsystem": "lualatex",
}
)
# mpl.use("pgf")
# mpl.rcParams.update(
# {
# "font.size": 12,
# "font.family": "sans-serif",
# "text.usetex": True,
# "pgf.rcfonts": False,
# "pgf.texsystem": "lualatex",
# }
# )

plt.plot(self.train_losses, label="training loss")
plt.plot(self.valid_losses, label="validation loss")
Expand Down
20 changes: 10 additions & 10 deletions dl_framework/inspection.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,16 +8,16 @@
from dl_framework.model import load_pre_model

# make nice Latex friendly plots
mpl.use("pgf")
mpl.rcParams.update(
{
"font.size": 12,
"font.family": "sans-serif",
"text.usetex": True,
"pgf.rcfonts": False,
"pgf.texsystem": "lualatex",
}
)
# mpl.use("pgf")
# mpl.rcParams.update(
# {
# "font.size": 12,
# "font.family": "sans-serif",
# "text.usetex": True,
# "pgf.rcfonts": False,
# "pgf.texsystem": "lualatex",
# }
# )


def load_pretrained_model(arch_name, model_path):
Expand Down
20 changes: 10 additions & 10 deletions gaussian_sources/inspection.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,16 +8,16 @@
import pytorch_msssim

# make nice Latex friendly plots
mpl.use("pgf")
mpl.rcParams.update(
{
"font.size": 14,
"font.family": "sans-serif",
"text.usetex": True,
"pgf.rcfonts": False,
"pgf.texsystem": "lualatex",
}
)
# mpl.use("pgf")
# mpl.rcParams.update(
# {
# "font.size": 14,
# "font.family": "sans-serif",
# "text.usetex": True,
# "pgf.rcfonts": False,
# "pgf.texsystem": "lualatex",
# }
# )

plot_mode = "png"

Expand Down
20 changes: 10 additions & 10 deletions mnist_cnn/scripts/visualize.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,16 +7,16 @@
import matplotlib as mpl

# make nice Latex friendly plots
mpl.use("pgf")
mpl.rcParams.update(
{
"font.size": 12,
"font.family": "sans-serif",
"text.usetex": True,
"pgf.rcfonts": False,
"pgf.texsystem": "lualatex",
}
)
# mpl.use("pgf")
# mpl.rcParams.update(
# {
# "font.size": 12,
# "font.family": "sans-serif",
# "text.usetex": True,
# "pgf.rcfonts": False,
# "pgf.texsystem": "lualatex",
# }
# )


def plot_results(inp, pred, truth, model_path, save=False):
Expand Down

0 comments on commit 521c77c

Please sign in to comment.