91av视频/亚洲h视频/操亚洲美女/外国一级黄色毛片 - 国产三级三级三级三级

  • 大小: 13.1MB
    文件類型: .zip
    金幣: 1
    下載: 0 次
    發布日期: 2023-07-21
  • 語言: Python
  • 標簽: tensorflow??python??

資源簡介

包括mnist數據集文件,輸入數據的python代碼,深度分類mnist代碼,softmax函數代碼以及整合的內含詳細代碼解釋的mnist_with_summaries代碼

資源截圖

代碼片段和文件信息

#?Copyright?2015?Google?Inc.?All?Rights?Reserved.
#
#?Licensed?under?the?Apache?License?Version?2.0?(the?“License“);
#?you?may?not?use?this?file?except?in?compliance?with?the?License.
#?You?may?obtain?a?copy?of?the?License?at
#
#?????http://www.apache.org/licenses/LICENSE-2.0
#
#?Unless?required?by?applicable?law?or?agreed?to?in?writing?software
#?distributed?under?the?License?is?distributed?on?an?“AS?IS“?BASIS
#?WITHOUT?WARRANTIES?OR?CONDITIONS?OF?ANY?KIND?either?express?or?implied.
#?See?the?License?for?the?specific?language?governing?permissions?and
#?limitations?under?the?License.
#?==============================================================================

“““Trains?and?Evaluates?the?MNIST?network?using?a?feed?dictionary.“““
#?pylint:?disable=missing-docstring
from?__future__?import?absolute_import????#加入絕對引入這個新特性
from?__future__?import?division??????????#導入python未來支持的語言特征division(精確除法),當我們沒有在程序中導入該特征時,“/“操作符執行的是截斷除法(Truncating?Division)當我們導入精確除法之后,“/“執行的是精確除法
from?__future__?import?print_function???#即使在python2.X,使用print就得像python3.X那樣加括號使用

import?os.path?#操作路徑名的常用的函數。讀寫文件參見open(),訪問文件系統參見os模塊。
import?time????#時間戳,print(time.localtime())??#這樣就可以print?當地時間了

import?tensorflow.python.platform
import?numpy???#numpy(Numerical?Python)提供了python對多維數組對象的支持:ndarray,具有矢量運算能力,快速、節省空間。numpy支持高級大量的維度數組與矩陣運算,此外也針對數組運算提供大量的數學函數庫。
from?six.moves?import?xrange??#?pylint:?disable=redefined-builtin????在Python?2.7的代碼中直接使用Python?3.x的除法?????????
import?tensorflow?as?tf???????#導入語句,作用是:賦予Python訪問TensorFlow類(classes),方法(methods),符號(symbols)

#from?tensorflow.examples.tutorials.mnist?import?input_data
#from?tensorflow.examples.tutorials.mnist?import?mnist
#經常看到使用MNIST數據集的用法
import?input_data?mnist???

#?Basic?model?parameters?as?external?flags.作為外部標志的基本模型參數
#執行main函數之前首先進行flags的解析,也就是說TensorFlow通過設置flags來傳遞tf.app.run()所需要的參數,
#我們可以直接在程序運行前初始化flags,也可以在運行程序的時候設置命令行參數來達到傳參的目的。
flags?=?tf.app.flags
FLAGS?=?flags.FLAGS
flags.DEFINE_float(‘learning_rate‘?0.01?‘Initial?learning?rate.‘)
flags.DEFINE_integer(‘max_steps‘?2000?‘Number?of?steps?to?run?trainer.‘)
flags.DEFINE_integer(‘hidden1‘?128?‘Number?of?units?in?hidden?layer?1.‘)
flags.DEFINE_integer(‘hidden2‘?32?‘Number?of?units?in?hidden?layer?2.‘)
flags.DEFINE_integer(‘batch_size‘?100?‘Batch?size.??‘
?????????????????????‘Must?divide?evenly?into?the?dataset?sizes.‘)
flags.DEFINE_string(‘train_dir‘?‘Mnist_data/‘?‘Directory?to?put?the?training?data.‘)
flags.DEFINE_boolean(‘fake_data‘?False?‘If?true?uses?fake?data?‘
?????????????????????‘for?unit?testing.‘)



