Skip to content

Commit 6172cf2

Browse files
committed
Define constants and configurations
1 parent 8a7b241 commit 6172cf2

File tree

1 file changed

+32
-0
lines changed

1 file changed

+32
-0
lines changed

notebooks/04_bias_analysis.ipynb

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,38 @@
4646
"\n",
4747
"from src.gradcam import GradCAM\n"
4848
]
49+
},
50+
{
51+
"cell_type": "code",
52+
"execution_count": 4,
53+
"id": "acd24d80",
54+
"metadata": {},
55+
"outputs": [],
56+
"source": [
57+
"# Define constants and configurations\n",
58+
"\n",
59+
"DATA_DIR = Path(\"static/output\") \n",
60+
"MODEL_PATH = Path(\"saved_models/resnet50_best.pt\")\n",
61+
"\n",
62+
"device = torch.device(\"cuda\" if torch.cuda.is_available() else \"cpu\")\n",
63+
"\n",
64+
"transform = transforms.Compose([\n",
65+
" transforms.Resize((224,224)),\n",
66+
" transforms.ToTensor(),\n",
67+
" transforms.Normalize(\n",
68+
" mean=[0.485, 0.456, 0.406],\n",
69+
" std=[0.229, 0.224, 0.225]\n",
70+
" )\n",
71+
"])\n"
72+
]
73+
},
74+
{
75+
"cell_type": "code",
76+
"execution_count": null,
77+
"id": "98b31098",
78+
"metadata": {},
79+
"outputs": [],
80+
"source": []
4981
}
5082
],
5183
"metadata": {

0 commit comments

Comments
 (0)