Comments (4)
I cannot reproduce this issue. For instance the following works fine:
from importance_sampling import ImportanceTraining
import efficientnet.keras as efn
import numpy as np
# dummy dataset
x = np.random.rand(1000, 300, 300, 3)
y = np.random.rand(1000, 1000)
y /= y.sum(axis=1, keepdims=True)
model = efn.EfficientNetB3(weights='imagenet')
model.compile(loss="categorical_crossentropy", optimizer="sgd")
model.fit(x, y, batch_size=10)
wrapped = ImportanceTraining(model)
wrapped.fit(x, y, batch_size=10)
In addition, both models fail with OOM with a batch size of 32 in a GTX 1080 Ti. Could you please provide a small example to reproduce your issue?
from importance-sampling.
To clarify, the problem occurs even if IS is not enabled (ie if the threshold condition is not met). It seems that simply wrapping the model with ImportanceTraining()
makes the GPU memory usage of EfficientNet jump through the roof.
from importance-sampling.
Thanks for taking the time, great to hear that this is an issue somewhere on my side and not a limitation of this method. I'll try to reproduce my problem starting from your working example to see what caused it.
Regarding the batch size, this is probably just because my images are smaller (165x95).
from importance-sampling.
Feel free to reopen if you are still experiencing the problem.
from importance-sampling.
Related Issues (20)
- Addition of RAIS in the implemented methods
- The result seems okay, but there are a few confusing things HOT 2
- Fail when metric given as function HOT 9
- About the complete importance sampling code HOT 9
- Add initial_epoch to ImportanceTraining classes
- Remove unnecessary loading of validation data to memory HOT 2
- Failed when using ModelCheckpoint callback HOT 3
- Port to tensorflow 2 HOT 20
- Support of networks with multiple outputs HOT 10
- How do I get the serial Numbers of important samples HOT 1
- Memory leak? HOT 2
- Question regarding Eq. 29 HOT 1
- Question regarding maximum variance reduction & speedup HOT 4
- RuntimeError: The layer has never been called and thus has no defined output shape. HOT 6
- Adjust Learning rate
- Compatibility with tensorflow = 2.5.0 and Keras = 2.4 HOT 4
- tensorflow and keras versions HOT 2
- Some confusion about the fast grads calculation when converting to Pytorch. HOT 3
- Would it be possible to calculate b from tau_threshold?
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from importance-sampling.