Skip to content

Issues with SVD regularization #7

@black-puppydog

Description

@black-puppydog

Hi,
first off: thanks for the concise and easy to follow implementation, and congrats for the work building on it, I really enjoyed it. :)

I util.py you write:

contentConv = torch.mm(cF,cF.t()).div(cFSize[1]-1) + torch.eye(cFSize[0]).double()

styleConv = torch.mm(sF,sF.t()).div(sFSize[1]-1)

First: why not regularize both computations? I had this fail on some occasions.

The regularization term eye() is YUGE compared to the normalized covariance matrix. I am more used to seeing eye() * 1e-6 or thelike for regularization, and changing the term to that actually does make a noticable difference in the stylization outcome.
Since we're talking about artistic style transfer here, it's hard to judge which version is better, but out of principle, the smaller the regularization, the closer to the actual whitening/coloring transform we are, no?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions