diff --git a/api/python/notebooks/experimental/pytorch.ipynb b/api/python/notebooks/experimental/pytorch.ipynb index 5af72e253..54b0fd873 100644 --- a/api/python/notebooks/experimental/pytorch.ipynb +++ b/api/python/notebooks/experimental/pytorch.ipynb @@ -347,7 +347,7 @@ }, { "cell_type": "code", - "execution_count": null, + "execution_count": 9, "id": "733ec2fb", "metadata": {}, "outputs": [ @@ -355,10 +355,11 @@ "name": "stdout", "output_type": "stream", "text": [ - "Epoch 1: Train Loss: 0.1156352 Accuracy 0.4472\n", - "Epoch 2: Train Loss: 0.1096967 Accuracy 0.7261\n", - "Epoch 3: Train Loss: 0.1082206 Accuracy 0.7729\n", - "Epoch 4: Train Loss: 0.1071653 Accuracy 0.8268\n" + "Epoch 1: Train Loss: 0.1156322 Accuracy 0.4494\n", + "Epoch 2: Train Loss: 0.1095988 Accuracy 0.7357\n", + "Epoch 3: Train Loss: 0.1089615 Accuracy 0.7300\n", + "Epoch 4: Train Loss: 0.1080885 Accuracy 0.7275\n", + "Epoch 5: Train Loss: 0.1101440 Accuracy 0.4220\n" ] } ], @@ -397,7 +398,7 @@ }, { "cell_type": "code", - "execution_count": null, + "execution_count": 10, "id": "d3e33edc", "metadata": {}, "outputs": [], @@ -417,10 +418,21 @@ }, { "cell_type": "code", - "execution_count": null, + "execution_count": 11, "id": "00e12182", "metadata": {}, - "outputs": [], + "outputs": [ + { + "data": { + "text/plain": [ + "tensor([1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1])" + ] + }, + "execution_count": 11, + "metadata": {}, + "output_type": "execute_result" + } + ], "source": [ "model.eval()\n", "\n", @@ -444,10 +456,25 @@ }, { "cell_type": "code", - "execution_count": null, + "execution_count": 12, "id": "1cfff865", "metadata": {}, - "outputs": [], + "outputs": [ + { + "data": { + "text/plain": [ + "array(['basal cell', 'basal cell', 'basal cell', 'basal cell',\n", + " 'basal cell', 'basal cell', 'basal cell', 'basal cell',\n", + " 'basal cell', 'basal cell', 'basal cell', 'basal cell',\n", + " 'basal cell', 'basal cell', 'basal cell', 'basal cell'],\n", + " dtype=object)" + ] + }, + "execution_count": 12, + "metadata": {}, + "output_type": "execute_result" + } + ], "source": [ "cell_type_encoder = experiment_datapipe.obs_encoders()[\"cell_type\"]\n", "\n", @@ -466,10 +493,145 @@ }, { "cell_type": "code", - "execution_count": null, + "execution_count": 13, "id": "f4ac8087", "metadata": {}, - "outputs": [], + "outputs": [ + { + "data": { + "text/html": [ + "
\n", + " | actual cell type | \n", + "predicted cell type | \n", + "
---|---|---|
0 | \n", + "epithelial cell | \n", + "basal cell | \n", + "
1 | \n", + "epithelial cell | \n", + "basal cell | \n", + "
2 | \n", + "epithelial cell | \n", + "basal cell | \n", + "
3 | \n", + "epithelial cell | \n", + "basal cell | \n", + "
4 | \n", + "epithelial cell | \n", + "basal cell | \n", + "
5 | \n", + "epithelial cell | \n", + "basal cell | \n", + "
6 | \n", + "epithelial cell | \n", + "basal cell | \n", + "
7 | \n", + "epithelial cell | \n", + "basal cell | \n", + "
8 | \n", + "epithelial cell | \n", + "basal cell | \n", + "
9 | \n", + "epithelial cell | \n", + "basal cell | \n", + "
10 | \n", + "epithelial cell | \n", + "basal cell | \n", + "
11 | \n", + "epithelial cell | \n", + "basal cell | \n", + "
12 | \n", + "epithelial cell | \n", + "basal cell | \n", + "
13 | \n", + "epithelial cell | \n", + "basal cell | \n", + "
14 | \n", + "epithelial cell | \n", + "basal cell | \n", + "
15 | \n", + "epithelial cell | \n", + "basal cell | \n", + "