From 5ba0a2ed48edf5c6aa31a83e1aebbec8969611dc Mon Sep 17 00:00:00 2001 From: William Falcon Date: Fri, 12 Jul 2019 14:28:49 -0400 Subject: [PATCH] fixed nccl init --- pytorch_lightning/utils/plotting.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pytorch_lightning/utils/plotting.py b/pytorch_lightning/utils/plotting.py index 95fe64cc..3a8da113 100644 --- a/pytorch_lightning/utils/plotting.py +++ b/pytorch_lightning/utils/plotting.py @@ -1,4 +1,3 @@ -from matplotlib import pyplot as plt import numpy as np np.seterr(divide='ignore', invalid='ignore') @@ -13,6 +12,7 @@ def plot_confusion_matrix(cm, This function prints and plots the confusion matrix. Normalization can be applied by setting `normalize=True`. """ + from matplotlib import pyplot as plt if normalize: cm = cm.astype('float') / cm.sum(axis=1)[:, np.newaxis] print("Normalized confusion matrix")