def __init__(self, n_classes, width, depth, get_bow, rho=1e-5, eta=0.005, eps=1e-6, update_step='adadelta'): nn_shape = tuple([width] + [width] * depth + [n_classes]) NeuralNet.__init__(self, nn_shape, embed=((width,), (0,)), rho=rho, eta=eta, eps=eps, update_step=update_step) self.get_bow = get_bow
def __init__(self, n_classes, width, depth, get_bow, rho=1e-5, eta=0.005, eps=1e-6, update_step='adadelta'): nn_shape = tuple([width] + [width] * depth + [n_classes]) NeuralNet.__init__(self, nn_shape, embed=((width, ), (0, )), rho=rho, eta=eta, eps=eps, update_step=update_step) self.get_bow = get_bow
def __init__(self, n_classes, width, depth, get_bow, rho=1e-5, eta=0.005, eps=1e-6, batch_norm=False, update_step='sgd_cm', noise=0.001): unigram_width = width bigram_width = 0 nn_shape = tuple([unigram_width + bigram_width] + [width] * depth + [n_classes]) NeuralNet.__init__(self, nn_shape, embed=((width, bigram_width), (0, 1)), rho=rho, eta=eta, update_step=update_step, batch_norm=batch_norm, noise=noise) self.get_bow = get_bow