诈诗了

来源: M45 2018-06-27 19:39:01 [] [博客] [旧帖] [给我悄悄话] 本文已被阅读: 次 (3073 bytes)

昨天发现一个能自动作诗的机器人.下载下来放到我的AI环境里试着训练一下,还不错. 代码写得很给力. 没有出现任何象以前遇到的各种坑. 开发者还给机器人起个名字叫"李白".  我给他点了个star. 

然而,我的机器比较旧,不支持GPU训练AI,只好勉强用CPU.为什么用GPU呢?我查过原因.这是因为GPU里的内核数量要比CUP多三个数量级.大约有4~5千个内核吧.如此多的内核一起参加运算,这是四核CPU没法比的.

AI训练没出现错误,接下来就是漫长的等待.一小时,两小时,三小时,......,十小时,.....,早晨起床一看,屏幕黑了,无论是敲键盘,还是晃鼠标都不管用.这是咋回事啊?难道是机器人穿越到唐朝了? 先不管它, 等下班回来或许就好了. 心里说再给你八个小时的训练时间.

可是,下班回家后,电脑仍然是黑屏,令人不知所措.琢磨了一下,干脆强行重新启动机器.还好,机器没坏,AI环境也能正常运行.查看训练结果后.发现4万余首唐诗"李白"只读了36遍. 哎,,,CPU啊,真不行.以后进新机器一定要请个带高大上NVIDIA显卡的机器.实在不行就自己组装,NVIDIA显卡买两个, 1万多个内核应该够用了.

"李白"的训练没有达到预定次数,估计也能写出一两句诗吧. 测试了一下,果然不出我之所了.

(M45) C:\Users\M45\AI\poem\tensorflow_poems-master>python compose_poem.py
## please input the first character:
## loading corpus from ./model/
2018-06-27 18:00:31.405901: I tensorflow/core/platform/cpu_feature_guard.cc:140] Your CPU supports
instructions that this TensorFlow binary was not compiled to use: AVX AVX2
火嫌雁疏凫飞浊,是岳壁行遗掩关。


(M45) C:\Users\M45\AI\poem\tensorflow_poems-master>python compose_poem.py
## please input the first character:
## loading corpus from ./model/
2018-06-27 18:03:30.899167: I tensorflow/core/platform/cpu_feature_guard.cc:140] Your CPU supports
instructions that this TensorFlow binary was not compiled to use: AVX AVX2
星郎竞举鼻,冬义真为妾。
即被入笼来,神兴在朝来。

(M45) C:\Users\M45\AI\poem\tensorflow_poems-master>python compose_poem.py
## please input the first character:
## loading corpus from ./model/
2018-06-27 19:29:31.541339: I tensorflow/core/platform/cpu_feature_guard.cc:140] Your CPU supports i
nstructions that this TensorFlow binary was not compiled to use: AVX AVX2
月寂客堂强,花开满院隳。
钿霜学尖睡,风雨相安醉。

诈诗了. 果然能拽几句诗. 那什么,有会作诗的吗? 过来看看有没有感觉.

所有跟帖: 

别说,风雨相安醉,不错啊! -紫竹箫- 给 紫竹箫 发送悄悄话 紫竹箫 的博客首页 (0 bytes) () 06/27/2018 postreply 19:43:25

嘿嘿,有些句子真的很出人意料. -M45- 给 M45 发送悄悄话 M45 的博客首页 (0 bytes) () 06/27/2018 postreply 21:01:46

的确。。 -小二哥李白- 给 小二哥李白 发送悄悄话 小二哥李白 的博客首页 (0 bytes) () 06/27/2018 postreply 21:41:16

这不是李白,这是李白他二哥,哈哈哈。 -紫竹箫- 给 紫竹箫 发送悄悄话 紫竹箫 的博客首页 (0 bytes) () 06/27/2018 postreply 19:46:03

适合发来笑坛。。 -小二哥李白- 给 小二哥李白 发送悄悄话 小二哥李白 的博客首页 (0 bytes) () 06/27/2018 postreply 19:54:01

你这个AI诗人可是笑坛的宝贝,全是名句。这几首我都喜欢,虽然不明就里,也看得我神魂颠倒。 -手心手背99- 给 手心手背99 发送悄悄话 (0 bytes) () 06/27/2018 postreply 19:54:20

有几句诗能让人神魂颠倒啊?这就是绝句了! -紫竹箫- 给 紫竹箫 发送悄悄话 紫竹箫 的博客首页 (0 bytes) () 06/27/2018 postreply 19:58:55

