Comments (6)
I think we can now separate out the modules (multi-crop augmentation pipeline and the architecture) in .py
files and import them in Colab directly to make it a bit less-lengthy. This is just a suggestion and I know the notebook under consideration is just for a dry run.
from swav-tf.
Are you meaning that the logits and labels in criterion will be swapped? If so, how?
Currently computing subloss like this: subloss -= criterion(labels=q, logits=p_unscaled)
The criterion here will be tf.nn.softmax_cross_entropy_with_logits
in my opinion. The choice of labels and logits here is coming from the assumption that we are learning to predict the code from the assigned cluster. If this assumption is flawed then labels
will be p_unscaled
and logits
will be q
.
I think it might be even better to just replicate the following as the authors have done in here. What do you think?
Yes replicating this would be better. It's much more readable.
from swav-tf.
Two normalizations. First, they normalize the embeddings they get from the RN50 backbone, then they pass it through a linear layer (prototype). While training they again normalize this prototype vector.
It seems so. The first normalization is done in the forward_head
(here) and they are taking the weights and normalizing it before the start of each epoch (here).
But in the first normalization it's normalizing the embedding(128 vector) and in the second they are normalizing the weights from the "prototype" layer.
(Wrote this so that we are on same page and if I am mistaken then seeking correction.)
from swav-tf.
Right on both the fronts!
from swav-tf.
Great.
We need to trace what is non-trainable and what is. In the main SwAV code, all the variables with no_grad tag are basically non-trainable.
I might need some help here.
from swav-tf.
@ayulockin we can accomplish this using the following options I assume:
- Explicitly specify which variables to track for gradient computation from the graph.
GradientTape
has got awatch
function that allows us to do this. - We can put a code block outside of the
GradientTape
context so that no gradient gets calculated in the first place. - Use
tf.stop_gradient
as necessary.
But we will figure out more as we proceed.
from swav-tf.
Related Issues (9)
- Copyright information HOT 1
- image loaders don't produce augmentations from the same image HOT 4
- Classify a single image HOT 2
- model loss plateau's after 2 epochs HOT 2
- Pointers on Minimal_Sinkhorn_Knopp.ipynb HOT 1
- Fine-tuning with 10% labeled data with SwAV-learned embeddings
- Linear evaluation on the entire dataset with pre-trained ResNet50 features
- [QUESTION] Difference 10-epochs, 40-epochs HOT 3
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 swav-tf.