File tree 2 files changed +9
-9
lines changed
model-training/tensorflow/notebooks
workflow-orchestration/metaflow/metaflow-model-evaluation
2 files changed +9
-9
lines changed Original file line number Diff line number Diff line change 26
26
},
27
27
"outputs" : [],
28
28
"source" : [
29
- " %pip install -U \" comet_ml>=3.44.0\" tensorflow tensorflow-datasets"
29
+ " %pip install -U \" comet_ml>=3.44.0\" tensorflow \" keras>=3.0.0 \" tensorflow-datasets"
30
30
]
31
31
},
32
32
{
48
48
"source" : [
49
49
" import comet_ml\n " ,
50
50
" \n " ,
51
- " comet_ml.login(project_name=\" comet-example-tensorboard\" )"
51
+ " comet_ml.login(project_name=\" comet-example-tensorboard-gradient-tape-notebook \" )"
52
52
]
53
53
},
54
54
{
280
280
" \n " ,
281
281
" for epoch in range(EPOCHS):\n " ,
282
282
" # Reset the metrics at the start of the next epoch\n " ,
283
- " train_loss.reset_states ()\n " ,
284
- " train_accuracy.reset_states ()\n " ,
285
- " test_loss.reset_states ()\n " ,
286
- " test_accuracy.reset_states ()\n " ,
283
+ " train_loss.reset_state ()\n " ,
284
+ " train_accuracy.reset_state ()\n " ,
285
+ " test_loss.reset_state ()\n " ,
286
+ " test_accuracy.reset_state ()\n " ,
287
287
" \n " ,
288
288
" for images, labels in train_ds:\n " ,
289
289
" train_step(images, labels)\n " ,
346
346
"name" : " python" ,
347
347
"nbconvert_exporter" : " python" ,
348
348
"pygments_lexer" : " ipython3" ,
349
- "version" : " 3.9.1 "
349
+ "version" : " 3.10.12 "
350
350
}
351
351
},
352
352
"nbformat" : 4 ,
353
- "nbformat_minor" : 1
353
+ "nbformat_minor" : 4
354
354
}
Original file line number Diff line number Diff line change @@ -215,7 +215,7 @@ def evaluate_classification_metrics(self):
215
215
)
216
216
accuracy = accuracy_score (labels , torch .argmax (predictions , dim = 1 ))
217
217
218
- self .comet_experiment .log_metrics (clf_metrics )
218
+ self .comet_experiment .log_metrics ({ "evaluation_by_class" : clf_metrics } )
219
219
self .comet_experiment .log_metrics ({"accuracy" : accuracy })
220
220
221
221
log_model (self .comet_experiment , model , self .input )
You can’t perform that action at this time.
0 commit comments