锘??xml version="1.0" encoding="utf-8" standalone="yes"?>色综合久久久久综合体桃花网,国产精品99久久久久久董美香,97久久天天综合色天天综合色hdhttp://www.shnenglu.com/cdy20/category/20044.htmlqq錛?86402937 weibo錛?http://weibo.com/caidongyun 鏋舵瀯-寮婧愪氦嫻?167813458 lomox緹わ細41830909 鏇村璧勬枡錛氬井鍒? http://t.cn/zT53Ryw zh-cnWed, 14 Oct 2015 10:44:28 GMTWed, 14 Oct 2015 10:44:28 GMT60Deep Learning (Spark, Caffe, GPU) http://www.shnenglu.com/cdy20/archive/2015/10/14/212013.html钄′笢璧?/dc:creator>钄′笢璧?/author>Wed, 14 Oct 2015 09:25:00 GMThttp://www.shnenglu.com/cdy20/archive/2015/10/14/212013.htmlhttp://www.shnenglu.com/cdy20/comments/212013.htmlhttp://www.shnenglu.com/cdy20/archive/2015/10/14/212013.html#Feedback0http://www.shnenglu.com/cdy20/comments/commentRss/212013.htmlhttp://www.shnenglu.com/cdy20/services/trackbacks/212013.html

from http://docs.continuum.io/anaconda-cluster/examples/spark-caffe

Deep Learning (Spark, Caffe, GPU)

Description

To demonstrate the capability of running a distributed job in PySpark using a GPU, this example uses a neural network library, Caffe. Below is a trivial example of using Caffe on a Spark cluster; although this is redundant, it demonstrates the capability of training neural networks with GPUs.

For this example, we recommend the use of the AMI ami-2cbf3e44 and the instance type g2.2xlarge. An example profile (to be placed in ~/.acluster/profiles.d/gpu_profile.yaml) is shown below:

name: gpu_profile
node_id: ami-2cbf3e44 # Ubuntu 14.04 - IS HVM - Cuda 6.5
user: ubuntu
node_type: g2.2xlarge
num_nodes: 3
provider: aws
plugins:
  - spark-yarn
  - notebook

Download

To execute this example, download the: spark-caffe.py example script or spark-caffe.ipynbexample notebook.

Installation

The Spark + YARN plugin can be installed on the cluster using the following command:

$ acluster install spark-yarn

Once the Spark + YARN plugin is installed, you can view the YARN UI in your browser using the following command:

$ acluster open yarn

Dependencies

First, we need to bootstrap Caffe and its dependencies on all of the nodes. We provide a bash script that will install Caffe from source: bootstrap-caffe.sh. The following command can be used to upload the bootstrap-caffe.sh script to all of the nodes and execute it in parallel:

$ acluster submit bootstrap-caffe.sh --all

After a few minues, Caffe and its dependencies will be installed on the cluster nodes and the job can be started.

Running the Job

Here is the complete script to run the Spark + GPU with Caffe example in PySpark:

# spark-caffe.py from pyspark import SparkConf from pyspark import SparkContext  conf = SparkConf() conf.setMaster('yarn-client') conf.setAppName('spark-caffe') sc = SparkContext(conf=conf)   def noop(x):     import socket     return socket.gethostname()  rdd = sc.parallelize(range(2), 2) hosts = rdd.map(noop).distinct().collect() print hosts   def caffe_process(x):     import os     os.environ['PATH'] = '/usr/local/cuda/bin' + ':' + os.environ['PATH']     os.environ['LD_LIBRARY_PATH'] = '/usr/local/cuda/lib64:/home/ubuntu/pombredanne-https-gitorious.org-mdb-mdb.git-9cc04f604f80/libraries/liblmdb'     import subprocess     proc = subprocess.Popen('cd /home/ubuntu/caffe && bash ./examples/mnist/train_lenet.sh', shell=True, stdout=subprocess.PIPE, stderr=subprocess.PIPE)     out, err = proc.communicate()     return proc.returncode, out, err  rdd = sc.parallelize(range(2), 2) ret = rdd.map(caffe_process).distinct().collect() print ret 

You can submit the script to the Spark cluster using the submit command.

$ acluster submit spark-caffe.py 

