資源簡介
MatConvNet是一個實現卷積神經網絡(CNN)的MATLAB工具箱,用于計算機視覺應用。 用這個工具箱,能很方便地在MATLAB中用GPU來進行訓練。

代碼片段和文件信息
#?file:?matdoc.py
#?author:?Andrea?Vedaldi
#?brief:?Extact?comments?from?a?MATLAB?mfile?and?generate?a?Markdown?file
import?sys?os?re?shutil
import?subprocess?signal
import?string?fnmatch
from?matdocparser?import?*
from?optparse?import?OptionParser
usage?=?“““usage:?%prog?[options]?
Extracts?the?comments?from?the?specified??and?prints?a?Markdown
version?of?them.“““
optparser?=?OptionParser(usage=usage)
optparser.add_option(
????“-v“?“--verbose“
????dest????=?“verb“
????default?=?False
????action??=?“store_true“
????help????=?“print?debug?information“)
findFunction?=?re.compile(r“^\s*(function|classdef).*$“?re.MULTILINE)
getFunction?=?re.compile(r“\s*%\s*(\w+)\s*(.*)\n“
??????????????????????????“((\s*%.*\n)+)“)
cleanComments?=?re.compile(“^\s*%“?re.MULTILINE)
#?--------------------------------------------------------------------
def?readText(path):
#?--------------------------------------------------------------------
????with?open?(path?“r“)?as?myfile:
????????text=myfile.read()
????return?text
#?--------------------------------------------------------------------
class?MatlabFunction:
#?--------------------------------------------------------------------
????def?__init__(self?name?nature?brief?body):
????????self.name?=?name
????????self.nature?=?nature
????????self.brief?=?brief
????????self.body?=?body
????def?__str__(self):
????????return?“%s?(%s)“?%?(self.name?self.nature)
#?--------------------------------------------------------------------
def?findNextFunction(test?pos):
#?--------------------------------------------------------------------
????if?pos?==?0?and?test[0]?==?‘%‘:
????????#?This?is?an?M-file?with?a?MEX?implementation
????????return?(pos?‘function‘)
????m?=?findFunction.search(test?pos)
????if?m:
????????return?(m.end()+1?m.group(1))
????else:
????????return?(None?None)
#?--------------------------------------------------------------------
def?getFunctionDoc(text?nature?pos):
#?--------------------------------------------------------------------
????m?=?getFunction.match(text?pos)
????if?m:
????????name?=?m.group(1)
????????brief?=?m.group(2).strip()
????????body?=?clean(m.group(3))
????????return?(MatlabFunction(name?nature?brief?body)?m.end()+1)
????else:
????????return?(None?pos)
#?--------------------------------------------------------------------
def?clean(text):
#?--------------------------------------------------------------------
????return?cleanComments.sub(““?text)
#?--------------------------------------------------------------------
def?extract(text):
#?--------------------------------------------------------------------
????funcs?=?[]
????pos?=?0
????while?True:
????????(pos?nature)?=?findNextFunction(text?pos)
????????if?nature?is?None:?break
????????(f?pos)?=?getFunctionDoc(text?nature?pos)
????????if?f:
????????????funcs.append(f)
????return?funcs
#?--------------------------------------------------------------------
class?frame(object):
#?------
?屬性????????????大小?????日期????時間???名稱
-----------?---------??----------?-----??----
?????文件????????119??2017-08-17?16:06??matconvnet-1.0-beta25\.gitattributes
?????文件????????885??2017-08-17?16:06??matconvnet-1.0-beta25\.gitignore
?????文件??????????0??2017-08-17?16:06??matconvnet-1.0-beta25\.gitmodules
?????文件???????1562??2017-08-17?16:06??matconvnet-1.0-beta25\CONTRIBUTING.md
?????文件????????741??2017-08-17?16:06??matconvnet-1.0-beta25\COPYING
?????文件??????32022??2017-08-17?16:06??matconvnet-1.0-beta25\doc\blocks.tex
?????文件??????18884??2017-08-17?16:06??matconvnet-1.0-beta25\doc\figures\imnet.pdf
?????文件?????702358??2017-08-17?16:06??matconvnet-1.0-beta25\doc\figures\pepper.pdf
?????文件??????68592??2017-08-17?16:06??matconvnet-1.0-beta25\doc\figures\svg\conv.svg
?????文件??????65347??2017-08-17?16:06??matconvnet-1.0-beta25\doc\figures\svg\convt.svg
?????文件???????6561??2017-08-17?16:06??matconvnet-1.0-beta25\doc\figures\svg\matconvnet-blue.svg
?????文件???????6734??2017-08-17?16:06??matconvnet-1.0-beta25\doc\figures\svg\matconvnet-white.svg
?????文件??????33879??2017-08-17?16:06??matconvnet-1.0-beta25\doc\fundamentals.tex
?????文件??????16551??2017-08-17?16:06??matconvnet-1.0-beta25\doc\geometry.tex
?????文件??????26898??2017-08-17?16:06??matconvnet-1.0-beta25\doc\impl.tex
?????文件??????17869??2017-08-17?16:06??matconvnet-1.0-beta25\doc\intro.tex
?????文件???????4269??2017-08-17?16:06??matconvnet-1.0-beta25\doc\Makefile
?????文件???????4412??2017-08-17?16:06??matconvnet-1.0-beta25\doc\matconvnet-manual.tex
?????文件???????7192??2017-08-17?16:06??matconvnet-1.0-beta25\doc\matdoc.py
?????文件??????11110??2017-08-17?16:06??matconvnet-1.0-beta25\doc\matdocparser.py
?????文件???????4639??2017-08-17?16:06??matconvnet-1.0-beta25\doc\references.bib
?????文件??????10722??2017-08-17?16:06??matconvnet-1.0-beta25\doc\site\docs\about.md
?????文件???????2957??2017-08-17?16:06??matconvnet-1.0-beta25\doc\site\docs\css\fixes.css
?????文件???????3393??2017-08-17?16:06??matconvnet-1.0-beta25\doc\site\docs\developers.md
?????文件???????7480??2017-08-17?16:06??matconvnet-1.0-beta25\doc\site\docs\faq.md
?????文件??????59846??2017-08-17?16:06??matconvnet-1.0-beta25\doc\site\docs\figures\stn-perf.png
?????文件??????32055??2017-08-17?16:06??matconvnet-1.0-beta25\doc\site\docs\figures\stn-samples.png
?????文件???????3336??2017-08-17?16:06??matconvnet-1.0-beta25\doc\site\docs\functions.md
?????文件???????1148??2017-08-17?16:06??matconvnet-1.0-beta25\doc\site\docs\gpu.md
?????文件???????4440??2017-08-17?16:06??matconvnet-1.0-beta25\doc\site\docs\index.md
............此處省略384個文件信息
評論
共有 條評論