1. 程式人生 > >深度學習幾種典型架構

深度學習幾種典型架構

machines 容易 相對 mark NPU conn ESS span del

介紹幾種典型的深度學習架構。

卷積神經網絡(CNN)

卷積神經網絡由LeCun提出。在Kaggle競賽中取得了巨大成功。

典型的卷積網絡有兩部分。 第一個是負責特征提取,由一對或多對卷積和子采樣/最大池化層組成。 第二部分是經典的全連接多層感知器,將提取的特征作為輸入。如下圖所示。

技術分享圖片

卷積神經網絡架構

長短期記憶網絡(LSTM)

長短期記憶網絡是比較流行的一種網絡結構。

技術分享圖片

LSTM架構

長短期記憶網絡用兩個門來控制單元狀態的內容,一個是遺忘門(forget gate),決定了上一時刻的單元狀態有多少能夠保留到當前時刻;一個是輸入門(input gate),決定了當前時刻網絡的輸入有多少保留到單元狀態。LSTM使用輸出門(output gate)控制單元狀態有多少輸出到LSTM的當前輸出值。

GRU

GRU是 LSTM 的簡化版,但在大多數任務中其表現與 LSTM 不相伯仲。

技術分享圖片

GRU和LSTM對比

相比LSTM, GRU 有更少的參數,因此相對容易訓練且過擬合的問題要輕一些,在訓練數據較少時可以嘗試使用GRU。

更簡化的有迷你GRU。

技術分享圖片

迷你GRU

DB-LSTM

深度雙向LSTM

技術分享圖片

深度雙向LSTM

卷積殘差記憶網絡

卷積殘差記憶網絡是CNN和LSTM的一種結合。

技術分享圖片

卷積殘差記憶網絡架構

Dynamic NTM

技術分享圖片

Evolvable Neural Turing Machines

技術分享圖片

Unsupervised Domain Adaptation By Backpropagation

技術分享圖片

Deeply Recursive CNN For Image Super-Resolution

技術分享圖片

Recurrent Model Of Visual Attention

技術分享圖片

MLP with synthetic www.taohuaqing178.com gradients

技術分享圖片

Google’s Neural Machine Translation System

headers = {"User-Agent"www.xgLL521.com: "Mozilla/5.0 (Windows NT 10.0; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/68.0.3440.106 Safari/537.36", "X-Requested-With": "XMLHttpRequest", "Accept": "*/*"} async def get_source(url): print("正在操作:{}".www.dongfan178.com format(url)) conn = aiohttp.TCPConnector(verify_ssl=False) # 防止ssl報錯,其中一種寫法 async with aiohttp.ClientSession(connector=conn) as session: # 創建session async with session.get(url, headers=headers, timeout=10) as response: # 獲得網絡請求 if response.status == 200: # 判斷返回的請求碼 source = await www.ysyl157.com response.text() # 使用await關鍵字獲取返回結果 print(source) else: print("網頁訪問失敗") if __name__=="__main__": url_format = "https://tu.fengniao.com/ajax/ajaxTuPicList.php?page={}&tagsId=15&action=getPicLists" full_urllist= [url_format.format(i) for i in range(1,21)] event_loop = asyncio.get_event_loop() #創建事件循環 tasks = [get_source(url) for url in full_urllist] results = event_loop.run_until_complete(asyncio.wait(tasks)) #等待任務結束

技術分享圖片

深度學習幾種典型架構