After the script completes, the trained Caffe model can be found at/home/ubuntu/caffe/examples/mnist/lenet_iter_10000.caffemodel on all of the compute nodes.



]]>
鐘舵佹満-銆嬫櫤鑳?璁炬兂1http://www.shnenglu.com/cdy20/archive/2013/01/22/197464.html钄′笢璧?/dc:creator>钄′笢璧?/author>Tue, 22 Jan 2013 05:11:00 GMThttp://www.shnenglu.com/cdy20/archive/2013/01/22/197464.htmlhttp://www.shnenglu.com/cdy20/comments/197464.htmlhttp://www.shnenglu.com/cdy20/archive/2013/01/22/197464.html#Feedback0http://www.shnenglu.com/cdy20/comments/commentRss/197464.htmlhttp://www.shnenglu.com/cdy20/services/trackbacks/197464.html
鏄ㄦ櫄蹇欏畬鏃犺亰鐨勪簨鎯咃紝鎯沖埌浜嗙姸鎬佹満錛屽拰鏅鴻兘銆?br />鍏充簬浣庣瓑鏅鴻兘榪涘寲鐨勪竴涓綋緋葷粨鏋勩傚彲鑳芥湁鐐瑰噷涔憋紝鍏堣涓嬫潵銆?br />

鎴戜滑鐢ㄧ被鏉ユ弿榪?br />
Class
{
鏁版嵁錛?br />銆銆鐘舵佽鍒欍係tate  map or tree
銆銆鐘舵佹満鏈哄埗淇濆瓨銆侲ach State 錛坉ata錛?nbsp;rule錛?nbsp;function錛?br />銆銆
鎿嶄綔錛?br />銆銆
銆銆SateAction(鐜鍙橀噺)
銆銆{
Switch錛坰tate錛?br />{
Case state1錛?br />State1_function();
Break:
Case state2錛?br />State2_function();
Break:
銆銆Defualt:
}
銆銆
銆銆//璁板綍 琛屼負鐘舵?br />銆銆//榪涘寲鎿嶄綔
銆銆}
銆銆
銆銆
銆銆//杈撳叆涓猴細澶栭儴瑙嗛噹 鍐呮垨鑰呮槸 鎰熺煡鑼冨洿 鐜 椹卞姩鏁翠釜瀵硅薄 
銆銆Update()
銆銆{
銆銆}
銆銆
榪涘寲鎿嶄綔錛?br />銆銆//涓嶆柇鍚炲櫖鍏朵粬瀵硅薄鐨?nbsp;鐘舵佹満鎺ュ叆榪涙潵錛岃繛鎺ョ偣涓?nbsp;鍏卞悓鐨勫閮ㄧ幆澧冨彉閲?/span>
銆銆Void Eat(other);
銆銆
銆銆//鑷垜瑙掕壊 鍜岀幆澧?nbsp;璇勪及
銆銆Void Evolution(); //鑷垜鎵╁睍錛屽悇縐嶈繘鍖?nbsp;鏂瑰紡
銆銆
銆銆
//鐘舵佹満鑷垜鎵╁睍鎿嶄綔
銆銆Void EvolutionGo();
銆銆
}



]]>
鍏充簬鏅鴻兘 浜轟笌浜轟箣闂?璇█鍙嶉http://www.shnenglu.com/cdy20/archive/2012/12/26/196676.html钄′笢璧?/dc:creator>钄′笢璧?/author>Wed, 26 Dec 2012 06:25:00 GMThttp://www.shnenglu.com/cdy20/archive/2012/12/26/196676.htmlhttp://www.shnenglu.com/cdy20/comments/196676.htmlhttp://www.shnenglu.com/cdy20/archive/2012/12/26/196676.html#Feedback0http://www.shnenglu.com/cdy20/comments/commentRss/196676.htmlhttp://www.shnenglu.com/cdy20/services/trackbacks/196676.html鍏充簬鏅鴻兘 浜轟笌浜轟箣闂?璇█鍙嶉
鏃╀笂鍏氦杞︿笂闈紝鏀墮煶鏈哄惉鍒板湪璁茶繖涓瘝

淇℃伅錛?/div>
“浣犺繖縐嶄漢”
   
