Skip to content

Commit 63419d4

Browse files
Programmer-RD-AIProgrammer-RD-AI
andcommitted
gg
Co-Authored-By: Ranuga <[email protected]>
1 parent 7ee0cfa commit 63419d4

File tree

3 files changed

+230
-424
lines changed

3 files changed

+230
-424
lines changed

.ipynb_checkpoints/03-checkpoint.ipynb

Lines changed: 105 additions & 344 deletions
Large diffs are not rendered by default.

.virtual_documents/03.ipynb.py

Lines changed: 12 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -115,11 +115,6 @@ def forward(self,X) -> torch.Tensor():
115115
model_0(dummy_X)
116116

117117

118-
<<<<<<< Updated upstream
119-
=======
120-
<<<<<<< Updated upstream
121-
=======
122-
>>>>>>> Stashed changes
123118
from helper_functions import *
124119

125120

@@ -570,17 +565,23 @@ def make_predictions(model,data,device):
570565
y_pred_tensor[:10]
571566

572567

573-
<<<<<<< Updated upstream
574-
get_ipython().getoutput("pip install torchmetrics mlxtend")
568+
import torchmetrics,mlxtend
575569

576570

577-
=======
571+
mlxtend.__version__
578572

579573

574+
torchmetrics.__version__
580575

581-
get_ipython().getoutput("pip install torchmetrics mlxtend")
576+
577+
get_ipython().getoutput("pip install mlxtend==0.19.0")
578+
579+
580+
from torchmetrics import ConfusionMatrix
581+
from mlxtend.plotting import plot_confusion_matrix
582+
confmat = ConfusionMatrix(num_classes=len(class_names))
583+
confmat_tensor = confmat(preds=y_pred_tensor,target=test_data.targets)
584+
fig,ax = plot_confusion_matrix(conf_mat=confmat_tensor.numoy(),class_names=class_names,figsize=(10,7))
582585

583586

584-
>>>>>>> Stashed changes
585-
>>>>>>> Stashed changes
586587

0 commit comments

Comments
 (0)