-
Notifications
You must be signed in to change notification settings - Fork 323
DBAL with Image Data implementation using modAL #48
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
Codecov Report
@@ Coverage Diff @@
## dev #48 +/- ##
=======================================
Coverage 97.17% 97.17%
=======================================
Files 31 31
Lines 1629 1629
=======================================
Hits 1583 1583
Misses 46 46 Continue to review full report at Codecov.
|
It seems to be working way better now with a pool2d of size 5 (I was doing pool2d((2,2)) in my code |
Thanks! From the first glance, I don't know what might be wrong, so I'll take a detailed look ASAP, hopefully today! I'll also merge the PR then. |
print('Accuracy after query {n}: {acc:0.4f}'.format(n=index + 1, acc=model_accuracy)) | ||
perf_hist = [model_accuracy] | ||
|
||
np.save('/home/damien/Results/keras_modal_entropy.npy', perf_hist) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hardcoded path, should be removed eventually!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
oh yes sure my bad
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
np :)
I have checked the code, along with the implementation of Yarin Gal. What is missing in his implementation is the actual training part, which might be crucial. Here, when you call So, I started to experiment with this, I'll let you know the results! (Also I have pointed out a hardcoded path in the code, that should be removed eventually.) |
Yes there is no training in yarin gal's code, just an acquisition example. on the other hand there is a training in riashat islam's code, although I find this implementation very messy, but it works. Btw, to this end, maybe a method Also I think there might be a mistake in my query_strategy function |
Cool! I have merged the PR, thank you! Also, I propose to implement the acquisition functions to modAL directly as a feature, not just a custom query strategy in the example. I have just created the feature/bayesianDL branch for this purpose. One challenge would be to write these functions in a backend-agnostic way, which may be difficult. I'll take a shot tomorrow, feel free to contribute if you are interested! Thanks again for the PR! |
I am totally interested in contributing! |
I created an example script trying to reproduce the results of Deep Bayesian Active Learning with Image Data using modAL.
I used this keras code from one of the authors.
I cannot think of anything I am doing differently and yet their code works and not mine.
For the acquisition function instead of using their modified keras, i used yarin gal's implementation (first author).
Can you spot any mistake in my code?
EDIT: I actually found a mistake in my code, I was not really computing the entropy but rather the other half of BALD function. I fixed this mistake and am currently running the code.
EDIT2: Still not working