omertov / encoder4editing

Official implementation of "Designing an Encoder for StyleGAN Image Manipulation" (SIGGRAPH 2021) https://arxiv.org/abs/2102.02766
MIT License
945 stars 154 forks source link

[bug-fix] for batch_size=1, squeeze() operation also squeezes the fir… #100

Open timbektu opened 1 year ago

timbektu commented 1 year ago

…st (batch_size) dimension, and the code breaks when using batch_size =1. pytorch lacks a functionality squeeze multiple dims at once, so using reshape() instead. patched the bug in this commit.