def LSTM_sequence_classifer_net(input, num_output_classes, embedding_dim, LSTM_dim, cell_dim): embedding_function = embedding(input, embedding_dim) LSTM_function = LSTMP_component_with_self_stabilization( embedding_function.output(), LSTM_dim, cell_dim)[0] thought_vector = select_last(LSTM_function) return linear_layer(thought_vector, num_output_classes)
def LSTM_sequence_classifer_net(input, num_output_classes, embedding_dim, LSTM_dim, cell_dim, device): embedding_function = embedding(input, embedding_dim, device) LSTM_function = LSTMP_component_with_self_stabilization( embedding_function, LSTM_dim, cell_dim, device) thought_vector = select_last(LSTM_function) return fully_connected_linear_layer(thought_vector, num_output_classes, device)