def classify(tweet, t_mask, params, n_classes, n_chars): # tweet embedding emb_layer = tweet2vec(tweet, t_mask, params, n_chars) # Dense layer for classes l_dense = lasagne.layers.DenseLayer(emb_layer, n_classes, W=params['W_cl'], b=params['b_cl'], nonlinearity=lasagne.nonlinearities.softmax) return lasagne.layers.get_output(l_dense), lasagne.layers.get_output(emb_layer)
def classify(tweet, t_mask, params, n_classes, n_chars): # tweet embedding emb_layer = tweet2vec(tweet, t_mask, params, n_chars) # Dense layer for classes l_dense = lasagne.layers.DenseLayer(emb_layer, n_classes, W=params['W_cl'], b=params['b_cl'], nonlinearity=lasagne.nonlinearities.softmax) return lasagne.layers.get_output(l_dense), lasagne.layers.get_output(emb_layer)