Keras實現的卷積神經網絡

如下內容來自個人github倉庫,具體框架的代碼也能夠在倉庫中找到,更加歡迎各位一塊兒幫助我修改。

[法師傳送門]https://github.com/AngularLock/DeepLearningFrameworkpython

A Deep Learning Framework based on Keras

Keras搭建的深度學習包 類比於MatConvNet

Tutorial

Keras is a high-level neural networks library, written in Python and capable of running on top of either TensorFlow or Theano.Below,I'll show my framework which is to solve cifar10.With the framework,you can focus on the parameters of the neurn networkgit

Keras是一個簡單好用的python深度學習框架,後端能夠選擇Tensorflow和Theano.如下用cifar10分類來介紹這個已經搭建好的包,以此,你只須要更加關注CNN參數的調整github

implementation function 實現功能

  • load data, buid model, train model後端

  • save better model_weights,you can continue training after a pause網絡

  • at the end of every epoch will show loss&error curve框架

  • 讀取數據,生成模型,訓練模型學習

  • 網絡能夠實時保存權值,在終端以後依舊能夠繼續運算。測試

  • 在訓練時,每個epoch結束後會顯示 loss 和 error曲線ui

1. The structure 網絡結構

  • data_generator
  • model_setup
  • callbackfn
  • main

1.1 data_generator

to load and normalize raw data,this module returns 4 variable: x_train,t_train(label),x_test,t_test(label).this

這個模塊用於加載和規範化原始數據文件,有4個返回值:x_train,t_train(類標),x_test,t_test(類標)

1.2 model_setup

you can build your model in this module.Return the model as the returned vlue.

在此模塊 你能夠自由搭建CNN網絡。 此模塊返回值爲model

1.3 callbackfn

this module is built to show the loss & error curve while training.

此模塊能夠實如今網絡訓練時 實時畫出loss & error曲線

1.4 main

this file like the main function in c or other program language.all the modules above will be called in this file.

主文件,調用以上全部模塊,完成主要流程:load data--build model--train model

##2. what to do next 後續版本

###2.1 Bug Fix 錯誤修改

  • sometimes crashed when ploting loss&error curve

  • sometimes warnings shows when building or training model

  • 在畫loss&error曲線時會無響應

  • 在搭建和訓練模型時會彈出某些警告

2.2 to be done 後續功能

  • prediction module

  • 預測 測試 模塊

相關文章
相關標籤/搜索