クックパッドの機械学習基盤 2018 / Machine Learning Platform at Cookpad ~ 2018 ~

クックパッドの機械学習基盤 2018 / Machine Learning Platform at Cookpad ~ 2018 ~

7dc8611c26c3ca62c551109c65d04270?s=128

Yuichiro Someya

February 21, 2018
Tweet

Transcript

  1. 3.
  2. 18.

    ೥݄౰࣌  (16Πϯελϯε͕ཉ͍͠Πϯϑϥґཔ  ʙिؒ  ࣮ݧ༻ͷΞΧ΢ϯτΛ෼͚ɺར༻ऀ͕ࣗ෼Ͱ
 ΠϯελϯεΛ࡞Δʁ  71$

    4VCOFU ,FZ1BJS 4UPSBHFͷઃఆɺ*OUFSOBM%/4ͱͷؔ࿈෇ ͚ OWJEJBESJWFS $6%" DV%//ͳͲ݁ߏେม  %FFQ-FBSOJOH".*  ͸΋͏ͪΐͬͱະདྷͷ࿩ IUUQTBXTBNB[PODPNKQNBDIJOFMFBSOJOHBNJT
  3. 19.

    ೥݄౰࣌  (16Πϯελϯε͕ཉ͍͠Πϯϑϥґཔ  ʙिؒ  ࣮ݧ༻ͷΞΧ΢ϯτΛ෼͚ɺར༻ऀ͕ࣗ෼Ͱ
 ΠϯελϯεΛ࡞Δʁ  71$

    4VCOFU ,FZ1BJS 4UPSBHFͷઃఆɺ*OUFSOBM%/4ͱͷؔ࿈෇ ͚ OWJEJBESJWFS $6%" DV%//ͳͲ݁ߏେม  %FFQ-FBSOJOH".*  ͸΋͏ͪΐͬͱະདྷͷ࿩ IUUQTBXTBNB[PODPNKQNBDIJOFMFBSOJOHBNJT
  4. 22.

     $6%" DV%//  $6%" DV%//  %FFQ-FBSOJOH".*+BO
 FUD DSFBUFXPSLCFODI

    TMBDL@VJE6  DPNNBOEDSFBUFXPSLCFODI 0VUHPJOH8FCIPPLT MBNCEB*OWPLF
  5. 23.

     $6%" DV%//  $6%" DV%//  %FFQ-FBSOJOH".*+BO
 FUD FD3VO*OTUBODFT

     71$ 4VCOFU /BNFλά౳
 ؀ڥಛ༗ͷઃఆ΋͜͜Ͱ΍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BSU&$JOTUBODFFYJTUJOHVOEFSSBOEEBDDPVOU TUPQ*/45/"$&@/".& 4UPQ&$JOTUBODFFYJTUJOHVOEFSSBOEEBDDPVOU DSFBUFXPSLCFODI803,#&/5)@5:1&<803,#&/$)@/".&> $SFBUFOFX&$XPSLCFODIXJUITQFDJpFEUZQF ".*  UFSNJOBUF*/45"/$&@/".& 5FSNJOBUF&$JOTUBODFFYJTUJOHVOEFSSBOEEBDDPVOU MJTUXPSLCFODIUZQFT -JTU&$XPSLCFODIUZQFT ".* FYJTUJOHVOEFSSBOEEBDDPVOU &$Πϯελϯεʹ·ͭΘΔҰ࿈ͷૢ࡞Λ
 ڞ௨Խ͠ɺ$IBU#PUܦ༝Ͱఏڙ
 ࣮ݧ໨తͰ࢖͏Πϯελϯεͷઃఆ஋͸΄΅ڞ௨Խग़དྷΔ
  8. 26.
  9. 27.

    ೥݄౰࣌  (16Πϯελϯε͕ཉ͍͠Πϯϑϥґཔ  ʙिؒ  ࣮ݧ༻ͷΞΧ΢ϯτΛ෼͚ɺར༻ऀ͕ࣗ෼Ͱ
 ΠϯελϯεΛ࡞Δʁ  71$

    4VCOFU ,FZ1BJS 4UPSBHFͷઃఆɺ*OUFSOBM%/4ͱͷؔ࿈෇ ͚ OWJEJBESJWFS $6%" DV%//ͳͲ݁ߏେมղܾ  %FFQ-FBSOJOH".*  ͸΋͏ͪΐͬͱະདྷͷ࿩ IUUQTBXTBNB[PODPNKQNBDIJOFMFBSOJOHBNJT
  10. 33.

    Ϟσϧ Ϟσϧ࣮૷ ΞϓϦ
 ࣾ಺γεςϜ౳ σʔλऩू ܇࿅ ෼ੳ "1*࣮૷ %PDLFSԽ όον࣮૷

    ςετʗ؂ࢹ લॲཧ σϓϩΠ ϘτϧωοΫ Ϟσϧ։ൃऀ͕૿͑ɺ
 ϞσϧͷσϓϩΠ࡞ۀ͕ϘτϧωοΫʹ
  11. 36.

    αʔόʔʗΞϓϦʹ૊ΈࠐΉ  ͍͍ͱ͜Ζ  Ϟσϧݺͼग़͠ݩͷ௨৴Φʔόʔϔου౳͕ආ͚ΒΕΔ  Α͘ͳ͍ͱ͜Ζ  ΞϓϦέʔγϣϯίʔυΛ͍͡Δඞཁ͕͋Δ 

    1ZUIPO؀ڥʹݶΒΕΔPSม׵͢Δඞཁ͕͋Δ
 Ұํ1Z$BMMͱ͍͏ͷ΋͋Δ    άϧʔίʔυ͕ॏෳ͢Δ
 ͔͠΋݁ߏάϧʔ͕෼ް͔ͬͨΓ͢Δ IUUQTHJUIVCDPNNSLOQZDBMMSC
  12. 38.

    1ZUIPOQBDLBHFʹ͢Δ  ͍͍ͱ͜Ζ  άϧʔίʔυͷॏෳ͕ආ͚ΒΕΔ  Α͘ͳ͍ͱ͜Ζ  ґવ1ZUIPO؀ڥʹݶΒΕΔ 

    ख͕͔͔ؒΔ  //ϑϨʔϜϫʔΫͷ஌ࣝɺ1ZUIPOͷQBDLBHJOHʹؔ͢Δ஌͕ࣝඞཁʹ ͳΔ ୭͕΍Δͷ͔໰୊ IUUQTHJUIVCDPNTUFWFBSDQZQJDMPVE
  13. 42.

    "1*Խʹඞཁͳ΋ͷ Ϟσϧ ͷEVNQ  NPEFM\QC I ^ "1* BQQQZ 


    )551 T &OEQPJOU QSFEJDU JOGPͱ͔ 
 ϞσϧͷಡΈࠐΈͱ*0ϋϯυϥ ࡞ۀ طଘγεςϜʗΠϯϑϥ΁ͷΠϯςάϨʔγϣϯ
 -#ɺϞχλϦϯάɺ%/4౳ʑ ࣮ߦ؀ڥ %PDLFSpMF
  14. 44.

    σϓϩΠ Ϟσϧ Ϟσϧ࣮૷ ΞϓϦ
 ࣾ಺γεςϜ౳ σʔλऩू ܇࿅ ෼ੳ "1*࣮૷ %PDLFSԽ

    όον࣮૷ ςετʗ؂ࢹ લॲཧ ϞσϧΛσϓϩΠ͢ΔਓΛ૿΍͢
  15. 45.

    "1*Խʹඞཁͳ΋ͷ Ϟσϧ ͷEVNQ  NPEFM\QC I ^ "1* BQQQZ 


    )551 T &OEQPJOU QSFEJDU JOGPͱ͔ 
 ϞσϧͷಡΈࠐΈͱ*0ϋϯυϥ ࡞ۀ طଘγεςϜʗΠϯϑϥ΁ͷΠϯςάϨʔγϣϯ
 -#ɺϞχλϦϯάɺ%/4౳ʑ ࣮ߦ؀ڥ %PDLFSpMF
  16. 46.

    "1*Խʹඞཁͳ΋ͷ Ϟσϧ ͷEVNQ  NPEFM\QC I ^ "1* BQQQZ 


    )551 T &OEQPJOU QSFEJDU JOGPͱ͔ 
 ϞσϧͷಡΈࠐΈͱ*0ϋϯυϥ ࡞ۀ طଘγεςϜʗΠϯϑϥ΁ͷΠϯςάϨʔγϣϯ
 -#ɺϞχλϦϯάɺ%/4౳ʑ ࣮ߦ؀ڥ %PDLFSpMF ػցֶशͱͷυϝΠϯڞ༗౓ େ খ
  17. 47.

    "1*Խʹඞཁͳ΋ͷ Ϟσϧ ͷEVNQ  NPEFM\QC I ^ "1* BQQQZ 


    )551 T &OEQPJOU QSFEJDU JOGPͱ͔ 
 ϞσϧͷಡΈࠐΈͱ*0ϋϯυϥ ࡞ۀ طଘγεςϜʗΠϯϑϥ΁ͷΠϯςάϨʔγϣϯ
 -#ɺϞχλϦϯάɺ%/4౳ʑ ࣮ߦ؀ڥ %PDLFSpMF ػցֶशͱͷυϝΠϯڞ༗౓ େ খ 3%ଆͰϋϯυϧ͍ͨ͠ൣғ ػցֶशͱڞ༗͢ΔυϝΠϯ͕େ͖͍
  18. 48.

    σϓϩΠ Ϟσϧ Ϟσϧ࣮૷ ΞϓϦ
 ࣾ಺γεςϜ౳ σʔλऩू ܇࿅ ෼ੳ "1*࣮૷ %PDLFSԽ

    όον࣮૷ ςετʗ؂ࢹ લॲཧ ϞσϧΛσϓϩΠ͢ΔਓΛ૿΍͢
  19. 49.

    Ϟσϧ Ϟσϧ࣮૷ ΞϓϦ
 ࣾ಺γεςϜ౳ σʔλऩू ܇࿅ ෼ੳ "1*࣮૷ %PDLFSԽ όον࣮૷

    ςετʗ؂ࢹ લॲཧ σϓϩΠ Ϟσϧ࣮૷ऀ͕ࣗ෼ͰσϓϩΠ͢Δ
  20. 50.

    "1*Խʹඞཁͳ΋ͷ Ϟσϧ ͷEVNQ  NPEFM\QC I ^ "1* BQQQZ 


    )551 T &OEQPJOU QSFEJDU JOGPͱ͔ 
 ϞσϧͷಡΈࠐΈͱ*0ϋϯυϥ ࡞ۀ طଘγεςϜʗΠϯϑϥ΁ͷΠϯςάϨʔγϣϯ
 -#ɺϞχλϦϯάɺ%/4౳ʑ ࣮ߦ؀ڥ %PDLFSpMF ػցֶशͱͷυϝΠϯڞ༗౓ େ খ
  21. 56.

    .PEFM7FSTJPO 3VOUJNF 6QMPBEANPEFMQCAXJUI
 *0TJHOBUVSFT 1045W\QBSFOUQSPKFDUT ^NPEFMT \ EFQMPZNFOU6SJHTQBUIUPNPEFM  SVOUJNF7FSTJPO

     BVUP4DBMJOH ^   ࢀর  1045W\OBNFQSPKFDUT ^QSFEJDU (PPHMF$MPVE.-&OHJOFʹΑΔσϓϩΠͷਤ $SFBUF JOQVUT PVUQVUT JOQVUT PVUQVUT
  22. 57.

    .PEFM7FSTJPO 3VOUJNF 6QMPBEANPEFMQCAXJUI
 *0TJHOBUVSFT 1045W\QBSFOUQSPKFDUT ^NPEFMT \ EFQMPZNFOU6SJHTQBUIUPNPEFM  SVOUJNF7FSTJPO

     BVUP4DBMJOH ^   ࢀর  1045W\OBNFQSPKFDUT ^QSFEJDU (PPHMF$MPVE.-&OHJOFʹΑΔσϓϩΠͷਤ $SFBUF JOQVUT PVUQVUT JOQVUT PVUQVUT IUUQTDMPVEHPPHMFDPNNMFOHJOFEPDTSVOUJNFWFSTJPOMJTU
  23. 58.

    .PEFM7FSTJPO 3VOUJNF 6QMPBEANPEFMQCAXJUI
 *0TJHOBUVSFT 1045W\QBSFOUQSPKFDUT ^NPEFMT \ EFQMPZNFOU6SJHTQBUIUPNPEFM  SVOUJNF7FSTJPO

     BVUP4DBMJOH ^   ࢀর  1045W\OBNFQSPKFDUT ^QSFEJDU (PPHMF$MPVE.-ʹΑΔσϓϩΠͷਤ $SFBUF JOQVUT PVUQVUT JOQVUT PVUQVUT  "1*ͷ࣮ମ͸$MPVE.-೚ͤ  A4JHOBUVSF%FGAΛར༻ͯ͠JOQVUPVUQVUUFOTPSΛ
 ಛఆ͢Δख๏Λऔ͍ͬͯΔ  ༧Ί༻ҙ͞Ε࣮ͨߦ؀ڥΛࢦఆͯ͠σϓϩΠ  %PDLFSJNBHF͕ෆཁ
  24. 59.

    ࣮ߦ؀ڥ 4FSWF࣮૷ ϞσϧͷϋϯυϦϯά
 ೖग़ྗͷಛఆͳͲ (PPHMF$MPVE
 .-&OHJOF ϓϦηοτ
 5FOTPS'MPX ෆཁ ηϛΦʔτ


    4JHOBUVSF%FGΛར༻ͯ͠༧Ί*0Λ ಛఆՄೳʹ͢Δ 'MPZE)VC "NB[PO 4BHF.BLFS IUUQTEPDTqPZEIVCDPNHVJEFTFOWJSPONFOUT
  25. 60.

    'MPZE)VCʹΑΔσϓϩΠͷਤ SFGIUUQTEPDTqPZEIVCDPNDPNNBOETSVOTFSWF %BUBTFU NPVOUBCMFGPMEFST 1SFWJPVTUSBJOJOHKPCT &OEQPJOU BQQQZ import os from

    flask import Flask, send_file, request from werkzeug.exceptions import BadRequest from werkzeug.utils import secure_filename from evaluate import ffwd_to_img ALLOWED_EXTENSIONS = set(['jpg', 'jpeg']) app = Flask(__name__) @app.route('/<path:path>', methods=["POST"]) def style_transfer(path): """ Take the input image and style transfer it """ # check if the post request has the file part if 'file' not in request.files: return BadRequest("File not present in request") file = request.files['file'] if file.filename == '': return BadRequest("File name is not present in request") if not allowed_file(file.filename): return BadRequest("Invalid file type") if file and allowed_file(file.filename): filename = secure_filename(file.filename) input_filepath = os.path.join('./images/', filename) output_filepath = os.path.join('/output/', filename) file.save(input_filepath) # Get checkpoint filename from la_muse checkpoint = request.form.get("checkpoint") or "la_muse.ckpt" ffwd_to_img(input_filepath, output_filepath, '/input/' + checkpoint, '/gpu:0') return send_file(output_filepath, mimetype='image/jpg') def allowed_file(filename): return '.' in filename and \ filename.rsplit('.', 1)[1].lower() in ALLOWED_EXTENSIONS if __name__ == '__main__': app.run(host='0.0.0.0') BQQQZ NPVOU qPZESVOFOWLFSBTQZ EBUBQBUIUPNPEFMNPEFMT NPEFTFSWF 'MPZEFYQFDUTUIJTpMF UPDPOUBJOUIFDPEFUP SVOBXFCTFSWFSBOE MJTUFOPOQPSU  IUUQTEPDTqPZEIVCDPN FYBNQMFTTUZMF@USBOTGFS TFSWFNPEF  https:// www.floydhub.com/ expose/ABCDEFabcdef SPVUF ॻ͘
  26. 61.

    'MPZE)VCʹΑΔσϓϩΠͷਤ SFGIUUQTEPDTqPZEIVCDPNDPNNBOETSVOTFSWF %BUBTFU NPVOUBCMFGPMEFST 1SFWJPVTUSBJOJOHKPCT &OEQPJOU BQQQZ import os from

    flask import Flask, send_file, request from werkzeug.exceptions import BadRequest from werkzeug.utils import secure_filename from evaluate import ffwd_to_img ALLOWED_EXTENSIONS = set(['jpg', 'jpeg']) app = Flask(__name__) @app.route('/<path:path>', methods=["POST"]) def style_transfer(path): """ Take the input image and style transfer it """ # check if the post request has the file part if 'file' not in request.files: return BadRequest("File not present in request") file = request.files['file'] if file.filename == '': return BadRequest("File name is not present in request") if not allowed_file(file.filename): return BadRequest("Invalid file type") if file and allowed_file(file.filename): filename = secure_filename(file.filename) input_filepath = os.path.join('./images/', filename) output_filepath = os.path.join('/output/', filename) file.save(input_filepath) # Get checkpoint filename from la_muse checkpoint = request.form.get("checkpoint") or "la_muse.ckpt" ffwd_to_img(input_filepath, output_filepath, '/input/' + checkpoint, '/gpu:0') return send_file(output_filepath, mimetype='image/jpg') def allowed_file(filename): return '.' in filename and \ filename.rsplit('.', 1)[1].lower() in ALLOWED_EXTENSIONS if __name__ == '__main__': app.run(host='0.0.0.0') BQQQZ NPVOU qPZESVOFOWLFSBTQZ EBUBQBUIUPNPEFMNPEFMT NPEFTFSWF 'MPZEFYQFDUTUIJTpMF UPDPOUBJOUIFDPEFUP SVOBXFCTFSWFSBOE MJTUFOPOQPSU  IUUQTEPDTqPZEIVCDPN FYBNQMFTTUZMF@USBOTGFS TFSWFNPEF  https:// www.floydhub.com/ expose/ABCDEFabcdef SPVUF IUUQTEPDTqPZEIVCDPNHVJEFTFOWJSPONFOUT
  27. 62.

    'MPZE)VCʹΑΔσϓϩΠͷਤ SFGIUUQTEPDTqPZEIVCDPNDPNNBOETSVOTFSWF %BUBTFU NPVOUBCMFGPMEFST 1SFWJPVTUSBJOJOHKPCT &OEQPJOU BQQQZ import os from

    flask import Flask, send_file, request from werkzeug.exceptions import BadRequest from werkzeug.utils import secure_filename from evaluate import ffwd_to_img ALLOWED_EXTENSIONS = set(['jpg', 'jpeg']) app = Flask(__name__) @app.route('/<path:path>', methods=["POST"]) def style_transfer(path): """ Take the input image and style transfer it """ # check if the post request has the file part if 'file' not in request.files: return BadRequest("File not present in request") file = request.files['file'] if file.filename == '': return BadRequest("File name is not present in request") if not allowed_file(file.filename): return BadRequest("Invalid file type") if file and allowed_file(file.filename): filename = secure_filename(file.filename) input_filepath = os.path.join('./images/', filename) output_filepath = os.path.join('/output/', filename) file.save(input_filepath) # Get checkpoint filename from la_muse checkpoint = request.form.get("checkpoint") or "la_muse.ckpt" ffwd_to_img(input_filepath, output_filepath, '/input/' + checkpoint, '/gpu:0') return send_file(output_filepath, mimetype='image/jpg') def allowed_file(filename): return '.' in filename and \ filename.rsplit('.', 1)[1].lower() in ALLOWED_EXTENSIONS if __name__ == '__main__': app.run(host='0.0.0.0') BQQQZ NPVOU qPZESVOFOWLFSBTQZ EBUBQBUIUPNPEFMNPEFMT NPEFTFSWF 'MPZEFYQFDUTUIJTpMF UPDPOUBJOUIFDPEFUP SVOBXFCTFSWFSBOE MJTUFOPOQPSU  IUUQTEPDTqPZEIVCDPN FYBNQMFTTUZMF@USBOTGFS TFSWFNPEF  https:// www.floydhub.com/ expose/ABCDEFabcdef SPV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M"SUJGBDU GET /ping POST /invocations QSFTFUTFSWFMBUFTU %PXOMPBE TBHFNBLFS$SFBUF.PEFM

    TBHFNBLFS$SFBUF&OEQPJOU 5SBJOJOH+PC QSFTFUUSBJOMBUFTU 6QMPBE TBHFNBLFS$SFBUF5SBJOJOH+PC   3FGIUUQTEPDTBXTBNB[PODPNTBHFNBLFSMBUFTUEH IPXJUXPSLTIPTUJOHIUNM 4BHF.BLFS1ZUIPO4%, QSFTFU@NPEFMpU QSFTFU@NPEFMEFQMPZ  TBHFNBLFS*OWPLF&OEQPJOU QSFTFU@NPEFMQSFEJDU 1SFTFU #VJMUJO 
 "MHPSJUINT
  -JOFBS-FBSOFS  9(#PPTU  *NBHF$MBTTJpDBUJPO  TFRTFR  FUD SFGIUUQTEPDTBXTBNB[PODPN TBHFNBLFSMBUFTUEHBMHPTIUNM
  31. 66.

    ࣮ߦ؀ڥ 4FSWF࣮૷ ϞσϧͷϋϯυϦϯά
 ೖग़ྗͷಛఆͳͲ (PPHMF$MPVE
 .-&OHJOF ϓϦηοτ
 5FOTPS'MPX ෆཁ ηϛΦʔτ


    4JHOBUVSF%FGΛར༻ͯ͠༧Ί*0Λಛ ఆՄೳʹ͢Δ 'MPZE)VC ϓϦηοτ
 5FOTPS'MPX ,FSBT  1Z5PSDI FUD   BQQQZͰ࣮૷ BQQQZͰ࣮૷ "NB[PO 4BHF.BLFS ϓϦηοτʗ ࣗલͷ%PDLFS JNBHFΑΓબ୒ ෆཁ ϓϦηοτΛར༻͢Δ৔߹ෆཁ ಠࣗϞσϧΛʏඞཁ IUUQTEPDTqPZEIVCDPNHVJEFTFOWJSPONFOUT
  32. 67.

    ࣮ߦ؀ڥ 4FSWF࣮૷ ϞσϧͷϋϯυϦϯά
 ೖग़ྗͷಛఆͳͲ (PPHMF$MPVE
 .-&OHJOF ϓϦηοτ
 5FOTPS'MPX ෆཁ ηϛΦʔτ


    4JHOBUVSF%FGΛར༻ͯ͠༧Ί*0Λಛ ఆՄೳʹ͢Δ 'MPZE)VC ϓϦηοτ
 5FOTPS'MPX ,FSBT  1Z5PSDI FUD   BQQQZͰ࣮૷ BQQQZͰ࣮૷ "NB[PO 4BHF.BLFS ϓϦηοτʗ ࣗલͷ%PDLFS JNBHFΑΓબ୒ ෆཁ ϓϦηοτΛར༻͢Δ৔߹ෆཁ ಠࣗϞσϧΛʏඞཁ IUUQTEPDTqPZEIVCDPNHVJEFTFOWJSPONFOUT ϓϦηοτͱͯ͠੩తͳ࣮ߦ؀ڥ Ϧετ ͕
 ఏڙ͞Ε͍ͯΔ
  33. 69.

    3VOUJNF T 
 EPDLFSSFQPTJUPSZ LFSBTQZ TFSWFQZ  ϩʔΧϧ
 ؀ڥ 1VMM

    %FQMPZNFOUT $MPVE 4UPSBHF 1VMM LFSBTQZ TFSWFQZ LFSBTQZ TFSWFQZ ͭ·Γ͜Μͳײ͡ 5SBJO 6QMPBE
  34. 70.

    ࣮ߦ؀ڥ 4FSWF࣮૷ ϞσϧͷϋϯυϦϯά
 ೖग़ྗͷಛఆͳͲ (PPHMF$MPVE
 .-&OHJOF ϓϦηοτ
 5FOTPS'MPX ෆཁ ηϛΦʔτ


    4JHOBUVSF%FGΛར༻ͯ͠༧Ί*0Λಛ ఆՄೳʹ͢Δ 'MPZE)VC ϓϦηοτ
 5FOTPS'MPX ,FSBT  1Z5PSDI FUD   BQQQZͰ࣮૷ BQQQZͰ࣮૷ "NB[PO 4BHF.BLFS ϓϦηοτʗ ࣗલͷ%PDLFS JNBHFΑΓબ୒ ෆཁ ϓϦηοτΛར༻͢Δ৔߹ෆཁ ಠࣗϞσϧΛʏඞཁ IUUQTEPDTqPZEIVCDPNHVJEFTFOWJSPONFOUT
  35. 71.

    ϋϯυϥ ϞσϧͷϋϯυϦϯά  ͱ͸  ϞσϧͷαʔόʔΛ࡞Δ৔߹ʹɺҎԼͷػೳ͕ඞཁʹͳΔ  ϞσϧΛ ͓ͦΒ͘ϝϞϦʹ ಡΈࠐΉ

     ೖྗ "1*αʔόʔͷ৔߹SFRVFTU ΛϞσϧʹ౉͢  Ϟσϧ͔Βͷग़ྗΛड͚औΓSFTQPOTFʹฦ͢ "1* -PBE
  36. 73.

    ϞσϧͷϋϯυϦϯά  ·ͣωοτϫʔΫͷ*0ͷ৔ॴͱܕΛಛఆ͢Δඞཁ͕͋Δ  ͜͜͸ϑϨʔϜϫʔΫʹΑͬͯ͘Δ
 ωοτϫʔΫ࣮૷࣌ʹJOQVUPVUQVU͕ܾ·Δ৔߹΋͋Δ 
 ,FSBT 1Z5PSDI +*5

    ౳   ݁ߏَ໳  *OQVU 0VUQVU ͕ෳ਺͋Δ৔߹͸ʁ  ඪ४ԽΛ͢ΔྲྀΕ΋͋Δ IUUQTTQFBLFSEFDLDPNBZFNPT QZUPSDIUPDB⒎FUPPOOYUPTIFODFOH YVFYJNPEFSVGBMTFEFQVSPJOJUVJUF
  37. 74.

    ࣮ߦ؀ڥ 4FSWF࣮૷ ϞσϧͷϋϯυϦϯά
 ೖग़ྗͷಛఆͳͲ (PPHMF$MPVE
 .-&OHJOF ϓϦηοτ
 5FOTPS'MPX ෆཁ ηϛΦʔτ


    4JHOBUVSF%FGΛར༻ͯ͠༧Ί*0Λಛ ఆՄೳʹ͢Δ 'MPZE)VC ϓϦηοτ
 5FOTPS'MPX ,FSBT  1Z5PSDI FUD   BQQQZͰ࣮૷ BQQQZͰ࣮૷ "NB[PO 4BHF.BLFS ϓϦηοτʗ ࣗલͷ%PDLFS JNBHFΑΓબ୒ ෆཁ ϓϦηοτΛར༻͢Δ৔߹ෆཁ 5FOTP'MPX .9/FU ಠࣗϞσϧඞཁ IUUQTEPDTqPZEIVCDPNHVJEFTFOWJSPONFOUT
  38. 75.

    Ϟσϧͷ"1*ʹؔ͢Δߟ࡯  Ϟσϧͷ"1*ͱͯ͠ඞཁͳػೳʁ  QSFEJDU IFBMUIଞʹ͸ʁ  ׂΓ੾Ε͹݁ߏڞ௨Խग़དྷΔ
 (PPHMF$MPVE.-ͷྫʹݟΔΑ͏ʹ 

     લड़ͨ͠໰୊ʹൺ΂Ε͹ᘭ຤Ͱ͋Δ
 ࣮ߦ؀ڥͱϞσϧͷϋϯυϦϯά͕ͳΜͱ͔ͳΕ͹
 "1*ͷ࣮૷͸Ͳ͏ʹͰ΋ͳΓͦ͏
  39. 77.

    .-BB4ͱͷ෇͖߹͍ํ  ϓϥοτϑΥʔϜ͕αϙʔτ͢Δൣғ͸෼ް͘ͳͬͯ͘Δ ͸ͣ   $*$%ɺ"#ςετ $BOBSZ ͳͲ 

    ࠓޙ΋࣍ୈʹ৐͔ͬΔϝϦοτ͕େ͖͘ͳͬͯ͘Δ  খதن໛ͳػցֶशνʔϜͰ͸ࣗڅࣗ଍͢Δͷ΋ ࠓͷͱ͜Ζ 
 બ୒ࢶʹೖΔ
  40. 78.

    Ϟσϧ Ϟσϧ࣮૷ ΞϓϦ
 ࣾ಺γεςϜ౳ σʔλऩू ܇࿅ ෼ੳ "1*࣮૷ %PDLFSԽ όον࣮૷

    ςετʗ؂ࢹ લॲཧ σϓϩΠ Ϟσϧ࣮૷ऀ͕ࣗ෼ͰσϓϩΠ͢Δ
  41. 80.

    NPEFMQC 3VOUJNFEFpOJUJPOT LFSBTQZ 3VOUJNFT &$3 LFSBTQZ TFSWFQZ %PDLFSpMF  TFSWFQZ

    %PDLFSpMF UFOTPSqPXQZ TFSWFQZ %PDLFSpMF  UFOTPSqPXQZ TFSWFQZ %PDLFSpMF #VJME NFUBEBUBZNM name: cookpadnet model: path: model.pb input: input_1 output: final_result runtime: tensorflow
  42. 81.

    NPEFMQC 3VOUJNFEFpOJUJPOT LFSBTQZ 3VOUJNFT &$3 LFSBTQZ TFSWFQZ %PDLFSpMF  TFSWFQZ

    %PDLFSpMF UFOTPSqPXQZ TFSWFQZ %PDLFSpMF  UFOTPSqPXQZ TFSWFQZ %PDLFSpMF #VJME NFUBEBUBZNM name: cookpadnet model: path: model.pb input: input_1 output: final_result runtime: tensorflow $ python deploy.py
 Uploading model artifacts to: s3://foo/model.pb Updating task definition... Updated: arn:aws:ecs:::task-definition/cookpadnet:1 Deploying new sevice...
  43. 82.

    $ python deploy.py
 Uploading model artifacts to: s3://foo/model.pb Updating task

    definition... Updated: arn:aws:ecs:::task-definition/cookpadnet:1 Deploying new sevice... &$4 NPEFMQC 3VOUJNFEFpOJUJPOT LFSBTQZ 3VOUJNFT &$3 LFSBTQZ TFSWFQZ %PDLFSpMF  TFSWFQZ %PDLFSpMF UFOTPSqPXQZ TFSWFQZ %PDLFSpMF  UFOTPSqPXQZ TFSWFQZ %PDLFSpMF #VJME NFUBEBUBZNM name: cookpadnet model: path: model.pb input: input_1 output: final_result runtime: tensorflow
  44. 83.

    $ python deploy.py
 Uploading model artifacts to: s3://foo/model.pb Updating task

    definition... Updated: arn:aws:ecs:::task-definition/cookpadnet:1 Deploying new sevice... &$4 NPEFMQC 3VOUJNFEFpOJUJPOT LFSBTQZ 3VOUJNFT &$3 LFSBTQZ TFSWFQZ %PDLFSpMF  TFSWFQZ %PDLFSpMF UFOTPSqPXQZ TFSWFQZ %PDLFSpMF  UFOTPSqPXQZ TFSWFQZ %PDLFSpMF #VJME NFUBEBUBZNM name: cookpadnet model: path: model.pb input: input_1 output: final_result runtime: tensorflow DVSMEBUBCJOBSZ!GPPEKQHIPHFMCFMCBNB[POBXTDPNQSFEJDU )$POUFOU5ZQFJNBHFKQFH \ SFTVMU< <     F > > ^