
Python
李亚超
自强不息,厚德载物;
专注于Deep Learning, Machine Translation, NLP;
喜欢写关于Linux C/C ,C#,算法,自然语言处理的技术博客,欢迎观临;
展开
-
theano.Tensor.lmatrix ,numpy.array , list 为空的判断方法
theano编程中,判断数据为空时很烦人的事,theano.Tensor.lmatrix ,numpy.array , list 为空的判断方法T.lmatrix有shape属性, numpy.array有shape属性,list没有shape属性。只有将list强制转为array,方法为:sa = numpy.array(value)这样sa.shape会是(x,)。通过这样原创 2016-11-29 19:32:52 · 8940 阅读 · 0 评论 -
numpy array的细微差别,不仔细还真看不出
m1 = numpy.array([[1,2,3],[4,5,6]])m2 = numpy.array([[1,2,3],[4,5,6,7]])这个时候m1是二维数组,输入m1.shape,结果显示(2,3)m2是list,输入m2.shape,结果显示(2, )。因为数组要求形状一致,如果不一致那就强制转为list类型。这种细微的差别,需要加倍注意啊原创 2016-11-27 21:09:12 · 1102 阅读 · 0 评论 -
Theano 错误信息记录
错误信息:Exception: ('The following error happened while compiling the node', GpuDnnSoftmax{tensor_format='bc01', mode='channel', algo='accurate'}(GpuContiguous.0), '\n', 'nvcc return status', 2, 'for cmd...原创 2018-06-17 20:52:57 · 1751 阅读 · 0 评论 -
gnmt 模型参数分析
# tensorflow/nmt的模型参数分析,配置为enc:2,dec:2,uni,bahdanau# src_emb:620, trg_emb:650, src_hid:1000, trg_hid:1200# Trainable variables embeddings/encoder/embedding_encoder:0, (30005, 620), /device:GPU:0...原创 2018-07-16 17:05:18 · 1348 阅读 · 0 评论