#這里的batchsize定義了placeholder一次性讀入圖片的數目,
#所以理論上應該是有能力不需要將所有圖片全部讀入內存中再進行處理的。不是特別明白
def?placeholder_inputs(batch_size):
??“““Generate?placeholder?variables?to?represent?the?input?tensors.

??These?placeholders?are?used?as?inputs?by?the?rest?of?the?model?building
??code?and?will?be?fed?from?the?downloaded?data?in?the?.run()?loop?below.

??Args:
????batch_size:?The?batch?size?will?be?baked?into?both?placeholders.

??Returns:
????images_placeholder

?屬性????????????大小?????日期????時間???名稱
-----------?---------??----------?-----??----
?????目錄???????????0??2018-11-23?18:31??mnist-master\
?????目錄???????????0??2018-11-23?18:33??mnist-master\mnist-master\
?????文件???????????1??2018-08-30?02:08??mnist-master\mnist-master\__init__.py
?????目錄???????????0??2018-11-23?18:31??mnist-master\mnist-master\__pycache__\
?????文件?????????633??2018-10-25?16:03??mnist-master\mnist-master\__pycache__\input_data.cpython-36.pyc
?????文件????????2194??2018-08-30?02:08??mnist-master\mnist-master\BUILD
?????文件???????10220??2018-10-19?00:38??mnist-master\mnist-master\fully_connected_feed.py
?????文件????????1201??2018-10-16?01:10??mnist-master\mnist-master\input_data.py
?????文件????????5944??2018-08-30?02:08??mnist-master\mnist-master\mnist.py
?????目錄???????????0??2018-11-23?18:31??mnist-master\mnist-master\Mnist_data\
?????文件????????1201??2018-10-16?01:10??mnist-master\mnist-master\Mnist_data\input_data.py
?????文件?????????558??2018-08-30?02:08??mnist-master\mnist-master\Mnist_data\ReadMe.md
?????文件?????1648877??2018-10-16?01:08??mnist-master\mnist-master\Mnist_data\t10k-images-idx3-ubyte.gz
?????目錄???????????0??2018-11-23?18:31??mnist-master\mnist-master\Mnist_data\t10k-images-idx3-ubyte\
?????文件?????7840016??1998-01-26?23:07??mnist-master\mnist-master\Mnist_data\t10k-images-idx3-ubyte\t10k-images.idx3-ubyte
?????文件????????4542??2018-10-16?01:08??mnist-master\mnist-master\Mnist_data\t10k-labels-idx1-ubyte.gz
?????文件?????9912422??2018-10-16?01:08??mnist-master\mnist-master\Mnist_data\train-images-idx3-ubyte.gz
?????文件???????28881??2018-10-16?01:08??mnist-master\mnist-master\Mnist_data\train-labels-idx1-ubyte.gz
?????文件????????2561??2018-08-30?02:08??mnist-master\mnist-master\mnist_deep.py
?????目錄???????????0??2018-11-30?22:48??mnist-master\mnist-master\mnist_logs\
?????文件?????1088379??2018-11-23?18:34??mnist-master\mnist-master\mnist_logs\events.out.tfevents.1542969239.DESKTOP-3592OM2
?????文件?????1100217??2018-11-28?19:55??mnist-master\mnist-master\mnist_logs\events.out.tfevents.1543406114.DESKTOP-3592OM2
?????文件?????1096603??2018-11-30?22:13??mnist-master\mnist-master\mnist_logs\events.out.tfevents.1543587178.DESKTOP-3592OM2
?????文件?????1102971??2018-11-30?22:48??mnist-master\mnist-master\mnist_logs\events.out.tfevents.1543589316.DESKTOP-3592OM2
?????文件????????1905??2018-08-30?02:08??mnist-master\mnist-master\mnist_softmax.py
?????文件????????7532??2018-11-23?18:33??mnist-master\mnist-master\mnist_with_summaries.py
?????文件????????3919??2018-08-30?02:08??mnist-master\mnist-master\README.md

評論

共有 條評論