Skip to content

Commit e868b98

Browse files
committed
Modified CNN Assignment codes
1 parent 4dc6d6d commit e868b98

File tree

3 files changed

+3
-4
lines changed

3 files changed

+3
-4
lines changed

Labs/Week_3/CNN/Assignment.ipynb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -138,7 +138,7 @@
138138
"outputs": [],
139139
"source": [
140140
"# Load the data into training and testing sets\n",
141-
"x_train, y_train, x_test, y_test = load_data()"
141+
"x_train, y_train, x_test, y_test = load_data(data_dir='students/<your_username>')"
142142
]
143143
},
144144
{

Labs/Week_3/CNN/helpers/methods.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,8 +22,8 @@ def detect_and_set_device():
2222
return 'CPU'
2323

2424
# Loads the Fashion MNIST dataset
25-
def load_data():
26-
data_dir = 'data'
25+
def load_data(data_dir: str):
26+
data_dir = data_dir
2727
files = [
2828
'train-images-idx3-ubyte.gz',
2929
'train-labels-idx1-ubyte.gz',

Labs/Week_3/CNN/tests/test_methods.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@
22
import numpy as np
33
import pytest
44

5-
@pytest.fixture
65
def test_preprocess_data(x_train_processed, y_train_processed, x_test_processed, y_test_processed):
76
# Check normalization
87
assert np.max(x_train_processed) <= 1.0 and np.min(x_train_processed) >= 0.0, "Training data should be normalized"

0 commit comments

Comments
 (0)