def __init__(self, vocab_size, embed_size, init_range=1.0): self.vocab_size = vocab_size self.embed_size = embed_size self.W = initalize((vocab_size, embed_size), init_range) self.dW = np.zeros(self.W.shape) self.params = [('W', self.W, self.dW)]
def __init__(self, input_size, output_size, init_range=1.0): self.input_size = input_size self.output_size = output_size self.W = initalize((output_size, input_size), init_range) self.dW = np.zeros((output_size, input_size)) self.params = [('W', self.W, self.dW)]
def __init__(self, vocab_size, embed_size, init_range=1.0): self.vocab_size = vocab_size self.embed_size = embed_size self.W = initalize((vocab_size, embed_size), init_range) self.dW = np.zeros(self.W.shape) self.params = [ ('W', self.W, self.dW) ]
def __init__(self, input_size, output_size, init_range=1.0): self.input_size = input_size self.output_size = output_size self.W = initalize((output_size, input_size), init_range) self.dW = np.zeros((output_size, input_size)) self.params = [ ('W', self.W, self.dW) ]
def init(x,y): return initalize((x,y), init_range)
def init(x, y): return initalize((x, y), init_range)