鍋囪緇欎粬涓涓姘?/span>
鑱旀兂鍒扮殑鍏充簬鏅鴻兘涔嬮棿鐨勪氦浜掋?/div>
璇█搴旀縺鎬?/div>
->鍘嗗彶鑳屾櫙 浜х敓鐨勫畾涔?-銆嬪畾涔夋帹鍑哄嚭鏉ョ殑璐箟
->璐箟浜х敓鐨勫巻鍙茶蹇?鎺ㄥ-銆嬭韓浣撳姩鐗╂у彉鍖?/div>
->鍖栧鐗╄川鍙樺寲->鎶戝埗鍒烘縺嬋鍔?娌熼氭帓鏂ワ紝韜綋鍣ㄥ畼媧誨姩絳?鍖呮嫭璇█鍙嶉 澶ц剳鍙嶉 鍏朵粬鍐呰剰鍙嶉
->璁板繂瀛樺偍錛屽巻鍙插簱


]]>鏈哄櫒瀛︿範鐩稿叧鏁版嵁搴?澶囦喚http://www.shnenglu.com/cdy20/archive/2012/10/10/193134.html钄′笢璧?/dc:creator>钄′笢璧?/author>Wed, 10 Oct 2012 11:53:00 GMThttp://www.shnenglu.com/cdy20/archive/2012/10/10/193134.htmlhttp://www.shnenglu.com/cdy20/comments/193134.htmlhttp://www.shnenglu.com/cdy20/archive/2012/10/10/193134.html#Feedback1http://www.shnenglu.com/cdy20/comments/commentRss/193134.htmlhttp://www.shnenglu.com/cdy20/services/trackbacks/193134.html

璧勬枡搴?/h3>

]]>鍏充簬鏅鴻兘鏈鍒濈殑鎯蟲硶http://www.shnenglu.com/cdy20/archive/2012/10/08/192995.html钄′笢璧?/dc:creator>钄′笢璧?/author>Mon, 08 Oct 2012 05:30:00 GMThttp://www.shnenglu.com/cdy20/archive/2012/10/08/192995.htmlhttp://www.shnenglu.com/cdy20/comments/192995.htmlhttp://www.shnenglu.com/cdy20/archive/2012/10/08/192995.html#Feedback0http://www.shnenglu.com/cdy20/comments/commentRss/192995.htmlhttp://www.shnenglu.com/cdy20/services/trackbacks/192995.html
鏈鍒濇病鏈夌煡璇嗚繖涓笢瑗匡紝鏈鍒濅篃娌℃湁浠涔堢煡璇嗕綋緋匯佷漢綾諱駭鍝併?br />
鏈鍒濆氨鏄簲嬋鎬э紝鍚庨潰鐪嬪浜嗭紝鍙戠幇浜嗕竴涓嬪皬鐜╂剰鐨勭幇璞¤寰嬶紝瑙勫緥璁╀綘婊¤凍浜嗘渶鍒濈殑闇姹傜洰鏍囥傚垵鏈熸櫤鑳藉繀欏繪槸綆鍗曠殑鐩爣銆傚湪榪欎釜鑾峰彇綆鍗曠洰鏍囷紝妯′豢銆?br />鍒濇湡宸ュ叿鎻愪緵銆傚浜烘墜鑴氱溂鐫涳紝鏈哄櫒閭d箞灝辨槸鐭ヨ瘑搴撱佺綉緇滄暟鎹噰闆嗐佸垎綾匯佺洰鏍囪В鍐蟲柟妗堢Н绱瓑綆鍗曞伐鍏楓?br />
鍦ㄦ弧瓚寵繖浜涢渶姹傚悗錛屽氨褰㈡垚浜嗗熀紜宸ヤ綔鑳藉姏錛屽熀紜鑾峰彇鐭ヨ瘑鑳藉姏錛屽熀紜杈懼埌綆鍗曠洰鏍囩殑鑳藉姏銆?br />
鍚庨潰灝嗕細鎷ユ湁涓涓簽澶х殑鐜拌薄搴撱傚垎鏋愯繖浜涳紝鎶借薄鍑鴻嚜宸辯殑姒傚康錛屽湪姒傚康鍏寵仈閲岄潰瀵繪壘姒傚康鐨勫叧緋匯?br />鎷ユ湁鏁翠釜涓栫晫鐨勮嫻嬭兘鍔涳紝瀹屽杽鏁翠釜姒傚康鍏崇郴鐨勫艦鎴愩傚彲浠ヤ粠灝忕殑鍒板ぇ鐨勩?br />榪欎釜鏃跺欓渶瑕佷漢綾誨弬涓庡埗瀹氱洰鏍囷紝鎴栬呯敱鏈鍒濈殑鐩爣褰㈡垚澶氫釜瀛愮洰鏍囥傞氳繃榪欎簺鐜拌薄鎺ㄥ瑙e喅鏂規銆傝繃紼嬩笉綆★紝鍙互鏄昏緫鐨勩佷篃鍙互鏄ā緋婄殑絳夌瓑銆?br />
鍏充簬姒傚康鎶借薄鐨勫伐鍏鋒暟鎹寲鎺樼殑宸ュ叿鑱氱被鍒嗙被鐩稿叧鐨勬妧鏈佹蹇靛寲涓緇勭幇璞℃槸鍙互鐨勩?br />鑷充簬姒傚康鍖栧嚭鏉ョ殑錛岃仛綾誨嚭鏉ョ殑姒傚康錛屼綘鍙互闅忔剰鏍囨槑鑻規灉浣犲彲浠ヨ〃紺轟負“X1234”浠繪剰鐨勫敮涓瀹氫箟錛屼綘鍙互璁╀漢綾昏寰楁噦錛屼綘閫氳繃瑙傚療錛岄氳繃浜掕仈緗戞暟鎹垎鏋愩佸浘鍍忓紩鎿庛佷漢綾葷煡璇嗗簱銆傚尮閰嶄綘鐨勭壒寰侊紝鎶借薄鍑烘潵鐨勪笢瑗匡紝鐒跺悗鍙戠幇鏄竴鏍風殑鏈哄櫒浜虹煡閬撶殑x1234 鍘熸潵灝辨槸浜虹被鐨勮嫻鏋溿傘傘傘傘?br />

