Comments (4)
Hi @Antinomy20001,
Yes this function is a little bit tricky. The thing is that during one training step we need to pass 1 source and 2 target batches throw the same model. The sum of these 3 batch sizes doesn't allow us to pass them throw the model simultaneously due to the GPU memory limit. So we call the model 3 times. But here we are going to have troubles with BatchNorm
statistics as they are not the same for source and target domains. This makes training process slower and much more unstable. The solution here is to form 3 batches with 1/3 of source images and 2/3 of target images in each of them.
Also, as I remember it is not our novelty, and we follow one of the open sourced pytorch
implementations.
from visda2019.
Hi @Antinomy20001,
Yes this function is a little bit tricky. The thing is that during one training step we need to pass 1 source and 2 target batches throw the same model. The sum of these 3 batch sizes doesn't allow us to pass them throw the model simultaneously due to the GPU memory limit. So we call the model 3 times. But here we are going to have troubles with
BatchNorm
statistics as they are not the same for source and target domains. This makes training process slower and much more unstable. The solution here is to form 3 batches with 1/3 of source images and 2/3 of target images in each of them.Also, as I remember it is not our novelty, and we follow one of the open sourced
pytorch
implementations.
Thanks for your rapid response! In fact, I am migrating your code to Pytorch
, hahaha...😜.
Is this transpose operation to make BatchNorm
's running_mean and running_var more stable? So call the function balanced
? I think I have got it.
from visda2019.
Yes, you are right.
from visda2019.
Thanks again for your response and help
from visda2019.
Related Issues (1)
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 visda2019.