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

資源簡介

基于python2.7的LeNet5源代碼實現,效果很不錯。

資源截圖

代碼片段和文件信息

“““This?tutorial?introduces?the?LeNet5?neural?network?architecture
using?Theano.??LeNet5?is?a?convolutional?neural?network?good?for
classifying?images.?This?tutorial?shows?how?to?build?the?architecture
and?comes?with?all?the?hyper-parameters?you?need?to?reproduce?the
paper‘s?MNIST?results.


This?implementation?simplifies?the?model?in?the?following?ways:

?-?LeNetConvPool?doesn‘t?implement?location-specific?gain?and?bias?parameters
?-?LeNetConvPool?doesn‘t?implement?pooling?by?average?it?implements?pooling
???by?max.
?-?Digit?classification?is?implemented?with?a?logistic?regression?rather?than
???an?RBF?network
?-?LeNet5?was?not?fully-connected?convolutions?at?second?layer

References:
?-?Y.?LeCun?L.?Bottou?Y.?Bengio?and?P.?Haffner:
???Gradient-based?Learning?Applied?to?Document
???Recognition?Proceedings?of?the?IEEE?86(11):2278-2324?November?1998.
???http://yann.lecun.com/exdb/publis/pdf/lecun-98.pdf

“““
import?os
import?sys
import?time

import?numpy

import?theano
import?theano.tensor?as?T
from?theano.tensor.signal?import?downsample
from?theano.tensor.nnet?import?conv

from?logistic_sgd?import?LogisticRegression?load_data
from?mlp?import?Hiddenlayer


class?LeNetConvPoollayer(object):
????“““Pool?layer?of?a?convolutional?network?“““

????def?__init__(self?rng?input?filter_shape?image_shape?poolsize=(2?2)):
????????“““
????????Allocate?a?LeNetConvPoollayer?with?shared?variable?internal?parameters.

????????:type?rng:?numpy.random.RandomState
????????:param?rng:?a?random?number?generator?used?to?initialize?weights

????????:type?input:?theano.tensor.dtensor4
????????:param?input:?symbolic?image?tensor?of?shape?image_shape

????????:type?filter_shape:?tuple?or?list?of?length?4
????????:param?filter_shape:?(number?of?filters?num?input?feature?maps
??????????????????????????????filter?height?filter?width)

????????:type?image_shape:?tuple?or?list?of?length?4
????????:param?image_shape:?(batch?size?num?input?feature?maps
?????????????????????????????image?height?image?width)

????????:type?poolsize:?tuple?or?list?of?length?2
????????:param?poolsize:?the?downsampling?(pooling)?factor?(#rows?#cols)
????????“““

????????assert?image_shape[1]?==?filter_shape[1]
????????self.input?=?input

????????#?there?are?“num?input?feature?maps?*?filter?height?*?filter?width“
????????#?inputs?to?each?hidden?unit
????????fan_in?=?numpy.prod(filter_shape[1:])
????????#?each?unit?in?the?lower?layer?receives?a?gradient?from:
????????#?“num?output?feature?maps?*?filter?height?*?filter?width“?/
????????#???pooling?size
????????fan_out?=?(filter_shape[0]?*?numpy.prod(filter_shape[2:])?/
???????????????????numpy.prod(poolsize))
????????#?initialize?weights?with?random?weights
????????W_bound?=?numpy.sqrt(6.?/?(fan_in?+?fan_out))
????????self.W?=?theano.shared(
????????????numpy.asarray(
????????????????rng.uniform(low=-W_bound?high=W_bound?size=filter_shape)
????????????????dtype=theano.config.floatX
????????????)
????????????borrow=True
????????)

?屬性????????????大小?????日期????時間???名稱
-----------?---------??----------?-----??----
?????目錄???????????0??2015-09-14?09:19??基于python2.7的LeNet5源代碼實現\
?????文件???????12645??2015-08-20?22:08??基于python2.7的LeNet5源代碼實現\convolutional_mlp.py
?????文件???????20706??2015-08-20?22:08??基于python2.7的LeNet5源代碼實現\convolutional_mlp_commentate.py
?????目錄???????????0??2015-09-14?09:19??基于python2.7的LeNet5源代碼實現\data\
?????文件????????9457??2015-09-02?21:29??基于python2.7的LeNet5源代碼實現\logistic_sgd.py
?????文件???????14181??2015-08-20?22:08??基于python2.7的LeNet5源代碼實現\mlp.py

評論

共有 條評論