摘要:
with open('./file/test.txt', 'wb+') as f: for i in nums: s = struct.pack('i', i) f.write(s) 读: nums = [] with open('./file/2010.txt', 'rb+') as f: for 阅读全文
摘要:
a = "i love love you you" from collections import Counter dict( Counter(list(a.split())) ) Out[103]: {'i': 1, 'love': 2, 'you': 2} 或者: s = '11AAAdfdfB 阅读全文
摘要:
s = 'i am very very like you and like you' dict( [(i, s.split().count(i)) for i in s.split()] ) Out[2]: {'i': 1, 'am': 1, 'very': 2, 'like': 2, 'you': 阅读全文
摘要:
1. 语言模型 2. RNN LSTM语言模型 (梯度权重) (1)one to one : 图像分类 (2)one to many:图片描述 (3)many to one:文本情感分析、分类 (4)many to many(N vs M):Seq2Seq(机器翻译) (5)many to many 阅读全文