DmitryUlyanov / texture_nets

Code for "Texture Networks: Feed-forward Synthesis of Textures and Stylized Images" paper.
Apache License 2.0
1.22k stars 217 forks source link

Problem in model/pyramid.lua #4

Closed fate-extra closed 8 years ago

fate-extra commented 8 years ago

Original code:

        -- Batch norm before merging   -- line 40
        seq:add(bn(conv_num))          -- line 41
        cur_temp:add(bn(conv_num))     -- line 42

Maybe the code below could be better:

        -- Batch norm before merging       -- line 40
        seq:add(bn(conv_num))              -- line 41
        cur_temp:add(bn(conv_num*(i-1)))   -- line 42

texture_nets_bug

fate-extra commented 8 years ago

With this change, nn.SpatialBatchNormalization won't throw a error in CPU mode.

DmitryUlyanov commented 8 years ago

Wow, thanks a lot, what a disgrace...