This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import torch | |
import torch.nn as nn | |
import math | |
class IdNorm(nn.Module): | |
def __init__(self, cluster_size=128): | |
super(IdNorm, self).__init__() | |
self.cluster_size = cluster_size | |
self.n = None # Será definido no método build | |
self.embs = nn.ModuleList() |