如何理解CNN神经网络反向传播算法里的反向传播backpropagation,bp算法

2012年1月 其他开发语言大版内专家分月排行榜第二2011年5月 其他开发语言大版内专家分月排行榜第二2010年12月 其他开发语言大版内专家分月排行榜第二2009年2月 其他开发语言大版内专家分月排行榜第二2008年9月 其他开发语言大版内专家分月排行榜第二2008年8月 其他开发语言大版内专家分月排行榜第二2008年5月 其他开发语言大版内专家分月排行榜第二2007年11月 其他开发语言大版内专家分月排行榜第二
2011年4月 其他开发语言大版内专家分月排行榜第三2011年1月 其他开发语言大版内专家分月排行榜第三2009年6月 其他开发语言大版内专家分月排行榜第三2009年4月 其他开发语言大版内专家分月排行榜第三2009年1月 其他开发语言大版内专家分月排行榜第三2008年11月 其他开发语言大版内专家分月排行榜第三2008年7月 其他开发语言大版内专家分月排行榜第三2008年6月 其他开发语言大版内专家分月排行榜第三2006年9月 其他开发语言大版内专家分月排行榜第三
2014年8月 其他开发语言大版内专家分月排行榜第二2014年7月 其他开发语言大版内专家分月排行榜第二2014年5月 其他开发语言大版内专家分月排行榜第二2014年4月 其他开发语言大版内专家分月排行榜第二2014年3月 其他开发语言大版内专家分月排行榜第二2014年1月 其他开发语言大版内专家分月排行榜第二2013年12月 其他开发语言大版内专家分月排行榜第二2013年11月 其他开发语言大版内专家分月排行榜第二2013年3月 其他开发语言大版内专家分月排行榜第二2012年5月 其他开发语言大版内专家分月排行榜第二2012年4月 其他开发语言大版内专家分月排行榜第二2010年10月 其他开发语言大版内专家分月排行榜第二2010年9月 其他开发语言大版内专家分月排行榜第二
2013年9月 其他开发语言大版内专家分月排行榜第三2012年6月 其他开发语言大版内专家分月排行榜第三
本帖子已过去太久远了,不再提供回复功能。问题对人有帮助,内容完整,我也想知道答案
问题没有实际价值,缺少关键内容,没有改进余地
如上问题在windows和linux下都出现过,跑的程序也有所不同。程序里都有打印进度的print,有的时候半天不动,输入回车之后就print出了新的一行,怀疑是和print的IO操作相关。求解释,谢谢。
答案对人有帮助,有参考价值
答案没帮助,是错误的答案,答非所问
非异步,只能等线程完成,才会print
答案对人有帮助,有参考价值
答案没帮助,是错误的答案,答非所问
有些程序报错会print信息。
进度库可以用tqdm
同步到新浪微博
分享到微博?
Hi,欢迎来到 SegmentFault 技术社区!⊙▽⊙ 在这里,你可以提出编程相关的疑惑,关注感兴趣的问题,对认可的回答投赞同票;大家会帮你解决编程的问题,和你探讨技术更新,为你的回答投上赞同票。
明天提醒我
关闭理由:
删除理由:
忽略理由:
推广(招聘、广告、SEO 等)方面的内容
与已有问题重复(请编辑该提问指向已有相同问题)
答非所问,不符合答题要求
宜作评论而非答案
带有人身攻击、辱骂、仇恨等违反条款的内容
无法获得确切结果的问题
非开发直接相关的问题
非技术提问的讨论型问题
其他原因(请补充说明)
我要该,理由是:
扫扫下载 App2475人阅读
Python(17)
在纯控制台输出的程序中,有时候想要显示程序运行的进度,如果进度更新一次就输出一次,会打印很多行信息,把前面有用的信息覆盖掉了。Linux下面安装文件时出现的文本形式的进度条和百分比只在一行里面刷新,很不错。Python在windows下面也可以实现这种效果。
import sys
import time
for i in range(10000):
percent = 1.0 * i / 10000 * 100
print 'complete percent:' + str(percent) + '%',
sys.stdout.write(&\r&)
time.sleep(0.1)
程序输出结果为:
&&相关文章推荐
* 以上用户言论只代表其个人观点,不代表CSDN网站的观点或立场
访问:93948次
积分:1942
积分:1942
排名:第19258名
原创:98篇
转载:41篇
(1)(2)(2)(18)(2)(1)(4)(2)(6)(5)(1)(1)(1)(2)(4)(6)(8)(7)(8)(8)(8)(10)(3)(9)(15)(7)5261人阅读
Python(93)
环境:linux
一段执行时间很长的程序(用python做hive客户端执行mapreduce) 在linux后台执行,把结果输出到某文件:
Python代码&&
python&xxx.py&&&log.log&&&&
&遇到的问题,程序没报错,文件里却什么都没有,没有输入进去。为什么呢?
于是我首先尝试用:
Java代码&&
nohup&python&xxx.py&&&log.log&&&&
预料之中 还是不行。
于是我做实验:
写了个test.py:
Java代码&&
import&sys,time&&
from&threading&import&Thread&&
class&worker(Thread):&&
&&&&&def&run(self):&&
&&&&&&&&&for&x&in&xrange(0,111):&&
&&&&&&&&&&&&&print&x&&
&&&&&&&&&&&&&time.sleep(1)&&
def&run():&&
&&&&&worker().start()&&
if&__name__&==&'__main__':&&
&&&&run()&&
&每秒打印一次
我直接用python text.py 执行 &没问题 &每秒输出一个数
但我在后台执行:
Python代码&&
python&test.py&&&log.log&&&&
还是不行。开始不输出 &直到程序执行完,一次性的写到log.log文件了。
为什么呢?&
原因可能是python 的print 先写到缓冲区了,还没flush到文件。
于是加了一行“ sys.stdout.flush()” --在每次print后都flush一次。:
Java代码&&
import&sys,time&&
from&threading&import&Thread&&
class&worker(Thread):&&
&&&&&def&run(self):&&
&&&&&&&&&for&x&in&xrange(0,111):&&
&&&&&&&&&&&&&print&x&&
&&&&&&&&&&&&&sys.stdout.flush()&&&&
&&&&&&&&&&&&&time.sleep(1)&&
def&run():&&
&&&&&worker().start()&&
if&__name__&==&'__main__':&&
&&&&run()&&
问题解决。
===============================================================================
还可以:python-u
xxx.py & log.log & ,再细看下帮助文档:man python
PYTHON(1) & & & & & & & & & & & & & & & & & & & & & & & & & & & & & &PYTHON(1)
& & & &python - an interpreted, interactive, object-oriented programming language
& & & &python [ -d ] [ -E ] [ -h ] [ -i ] [ -m module-name ] [ -O ]
& & & & & & & [ -Q argument ] [ -S ] [ -t ] [ -u ]
& & & & & & & [ -v ] [ -V ] [ -W argument ] [ -x ] [ -3 ]
& & & & & & & [ -c command | script | - ] [ arguments ]
DESCRIPTION
& & & &Python &is &an &interpreted, &interactive, object-oriented programming language that combines remarkable power with very clear syntax.
& & & &For an introduction to programming in Python you are referred to the Python Tutorial. &The Python Library Reference documents built-in
& & & &and &standard types, constants, functions and modules. &Finally, the Python Reference Manual describes the syntax and semantics of the
& & & &core language in (perhaps too) much detail. &(These documents may be located via the INTERNET RESOURCES they may &be &installed
& & & &on your system as well.)
& & & &Python’s &basic &power &can &be &extended &with your own modules written in C or C++. &On most systems such modules may be dynamically
& & & &loaded. &Python is also adaptable as an extension language for existing applications. &See the internal documentation for hints.
& & & &Documentation for installed Python modules and packages can be viewed by running the pydoc program.
COMMAND LINE OPTIONS
& & & &-c command
& & & & & & & Specify the command to execute (see next section). &This terminates the option list (following options are passed as &arguments
& & & & & & & to the command).
& & & &-d & & Turn on parser debugging output (for wizards only, depending on compilation options).
& & & &-E & & Ignore environment variables like PYTHONPATH and PYTHONHOME that modify the behavior of the interpreter.
& & & &-h & & Prints the usage for the interpreter executable and exits.
& & & &-i & & When &a &script &is passed as first argument or the -c option is used, enter interactive mode after executing the script or the
& & & & & & & command. &It does not read the $PYTHONSTARTUP file. &This can be useful to inspect global variables or a &stack &trace &when &a
& & & & & & & script raises an exception.
& & & &-m module-name
& & & & & & & Searches sys.path for the named module and runs the corresponding .py file as a script.
Force stdin, stdout and stderr to be totally
unbuffered. &On systems where
it matters, also put stdin, &stdout &and &stderr &in
& & & & & & & binary &mode. & Note &that &there &is &internal &buffering in xreadlines(), readlines() and file-object
iterators (&for line in
& & & & & & & sys.stdin&) which is not influenced by this option. &To work around this, you will want to use &sys.stdin.readline()& inside &a
& & & & & & & &while 1:& loop.
& & & &-v & & Print &a &message &each &time a module is initialized, showing the place (filename or built-in module) from which it is loaded.
& & & & & & & When given twice, print a message for each file that is checked for when searching for a module. &Also provides information &on
& & & & & & & module cleanup at exit.
& & & &-V & & Prints the Python version number of the executable and exits.
&&相关文章推荐
* 以上用户言论只代表其个人观点,不代表CSDN网站的观点或立场
访问:1999381次
积分:22031
积分:22031
排名:第303名
原创:297篇
转载:713篇
评论:206条
(3)(3)(1)(2)(4)(5)(4)(2)(3)(1)(10)(2)(2)(10)(4)(3)(3)(9)(18)(10)(9)(21)(4)(23)(25)(7)(19)(33)(22)(12)(2)(8)(8)(3)(4)(9)(6)(4)(23)(23)(26)(39)(24)(12)(14)(7)(25)(24)(14)(1)(14)(5)(5)(6)(25)(30)(39)(62)(37)(61)(56)(31)(37)(5)(3)(3)(2)(3)(4)(1)(1)(3)(2)(17)(1)(4)(5)(1)(1)(9)(1)(3)(2)

我要回帖

更多关于 前馈反向传播神经网络 的文章

 

随机推荐