我跟你讲,无牙肯定最喜欢这型的,我也是,无牙派非传人弟子。 -手心手背99- 给 手心手背99 发送悄悄话 (0 bytes) () 06/27/2018 postreply 20:05:44

了了,这位就叫无心吧,和无牙同门。 -紫竹箫- 给 紫竹箫 发送悄悄话 紫竹箫 的博客首页 (0 bytes) () 06/27/2018 postreply 20:09:21

哈哈哈哈哈。。。竹萧能给无牙派弟子起名,位置一定不低。 -手心手背99- 给 手心手背99 发送悄悄话 (0 bytes) () 06/27/2018 postreply 20:13:42

五班说我是八袋长老 -紫竹箫- 给 紫竹箫 发送悄悄话 紫竹箫 的博客首页 (0 bytes) () 06/27/2018 postreply 20:15:15

失敬失敬,无心参见竹萧八袋长老,长老赐名,没齿不忘 (哎,以后就无心了,这可怎么是好?) -手心手背99- 给 手心手背99 发送悄悄话 (0 bytes) () 06/27/2018 postreply 20:27:54

就剩手背了,就不纠结了,了了。 -紫竹箫- 给 紫竹箫 发送悄悄话 紫竹箫 的博客首页 (0 bytes) () 06/27/2018 postreply 20:32:23

第三首最有意思. -M45- 给 M45 发送悄悄话 M45 的博客首页 (169 bytes) () 06/28/2018 postreply 19:32:31

得给你的诗人,不,诗机人起个名字! -紫竹箫- 给 紫竹箫 发送悄悄话 紫竹箫 的博客首页 (0 bytes) () 06/27/2018 postreply 20:00:33

不对,是机诗人。 -紫竹箫- 给 紫竹箫 发送悄悄话 紫竹箫 的博客首页 (0 bytes) () 06/27/2018 postreply 20:01:42

急死人…… -阿尤- 给 阿尤 发送悄悄话 阿尤 的博客首页 (0 bytes) () 06/27/2018 postreply 20:19:50

是挺急人的. 哈哈哈... -M45- 给 M45 发送悄悄话 M45 的博客首页 (0 bytes) () 06/27/2018 postreply 21:07:11

假以时日,必成大器…… -阿尤- 给 阿尤 发送悄悄话 阿尤 的博客首页 (0 bytes) () 06/27/2018 postreply 20:21:15

凶器! -紫竹箫- 给 紫竹箫 发送悄悄话 紫竹箫 的博客首页 (0 bytes) () 06/27/2018 postreply 20:24:22

器再大怕也是太监诗。。 -小二哥李白- 给 小二哥李白 发送悄悄话 小二哥李白 的博客首页 (44 bytes) () 06/27/2018 postreply 20:26:32

假以金足, 整个大器 -M45- 给 M45 发送悄悄话 M45 的博客首页 (0 bytes) () 06/27/2018 postreply 21:08:25

你试试让它写笑话,看能把这儿的人逗笑不。 -石假装- 给 石假装 发送悄悄话 石假装 的博客首页 (0 bytes) () 06/27/2018 postreply 20:23:33

能让AI写笑话可以申请专利了。。 -小二哥李白- 给 小二哥李白 发送悄悄话 小二哥李白 的博客首页 (0 bytes) () 06/27/2018 postreply 20:40:01

据说有模仿海明威风格写作品的. 也有人雄心勃勃地要仿照金庸文笔写小说. 要不试试帮你写博? -M45- 给 M45 发送悄悄话 M45 的博客首页 (0 bytes) () 06/27/2018 postreply 21:17:21

开发者说能写歌词.不知道写个相声如何. -M45- 给 M45 发送悄悄话 M45 的博客首页 (0 bytes) () 06/27/2018 postreply 21:17:47

据说有模仿海明威风格写作品的. 也有人雄心勃勃地要仿照金庸文笔写小说. 要不试试帮你写博? -M45- 给 M45 发送悄悄话 M45 的博客首页 (0 bytes) () 06/27/2018 postreply 21:18:10

听说它们写的小说竟歧视性语言。 -石假装- 给 石假装 发送悄悄话 石假装 的博客首页 (0 bytes) () 06/27/2018 postreply 22:27:48

要是用莫言的小说训练AI,估计这个作品会屎尿横飞. -M45- 给 M45 发送悄悄话 M45 的博客首页 (169 bytes) () 06/27/2018 postreply 23:10:20

重要的是体验新科技 -七彩奶油- 给 七彩奶油 发送悄悄话 (0 bytes) () 06/27/2018 postreply 21:15:12

体验现灵 -M45- 给 M45 发送悄悄话 M45 的博客首页 (327 bytes) () 06/27/2018 postreply 21:34:18

风雨相安醉。。这句有点惊艳。。。 -小二哥李白- 给 小二哥李白 发送悄悄话 小二哥李白 的博客首页 (0 bytes) () 06/27/2018 postreply 21:40:30

二哥说个字,我让AI给你作两首。 -M45- 给 M45 发送悄悄话 M45 的博客首页 (0 bytes) () 06/27/2018 postreply 22:01:39

紫,箫 -小二哥李白- 给 小二哥李白 发送悄悄话 小二哥李白 的博客首页 (0 bytes) () 06/27/2018 postreply 23:38:15

终于说出口了哈!哈哈哈。。。你心上的人儿就会到来吆 - 阿尤 -婧芊- 给 婧芊 发送悄悄话 婧芊 的博客首页 (0 bytes) () 06/27/2018 postreply 23:48:43

小芊的智商回来了。。。 -小二哥李白- 给 小二哥李白 发送悄悄话 小二哥李白 的博客首页 (0 bytes) () 06/28/2018 postreply 01:54:52

哈哈哈. 进来看看.我歇了. -M45- 给 M45 发送悄悄话 M45 的博客首页 (316 bytes) () 06/28/2018 postreply 00:16:28

新流派:AI 派 -阿尤- 给 阿尤 发送悄悄话 阿尤 的博客首页 (0 bytes) () 06/28/2018 postreply 01:19:38

哈哈哈哈,后面那首五绝真绝! -小二哥李白- 给 小二哥李白 发送悄悄话 小二哥李白 的博客首页 (0 bytes) () 06/28/2018 postreply 01:53:30

真艳! -wingreen- 给 wingreen 发送悄悄话 wingreen 的博客首页 (0 bytes) () 06/28/2018 postreply 02:22:19

高! -老生常谈12- 给 老生常谈12 发送悄悄话 老生常谈12 的博客首页 (0 bytes) () 06/28/2018 postreply 03:33:00

好诗! -NewBird- 给 NewBird 发送悄悄话 (0 bytes) () 06/28/2018 postreply 03:50:59

将卷有君吃?就是把紫竹笋卷到饼里来吃?怎么也得配点烧鸡烤鸭什么的吧 -500miles- 给 500miles 发送悄悄话 500miles 的博客首页 (0 bytes) () 06/28/2018 postreply 05:04:18

我们这群电灯泡有点太亮哈哈哈哈哈 -紫色海洋- 给 紫色海洋 发送悄悄话 紫色海洋 的博客首页 (0 bytes) () 06/28/2018 postreply 06:23:55

将卷有君痴 -NewBird- 给 NewBird 发送悄悄话 (0 bytes) () 06/28/2018 postreply 07:29:10

-M45- 给 M45 发送悄悄话 M45 的博客首页 (0 bytes) () 06/28/2018 postreply 18:45:42

哈哈哈, 好吃的要卷在烙饼里吃, 这是肉肉他们家那儿的吃法。 -紫竹箫- 给 紫竹箫 发送悄悄话 紫竹箫 的博客首页 (0 bytes) () 06/28/2018 postreply 09:44:35

吃得高兴了煎饼果子里不放油条了,放根桂发祥麻花。 -手心手背99- 给 手心手背99 发送悄悄话 (0 bytes) () 06/28/2018 postreply 16:04:02

哈哈哈哈哈,太有才了,这特么每首都有故事啊。快问问这AI它是男的还是女的,没定型的话,往女AI上培养,要和她对歌。。。 -手心手背99- 给 手心手背99 发送悄悄话 (0 bytes) () 06/28/2018 postreply 06:27:05

这AI是大师养的吗? 我怎么觉得应该是小二哥或小八养的。这五绝, 真是绝了,无语! -紫竹箫- 给 紫竹箫 发送悄悄话 紫竹箫 的博客首页 (0 bytes) () 06/28/2018 postreply 09:43:30

肯定是二哥,我不会写诗。 -a7a8- 给 a7a8 发送悄悄话 a7a8 的博客首页 (0 bytes) () 06/28/2018 postreply 11:33:58

明明是M45养的,别乱推。。。 -小二哥李白- 给 小二哥李白 发送悄悄话 小二哥李白 的博客首页 (0 bytes) () 06/28/2018 postreply 12:06:19

瞎说,我只是把它叫来到露一手. -M45- 给 M45 发送悄悄话 M45 的博客首页 (169 bytes) () 06/28/2018 postreply 18:09:26

瞎说,我只是把它叫来给大家表演一下 -M45- 给 M45 发送悄悄话 M45 的博客首页 (169 bytes) () 06/28/2018 postreply 18:10:28

赞!围棋中AI有些出奇的招法让人类脑洞大开。AI写诗也会有名句。 -山高路远- 给 山高路远 发送悄悄话 (111 bytes) () 06/28/2018 postreply 00:04:54

哈哈哈,,, 我觉得AI训练数据和次数很重要. AI遇到的缺乏数据和训练不足的情况下.就会瞎下,但是一旦落入它的套路,就在劫难逃 -M45- 给 M45 发送悄悄话 M45 的博客首页 (0 bytes) () 06/28/2018 postreply 00:26:40

能不能加注呀?每首诗后加注,俺读着费力。 -wingreen- 给 wingreen 发送悄悄话 wingreen 的博客首页 (0 bytes) () 06/28/2018 postreply 02:25:37

诗就是要让你似懂非懂地。让你朦胧,让你体味无限。 -山高路远- 给 山高路远 发送悄悄话 (155 bytes) () 06/28/2018 postreply 02:42:47

体味无限? -老生常谈12- 给 老生常谈12 发送悄悄话 老生常谈12 的博客首页 (23 bytes) () 06/28/2018 postreply 03:34:35

哦,好诗,好诗。 -wingreen- 给 wingreen 发送悄悄话 wingreen 的博客首页 (0 bytes) () 06/28/2018 postreply 04:08:22

这个没玩过,但是我用过对联自动生成app 也挺好玩的。 -神婆笑笑- 给 神婆笑笑 发送悄悄话 神婆笑笑 的博客首页 (0 bytes) () 06/28/2018 postreply 04:28:49

微信上已经提供好多这种小程序了. 要是把他们联合起来使用,估计AI就厉害了. -M45- 给 M45 发送悄悄话 M45 的博客首页 (0 bytes) () 06/28/2018 postreply 18:06:01

再训练几天看看? -老石- 给 老石 发送悄悄话 老石 的博客首页 (0 bytes) () 06/28/2018 postreply 05:05:36

这是要剁手买GPU的节奏... -M45- 给 M45 发送悄悄话 M45 的博客首页 (169 bytes) () 06/28/2018 postreply 18:02:48

有创意,平仄不妥,也不压韵。颇能勾起人的灵感。 -ozxlu- 给 ozxlu 发送悄悄话 ozxlu 的博客首页 (0 bytes) () 06/28/2018 postreply 05:57:21

的确.开发者们提到过平仄压韵的问题. 单句偶尔有惊喜 -M45- 给 M45 发送悄悄话 M45 的博客首页 (0 bytes) () 06/28/2018 postreply 18:01:49

月寂客堂强,花开满院隳。 “堂客”湖南话是老婆的意思吧?“堂客强”就是老婆那方面比较强的意思,与强势的老婆月夜里伴着满院 -近仁1995- 给 近仁1995 发送悄悄话 (262 bytes) () 06/28/2018 postreply 17:19:08

哈哈哈, 客堂也应该是泛指女客人. 这句话的大意是女客人多. 满院子都是. -M45- 给 M45 发送悄悄话 M45 的博客首页 (327 bytes) () 06/28/2018 postreply 17:56:22

哈哈哈, 客堂也应该是泛指女客人. 这句话的大意是月亮那边很寂静,这里女客人多. 满院子都是. -M45- 给 M45 发送悄悄话 M45 的博客首页 (0 bytes) () 06/28/2018 postreply 17:59:06

我的解读是,老婆太厉害了,被从屋子里赶到院子面对满园繁花的诗人,心灰意懒,愁绪萦怀。 -手心手背99- 给 手心手背99 发送悄悄话 (0 bytes) () 06/28/2018 postreply 20:36:40

这个解读好 -M45- 给 M45 发送悄悄话 M45 的博客首页 (0 bytes) () 06/29/2018 postreply 08:30:51

诈诗 = 炸尸? -近仁1995- 给 近仁1995 发送悄悄话 (0 bytes) () 06/28/2018 postreply 17:21:48

原开发者就是这个意思 -M45- 给 M45 发送悄悄话 M45 的博客首页 (169 bytes) () 06/28/2018 postreply 17:57:14

加跟帖:

当前帖子已经过期归档,不能加跟帖!