sinezhan / deepalplus Goto Github PK
View Code? Open in Web Editor NEWThis is a toolbox for Deep Active Learning, an extension from previous work https://github.com/ej0cl6/deep-active-learning (DeepAL toolbox).
License: MIT License
This is a toolbox for Deep Active Learning, an extension from previous work https://github.com/ej0cl6/deep-active-learning (DeepAL toolbox).
License: MIT License
Dear Repository owners,
I would like to use your deepALplus to do experiments with Deep Active Learning.
However, I always get stuck at line 23 in nets.py. It takes ages to execute but should normally be milliseconds:
self.clf = self.net(dim = dim, pretrained = self.params['pretrained'], num_classes = self.params['num_class']).to(self.device)
The script fails after ~20 min with RuntimeError: cuDNN error: CUDNN_STATUS_EXECUTION_FAILED
.
Do you have any recommendations? Executing the code in https://github.com/ej0cl6/deep-active-learning works fine for me.
Could this be because of cudnn and cuda versions? Are the certain versions one has to use?
I installed using conda. I used cudnn/8.0_v7.0
and cuda/11.0.2
as well as cudnn/11.7_v8.6
amd cuda/11.7.0
and had the same behavior with both.
Thank you.
Hello,
Is there any way to test this code with a custom image dataset?
Thank you
In line 298 and line 299 of data.py, train data are used for testing.
hello,@SineZHAN .
def get_BreakHis(handler, args_task):
download data from https://www.kaggle.com/datasets/ambarish/breakhis and unzip it in data/BreakHis/
data_dir = './data/BreakHis/BreaKHis_v1/BreaKHis_v1/histology_slides/breast'
data = datasets.ImageFolder(root=data_dir, transform=None).imgs
train_ratio = 0.7
test_ratio = 0.3
data_idx = list(range(len(data)))
random.shuffle(data_idx)
train_idx = data_idx[:int(len(data) * train_ratio)]
test_idx = data_idx[int(len(data) * train_ratio):]
X_tr = [np.array(Image.open(data[i][0])) for i in train_idx]
Y_tr = [data[i][1] for i in train_idx]
X_te = [np.array(Image.open(data[i][0])) for i in test_idx]
Y_te = [data[i][1] for i in test_idx]
X_tr = np.array(X_tr, dtype=object)
X_te = np.array(X_te, dtype=object)
Y_tr = torch.from_numpy(np.array(Y_tr))
Y_te = torch.from_numpy(np.array(Y_te))
return Data(X_tr, Y_tr, X_te, Y_te, handler, args_task)
A memory error occurred while running this code!
MemoryError: Unable to allocate 943. KiB for an array with shape (460, 700, 3) and data type uint8
X_tr keeps storing Data, which causes the memory to be full. How can I modify it to work with class data?
Hi is VAAL implementation incorrect in this toolkit. I see that it is very different from the author's original implementation and it also looks incomplete, unusable. Can you please let me know if it is?
Dear Repository owners,
I would like to use your deepALplus to do experiments with Deep Active Learning, but i got a comprehension problem with net_waal.py.
Indeed, at line 81, you recompute the features for labeled and unlabeled data in "with torch.no_grad" loop. Then you compute the gradient penalty and add it to the loss.
Since you used the with torch.no_grad loop, the contibution of the gradient penalty when updating the weight of your features_extractor will be null. and Since at line 64 you set the requires_grad=False for the discriminator the weigths of the discriminator will not be update.
I would like to know why you recomputed the features in the "with torch.no_grad" loop since it seems to make the gradient penalty to have no impact when updating the weight of your entire model.
Thank you.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.