def back_reshape1(x): return K.reshape(x,(-1,n_nodes1,K.int_shape(x)[1])) h_layer = Lambda(back_reshape1, output_shape=(self.n_nodes, -1))(h_layer)
这里将batch维度和node维度更换
def back_reshape1(x): return K.reshape(x,(-1,n_nodes1,K.int_shape(x)[1])) h_layer = Lambda(back_reshape1, output_shape=(self.n_nodes, -1))(h_layer)
这里将batch维度和node维度更换