diff --git a/openfl-tutorials/deprecated/native_api/Federated_Pytorch_MNIST_Tutorial.ipynb b/openfl-tutorials/deprecated/native_api/Federated_Pytorch_MNIST_Tutorial.ipynb index 29833705f0..10e83949df 100644 --- a/openfl-tutorials/deprecated/native_api/Federated_Pytorch_MNIST_Tutorial.ipynb +++ b/openfl-tutorials/deprecated/native_api/Federated_Pytorch_MNIST_Tutorial.ipynb @@ -135,8 +135,10 @@ "source": [ "from torch.utils.tensorboard import SummaryWriter\n", "\n", + "writer = SummaryWriter('./logs/cnn_mnist', flush_secs=5)\n", + "\n", + "\n", "def write_metric(node_name, task_name, metric_name, metric, round_number):\n", - " writer = SummaryWriter('./logs/cnn_mnist', flush_secs=5)\n", " writer.add_scalar(\"{}/{}/{}\".format(node_name, task_name, metric_name),\n", " metric, round_number)" ]