Look at last recording in example as it has more interesting labels
@@ -43,8 +43,9 @@ tuh.description
###############################################################################
# Iterating through the dataset gives x as ndarray(n_channels x 1) as well as
-# the target as [age of the subject, gender of the subject].
-x, y = tuh[0]
+# the target as [age of the subject, gender of the subject]. Let's look at the last example
+# as it has more interesting age/gender labels (compare to the last row of the dataframe above).
+x, y = tuh[-1]
print('x:', x)
print('y:', y)
@@ -71,8 +72,8 @@ tuh_windows.set_description({
###############################################################################
# Iterating through the dataset gives x as ndarray(n_channels x 1000), y as
-# [age, gender], and ind.
-x, y, ind = tuh_windows[0]
+# [age, gender], and ind. Let's look at the last example again.
+x, y, ind = tuh_windows[-1]
print('x:', x)
print('y:', y)
print('ind:', ind)
@@ -90,9 +91,10 @@ dl = DataLoader(
###############################################################################
# Iterating through the DataLoader gives batch_X as tensor(4 x n_channels x
# 1000), batch_y as [tensor([4 x age of subject]), tensor([4 x gender of
-# subject])], and batch_ind.
+# subject])], and batch_ind. We will iterate to the end to look at the last example
+# again.
for batch_X, batch_y, batch_ind in dl:
- break
+ pass
print('batch_X:', batch_X)
print('batch_y:', batch_y)
print('batch_ind:', batch_ind)
