Open volcacius opened 3 years ago
Papers:
Soft rounding:
#Fwd def soft_round(x, alpha): x_floor = torch.floor(x) r = x - x_floor - 0.5 out = x_floor + 0.5 * torch.tanh(alpha * r) / torch.tanh(alpha * 0.5) + 0.5 return out
Papers: