原创 python從入門到實踐chapter07

prompt = "\nTell me something, and I will repeat it back to you:" prompt += "\nEnter 'quit' to end the program. " a

原创 python從入門到實踐chapter08

def greet_user(username): """Display a simple greeting.""" print("Hello, " + username.title() + "!") greet

原创 python從入門到實踐chapter09

from dog import Dog as dg his_dog = dg('Da Huang', 8) print(his_dog.name, his_dog.age) his_dog.sit() his_dog.roll_o

原创 python從入門到實踐chapter01~06

print('hello,world!') print("Languages:\n\tPython\n\tC\n\tJavaScript") hello,world! Languages: Python C JavaScript

原创 tensorlayer學習日誌19_chapter8_2

無奈啊,按照書上的源碼,怎麼都調試不出來,無奈只好找過的源碼: 在這個博客中發現一個卡通用的數據集,比較小,心想用小數據集試下吧,反正也就沒指望能跑出來~~~~~~https://blog.csdn.net/heyc861221/arti

原创 tensorlayer學習日誌14_chapter5_5.3

第5.3節講的是文本簡單處理,課程源碼在這裏: https://github.com/tensorlayer/tensorlayer/blob/master/example/tutorial_word2vec_basic.py 但是Ste

原创 tensorlayer學習日誌8_chapter3_3.6

第三章最後一個示例,堆疊自編碼器   import tensorflow as tf import tensorlayer as tl import numpy as np import time # model = 'sigmoi

原创 tensorlayer學習日誌17_chapter7_7.2

第七章的乒乓球~~ import time import gym import numpy as np import tensorflow as tf import tensorlayer as tl from tensorlayer.

原创 tensorlayer學習日誌15_chapter5_5.4

本來還想開開心心地結束第五章,誰知5.4節遇上大坑了。。 import tensorflow as tf import tensorlayer as tl from stringclean import * import numpy a

原创 tensorlayer學習日誌13_chapter4_4.6.2

第4.6.2節,我覺得我家破電腦確實到極限了,~~~ import tensorflow as tf import tensorlayer as tl from tensorlayer.layers import * import nu

原创 tensorlayer學習日誌16_chapter6_6.4

 終於開始第六章了,一開頭就被掉坑~~什麼是NLTK哇!好歹我也是看過幾本tensorflow的書的人,不過說來好笑,我看的那些書裏都有講RNN,卻沒一個提到NLTK的!果然都是些小黑書,多少新人被從入門到放棄,這些小黑書最少有一半的功勞

原创 tensorlayer學習日誌18_chapter8_1

第八章主要就是學習對抗網絡,源碼地址在這:https://github.com/tensorlayer/dcgan,一共四個文件,download.py , model.py,   main.py和utils.py 其中download.

原创 tensorlayer學習日誌12_chapter4_4.6.1

第4.6.1節,這裏先運行用的是: network, cost, _ = model_batch_norm(x, y_, reuse=False, is_train=True) _, cost_test, acc = model_bat

原创 tensorlayer學習日誌9_chapter4_4.1

import cv2 import numpy as np print('~~~~~~~~~~~~~卷積覈示例~~~~~~~~~~~~~~~~~~') image = cv2.imread('4.1_flower_original.j

原创 tensorlayer學習日誌10_chapter4_4.4

第4.4節介紹的是通過卷積神經網絡來分類MNIST數據集,而之前2.4節是一個簡單的全連接層組成的神經網絡。 import numpy as np import tensorflow as tf import tensorlayer a