Skip to content

Commit 04d7cb3

Browse files
authored
Fixing the typo in attention_mil_classification.ipynb (#2021)
* Update attention_mil_classification.ipynb * Update
1 parent d780ebb commit 04d7cb3

File tree

3 files changed

+4
-4
lines changed

3 files changed

+4
-4
lines changed

examples/vision/attention_mil_classification.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -393,7 +393,7 @@ class weighting should be considered.
393393

394394

395395
def compute_class_weights(labels):
396-
# Count number of postive and negative bags.
396+
# Count number of positive and negative bags.
397397
negative_count = len(np.where(labels == 0)[0])
398398
positive_count = len(np.where(labels == 1)[0])
399399
total_count = negative_count + positive_count

examples/vision/ipynb/attention_mil_classification.ipynb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -502,7 +502,7 @@
502502
"source": [
503503
"\n",
504504
"def compute_class_weights(labels):\n",
505-
" # Count number of postive and negative bags.\n",
505+
" # Count number of positive and negative bags.\n",
506506
" negative_count = len(np.where(labels == 0)[0])\n",
507507
" positive_count = len(np.where(labels == 1)[0])\n",
508508
" total_count = negative_count + positive_count\n",
@@ -737,4 +737,4 @@
737737
},
738738
"nbformat": 4,
739739
"nbformat_minor": 0
740-
}
740+
}

examples/vision/md/attention_mil_classification.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -416,7 +416,7 @@ Using class weights, the model will tend to give a higher weight to the rare cla
416416
```python
417417

418418
def compute_class_weights(labels):
419-
# Count number of postive and negative bags.
419+
# Count number of positive and negative bags.
420420
negative_count = len(np.where(labels == 0)[0])
421421
positive_count = len(np.where(labels == 1)[0])
422422
total_count = negative_count + positive_count

0 commit comments

Comments
 (0)