Comments (5)
After trying to consistently use this in my own code, I am less sure if we should adopt explicit layer naming because I found it did make my code somewhat less readable. To summarize:
Pros:
- Makes it much more intuitive to use models as building blocks in complicated structures (e.g. encoder/decoder nets, student/teacher for KD)
- Makes model summary more readable
Cons:
- Makes code less readable: adds an additional argument to every 'module' function (
resnet_block()
etc.) and occasionally forces the use ofLambda
functions.
Personally, I think readable code strongly outweighs a readable model summary, but the building-block argument is probably decisive here. I would like to adopt a consistent policy for all of zoo
. Please share any objections to the above reasoning; otherwise let's proceed with adding this for all models.
from zoo.
I am still very much in favor of this, as I am still running into cases (knowledge distillation) that need this. I had forgotten I was assigned to this. I am a little busy at the moment but since I need this for KD I will make a PR at some point to the models in zoo that do not have this.
from zoo.
As an example of the kind of confusion this might prevent:
The zoo example code that deals with exactly this point uses get layer by name:
outputs=base_model.get_layer("average_pooling2d_8").output
The example code fragment does not actually work in isolation since the the network only has 3 average_pooling2d
layers. It does work when following the examples one by one in the same session as this is the third example with the same network, so by creating the previous 2 there are enough average pooling layers to get to number 8.
from zoo.
I thought this would be the standard from now on, but I see QuickNet unfortunately still has layer names like "add_3" and "quant_conv2d_5". Do we or do we not enforce this policy?
from zoo.
Models which currently have explicit layers names, so no auto-generated names, based on the model summaries embedded in the docs:
-
sota
-
QuickNet
-
QuickNetLarge
-
QuickNetXL
-
-
literature
-
BinaryAlexNet
-
BiRealNet
-
BinaryResNetE18
-
BinaryDenseNet28
-
BinaryDenseNet37
-
BinaryDenseNet37Dilated
-
BinaryDenseNet45
-
DoReFaNet
-
MeliusNet22
-
RealToBinaryNet
-
XNORNet
-
from zoo.
Related Issues (20)
- Unexpected behavior of the "include_top" argument HOT 3
- Unexpected behavior of the "preprocess_input" function HOT 1
- Make ordering of docstring constistent
- Snapshot tests of model summaries HOT 2
- RFC: structure change HOT 3
- Add model accuracies to docstrings
- QuickNet(Large) models don't match released h5 files
- Support TensorFlow 2.2 HOT 3
- QuickNet model and flip_ratio metric do not work together HOT 3
- Update weights and parameters in docstrings
- QuickNet no-top models pretrained weights are not working as expected HOT 1
- No 'sota' module HOT 2
- Speech Models HOT 2
- About RealToBinaryNet model HOT 14
- Intermediate results of training R2B model HOT 5
- Data directory HOT 1
- Reproducing R2B model HOT 6
- Help, no logs are printed! HOT 2
- The usage of data.cache() causes the run out of memory. HOT 5
- Drop Python 3.6 support
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 zoo.