Skip to content

Commit f04db99

Browse files
committed
dict modAl update and documentation
1 parent cce7933 commit f04db99

2 files changed

Lines changed: 4 additions & 6 deletions

File tree

modAL/dropout.py

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -276,10 +276,7 @@ def get_predictions(classifier: BaseEstimator, X: modALinput, dropout_layer_inde
276276
Return:
277277
prediction: list with all predictions
278278
"""
279-
280-
#dbg
281-
sample_per_forward_pass = 2
282-
279+
283280
predictions = []
284281
# set dropout layers to train mode
285282
set_dropout_mode(classifier.estimator.module_, dropout_layer_indexes, train_mode=True)

modAL/utils/data.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -103,9 +103,10 @@ def retrieve_rows(X: modALinput,
103103
elif isinstance(X, list):
104104
return np.array(X)[I].tolist()
105105
elif isinstance(X, dict):
106+
X_return = {}
106107
for key, value in X.items():
107-
X[key] = retrieve_rows(value, I)
108-
return X
108+
X_return[key] = retrieve_rows(value, I)
109+
return X_return
109110
elif isinstance(X, np.ndarray):
110111
return X[I]
111112
elif torch.is_tensor(X):

0 commit comments

Comments
 (0)