Giter VIP home page Giter VIP logo

Comments (6)

ikhlestov avatar ikhlestov commented on August 27, 2024

Hello,
If you are talking about means during data normalization - this is another parameters that calculated only once.
If we are considering mean and std at the batch norm - they are updated every training step, based on training flag settings. So everything should be done under the hood.
Of course, it's possible that tensorflow API was changed a little bit - so code should be rechecked.

from vision_networks.

TengliEd avatar TengliEd commented on August 27, 2024

@ikhlestov No, I mean that you have to explicitly update moving mean and moving variance in Batch Normalization before applying gradients on trainable variables. Something is like below:
update_ops = tf.get_collection(tf.GraphKeys.UPDATE_OPS)
with tf.control_dependencies(update_ops):
train_op = optimizer.minimize(loss)

from vision_networks.

ikhlestov avatar ikhlestov commented on August 27, 2024

Thank you for your attention, I'll rewrite code

from vision_networks.

ikhlestov avatar ikhlestov commented on August 27, 2024

@TengliEd Oh, actually I remember this case - I just set updates_collections=None to force the updates in place, so there is no reason to call update with control_dependencies

from vision_networks.

TengliEd avatar TengliEd commented on August 27, 2024

@ikhlestov Yes, thanks for giving me another workaround to update them. But I still got confused about puting weight decay on all trainable variables. l2_loss = tf.add_n([tf.nn.l2_loss(var) for var in tf.trainable_variables()]). You know we need to decay only weights not bias.

from vision_networks.

ikhlestov avatar ikhlestov commented on August 27, 2024

As far as I know tensorflow.nn.conv2d layer doesn't contain bias. And the whole network based on that layers - so actually there is no biases.
In any case the training results show nearly the same performance as in the authors implementation and paper - so there is no reason to tweak anything.
It you want - you can make a fork and implement any updates.

from vision_networks.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.