榪欐牱鐨勭郴緇熻繃浜庡簽澶э紝鍒濇湡鍙兘瑕侀潬宸ㄥ瀷鐨勭緇忕綉緇滈仐浼犵畻娉曠瓑鐢ㄦ潵澶ц妯℃暟鎹仛綾誨垎鏋愶紝褰掔被銆?br />鑷充簬鍏崇郴寤虹珛錛屾殏鏃惰繕娌℃湁濂界殑鍔炴硶錛屽繀欏誨鏌愪竴綾婚昏緫銆佹垚鏋滆繘琛屽叧鑱斿鐞嗐傝繖鏄釜鎸戞垬銆?br />鍏舵瀹炴柦鍙互閫氳繃錛屽皬鐩爣璁懼畾錛岄愭鏋舵瀯澶у瀷緋葷粺鐨勬柟寮忋傚涔犳祴璇曞綊綾伙紝鍙互浠庡皬棰嗗煙鍙戝睍銆?br />



]]>
国产精品久久婷婷六月丁香| 久久强奷乱码老熟女| 久久久久亚洲AV无码网站| 99久久99久久精品国产片果冻| 久久se这里只有精品| 精品国产青草久久久久福利| 日韩精品久久久久久免费| 久久精品这里热有精品| 性做久久久久久免费观看| 熟妇人妻久久中文字幕| 国产亚洲色婷婷久久99精品91| 无码任你躁久久久久久| 久久一区二区三区99| 99精品久久精品一区二区| 国产精品日韩深夜福利久久| 久久伊人精品一区二区三区| 久久久久久国产精品免费无码| 久久国产香蕉视频| 久久久无码人妻精品无码| 91精品婷婷国产综合久久| 精品久久久无码人妻中文字幕| 久久人人爽人人爽人人AV东京热 | 久久亚洲中文字幕精品一区| 伊人久久亚洲综合影院| 91久久九九无码成人网站| 97久久国产综合精品女不卡| 久久久久综合国产欧美一区二区| 国产精品久久久久久吹潮| 久久99精品久久久久久齐齐| 国产精品久久亚洲不卡动漫| 久久99国产精品久久99果冻传媒| 亚洲а∨天堂久久精品9966| 国产69精品久久久久9999| 久久99精品久久久久久动态图 | 伊人久久无码精品中文字幕| 免费精品99久久国产综合精品| 久久人人爽人人爽人人片av高请| 久久精品国产亚洲AV忘忧草18| 日日狠狠久久偷偷色综合0| 久久精品99无色码中文字幕| 久久久久国色AV免费看图片|