caec2c73aad40c0e632e978964ec5c3cf4773c9e,examples/pytorch_integration.py,,,#,41
Before Change
n_queries = 10
for idx in range(n_queries):
query_idx, query_instance = learner.query(X_pool, n_instances=100)
print(query_idx)
learner.teach(X_pool[query_idx], y_pool[query_idx], only_new=True)
// remove queried instance from pool
X_pool = np.delete(X_pool, query_idx, axis=0)
y_pool = np.delete(y_pool, query_idx, axis=0)
After Change
mnist_data = MNIST(".", download=True, transform=ToTensor())
dataloader = DataLoader(mnist_data, shuffle=True, batch_size=60000)
X, y = next(iter(dataloader))
// read training data
X_train, X_test, y_train, y_test = X[:50000], X[50000:], y[:50000], y[50000:]
X_train = X_train.reshape(50000, 1, 28, 28)
In pattern: SUPERPATTERN
Frequency: 3
Non-data size: 3
Instances
Project Name: modAL-python/modAL
Commit Name: caec2c73aad40c0e632e978964ec5c3cf4773c9e
Time: 2019-06-02
Author: theodore.danka@gmail.com
File Name: examples/pytorch_integration.py
Class Name:
Method Name:
Project Name: GoogleCloudPlatform/python-docs-samples
Commit Name: 63ea9b2637ce8e478c854b68d8af7ca42e19abcf
Time: 2020-09-22
Author: 35782177+melaniedejong@users.noreply.github.com
File Name: iam/api-client/quickstart.py
Class Name:
Method Name: quickstart
Project Name: ellisdg/3DUnetCNN
Commit Name: 8215a34d3203f45254b06a63271fe8010d351e6f
Time: 2017-02-20
Author: david.ellis@unmc.edu
File Name: UnetTraining.py
Class Name:
Method Name: get_training_weights