自然语言处理
listep
这个作者很懒,什么都没留下…
展开
-
TensorFlow的‘Did you mean to set reuse=None in VarScope?’解决方法
elif self.rnn == 'bi_two_layers': self.representation_size = self.rnn_size * 2 rnn_outputs, rnn_state = tf.nn.bidirectional_dynamic_rnn(rnn_cell_bi_fw,原创 2018-01-29 10:42:35 · 1013 阅读 · 0 评论 -
numpy用于shuffle训练集数据
import numpy as npW_train = [1,2,3]R_train = [4,5,6]Y_train = [7,8,9]L_train = [10,11,12]data_train = [(w, r, y, l) for w, r, y, l in zip(W_train, R_train, Y_train, L_train)]np.random.shuffle...原创 2018-03-30 15:19:09 · 4080 阅读 · 0 评论 -
快排Python实现
def quick_sort(list_to_sort): if len(list_to_sort) <= 1: return list_to_sort else: return quick_sort([s for s in list_to_sort[1:] if s <= list_to_sort[0] ] )+ [list_to_...原创 2018-03-30 17:25:33 · 593 阅读 · 0 评论