Skip to content

Commit e5530b8

Browse files
committed
updated comments
removed tqdm
1 parent e82487f commit e5530b8

File tree

1 file changed

+4
-5
lines changed

1 file changed

+4
-5
lines changed

examples/pytorch_integration.py

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,15 @@
11
"""
2-
This example demonstrates how to use the active learning interface with Keras.
3-
The example uses the scikit-learn wrappers of Keras. For more info, see https://keras.io/scikit-learn-api/
2+
This example demonstrates how to use the active learning interface with Pytorch.
3+
The example uses Skorch, a scikit learn wrapper of Pytorch.
4+
For more info, see https://skorch.readthedocs.io/en/stable/
45
"""
56

67
import torch
7-
import keras
88
import numpy as np
99
from keras.datasets import mnist
1010
from torch import nn
1111
from skorch import NeuralNetClassifier
1212
from modAL.models import ActiveLearner
13-
from tqdm import tqdm
1413

1514
# build class for the skorch API
1615
class Torch_Model(nn.Module):
@@ -84,7 +83,7 @@ def forward(self, x):
8483

8584
# the active learning loop
8685
n_queries = 10
87-
for idx in tqdm(range(n_queries)):
86+
for idx in range(n_queries):
8887
query_idx, query_instance = learner.query(X_pool, n_instances=100)
8988
print(query_idx)
9089
learner.teach(X_pool[query_idx], y_pool[query_idx], only_new=True)

0 commit comments

Comments
 (0)