def model(X, w1, s1, theta1, t1, w2, s2, theta2, t2, D, G, p_drop_lista, p_drop_hidden): a1 = L.lista(X, w1, s1, theta1, t1) a1 = L.dropout(a1, p_drop_lista) y = T.dot(a1, G) y = L.dropout(y, p_drop_hidden) a2 = L.lista(y, w2, s2, theta2, t2) a2 = L.dropout(a2, p_drop_lista) x_o = T.dot(a2, D) return a1, y, a2, x_o
def model(X, w1, s1, theta1, t1, w2, s2, theta2, t2, D, G, E, BE, p_drop_lista, p_drop_hidden): input_dropout = L.dropout(X, p=0.2) a1 = L.lista(input_dropout, w1, s1, theta1, t1) a1 = L.dropout(a1, p_drop_lista) y = T.dot(a1, G) y = L.dropout(y, p_drop_hidden) a2 = L.lista(y, w2, s2, theta2, t2) a2 = L.dropout(a2, p_drop_lista) x_o = T.dot(a2, D) p = L.softmax(T.dot(L.dropout(y, p_drop_hidden), E) + BE) out_class = T.argmax(p, axis=1) return a1, y, a2, x_o, p, out_class