-
Notifications
You must be signed in to change notification settings - Fork 15
Open
Description
When would it be better to add noise to style feature?
if style_extractor is not None:
b, e = emb.shape
y = y.reshape(b, 5, -1)
y = torch.mean(y, dim=1)
noise=False
if noise==True:
magn = torch.norm(y, dim=1, keepdim=True)
noise = torch.randn_like(y)*0.25
#bernoulli mask in noise
noise = noise*torch.bernoulli(torch.ones_like(noise)*0.2)
y = y + noise
y = magn * y / torch.norm(y, dim=1, keepdim=True)
y = self.style_lin(y)
emb = emb + y
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels