Comments (5)
Good catch, would you like to submit a PR?
from nsfw_model.
What was the original intent? I'm assuming the "-" is effectively evaluating rather than assigning and causing the line of dropout to basically disappear. "Reenabling" this line seems like it might cause more regularization than you intended.
If regularization is intended in both locations, it seems like a SpatialDropout2D might be a better fit while perhaps reducing the rate in both places. My limited experience has led me to something like this for use in my own finetuning:
x = model_mn.output #basically MobileNetV2 without the top
x = SpatialDropout2D(0.1)(x)
x = GlobalAveragePooling2D()(x)
x = Dense(128, name='fc_final', activation='relu')(x)
x = Dropout(0.25, name='dropout')(x)
x = Dense(NUM_CLASSES, name='classifier', activation='softmax')(x)
I see slightly better accuracy with this approach than my prior approach of no spatial dropout and setting just the one dropout to 0.45. But of course, everybody's use case is a little different and in particular with your dataset being as large as it is, I'm not sure what the best route is. (My current dataset is about 100K with four classes but some oversampling due to class imbalance, as a reference point.) What variant do you think will work best for your situation?
(Also - I'm quite hesitant to submit a PR without running it myself, and do not currently have a great system to test this large of a dataset on.)
from nsfw_model.
You're right. I tried training with the dropout returning, and it destroyed training performance.
from nsfw_model.
#29 Here's a PR for nixing the bad dropout line.
from nsfw_model.
This got merged a long time ago, closing!
from nsfw_model.
Related Issues (20)
- Trying to cache the loaded model in Django
- False Positives HOT 1
- Model Weight License HOT 2
- Not trained on Dildos
- Input img/list
- How to inference use the. pb file of the inceptionv3 model?
- How i load this on Celery worker?
- How to disable spam? HOT 7
- Colab Script For Training
- Cannot download HOT 1
- Nude HOT 1
- Tflite - android studio
- 244 - 299 problem HOT 1
- cant run detection with nsfwjs
- Getting TypeError: Descriptors cannot not be created directly HOT 3
- Incorrect NSFW Classification for Civilization VI Leaders' Images
- ModuleNotFoundError: No module named 'tensorflow.python.training.tracking' HOT 1
- exit with code 4
- i can not pip install on mac m1 chip, with Python 3.9.18
- AttributeError: module 'tensorflow._api.v2.compat.v1' has no attribute 'estimator' HOT 4
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 nsfw_model.