{"id":14542,"date":"2019-10-17T14:10:38","date_gmt":"2019-10-17T06:10:38","guid":{"rendered":"https:\/\/blog.tibame.com\/?p=14542"},"modified":"2022-06-08T11:51:31","modified_gmt":"2022-06-08T03:51:31","slug":"tensorflow-2-0-%e6%a9%9f%e5%99%a8%e5%ad%b8%e7%bf%92%e8%b7%9f%e6%b7%b1%e5%ba%a6%e5%ad%b8%e7%bf%92%e7%9a%84%e6%96%b0%e5%af%b5%e5%85%92","status":"publish","type":"post","link":"https:\/\/blog.tibame.com\/?p=14542","title":{"rendered":"TensorFlow 2.0-\u6a5f\u5668\u5b78\u7fd2\u8ddf\u6df1\u5ea6\u5b78\u7fd2\u7684\u65b0\u5bf5\u5152"},"content":{"rendered":"\n<p>\u5728\u4eba\u5de5\u667a\u6167\uff08AI\uff09\u7684\u6642\u4ee3\uff0cTensorFlow\u5df2\u7d93\u6210\u70ba\u6a5f\u5668\u5b78\u7fd2\u8ddf\u6df1\u5ea6\u5b78\u7fd2\u958b\u767c\u7684\u4e3b\u6d41\u7a0b\u5f0f\u5eab\uff0c\u5176\u529f\u80fd\u5f37\u5927\u3001\u904b\u7b97\u6548\u7387\u9ad8\u3001\u652f\u63f4\u591a\u500b\u5e73\u53f0\uff0c\u9020\u5c31\u4e86\u696d\u754c\u548c\u5b78\u8853\u754c\u7684\u5ee3\u6cdb\u4f7f\u7528\u3002\u7136\u800c\uff0cTensorFlow 1.x\u7248\u7684\u5b78\u7fd2\u9580\u6abb\u8f03\u9ad8\uff0c\u5c0d\u525b\u5165\u9580\u7684\u521d\u5b78\u8005\u4f86\u8aaa\u76f8\u7576\u96e3\u4e0a\u624b\uff0c\u5c0d\u65bc\u9019\u500b\u554f\u984c\uff0cGoogle\u958b\u767c\u5718\u968a\u63a8\u51fa\u4e86TensorFlow 2.0\u7248\u3002\u5728TensorFlow 2.0\u5f15\u5165\u4e86Eager Execution\u52d5\u614b\u5716\u6a21\u5f0f\u3001Keras\u9ad8\u968eAPI\u548ctf.data\u7b49\u4e09\u500b\u529f\u80fd\uff0c\u8b93\u5b78\u7fd2\u9580\u6abb\u5927\u5e45\u964d\u4f4e\u3002<\/p>\n\n\n\n<p><strong>TensorFlow-\u6700\u53d7\u6b61\u8fce\u7684\u6a5f\u5668\u5b78\u7fd2\u8ddf\u6df1\u5ea6\u5b78\u7fd2\u6846\u67b6<\/strong><\/p>\n\n\n\n<p>\u4f5c\u70ba\u6700\u6d41\u884c\u7684\u6a5f\u5668\u5b78\u7fd2\u6846\u67b6\uff0cTensorFlow \u5df2\u7d93\u6210\u9577\u70ba\u5168\u7403\u4f7f\u7528\u6700\u5ee3\u6cdb\u7684\u6a5f\u5668\u5b78\u7fd2\u5e73\u53f0\u3002\u76ee\u524d\uff0cTensorFlow \u7684\u958b\u767c\u8005\u793e\u7fa4\u5305\u62ec\u7814\u7a76\u8005\u3001\u958b\u767c\u8005\u548c\u4f01\u696d\u7b49\u3002<\/p>\n\n\n\n<p>\u53bb\u5e74 11 \u6708\uff0cTensorFlow \u525b\u6176\u795d\u4e86\u81ea\u5df1\u7684\u4e09\u6b72\u751f\u65e5\u3002\u4e0d\u4e45\u4e4b\u5f8c\uff0c\u4e5f\u5c07\u8fce\u4f86\u53e6\u4e00\u500b\u91cd\u8981\u91cc\u7a0b\u7891\u2014TensorFlow\n2.0<\/p>\n\n\n\n<p>TensorFlow 2.0 \u5c07\u5c08\u6ce8\u65bc\u7c21\u6f54\u6027\u548c\u6613\u7528\u6027\uff0c\u4e3b\u8981\u5347\u7d1a\u65b9\u5411\u5305\u62ec\uff1a<\/p>\n\n\n\n<ul class=\"wp-block-list\"><li>\u4f7f\u7528 Keras \u548c&nbsp;<a href=\"https:\/\/www.jishuwen.com\/jump\/aHR0cDovL21wLndlaXhpbi5xcS5jb20vcz9fX2Jpej1NekEzTXpJNE1qZ3pNdz09Jm1pZD0yNjUwNzQ4OTE0JmlkeD0zJnNuPWJjMDM0ZGNmNjIwMTZjMGFjNWY1M2IzOTM1ZjY4ZmUwJmNoa3NtPTg3MWFmMzhjYjA2ZDdhOWExODVlMjQzOTAxYjJlYzcyOTRiNmVlOTE5MjgzM2JmZmQxMWQ3OTRiMjdlYjAyMjJlZWRhNDMzMDIyNDYmc2NlbmU9MjEjd2VjaGF0X3JlZGlyZWN0\" target=\"_blank\" rel=\"noreferrer noopener\">Eager Execution<\/a>&nbsp;\u8f15\u9b06\u69cb\u5efa\u6a21\u578b\u3002<\/li><li>\u5728\u4efb\u610f\u5e73\u53f0\u4e0a\u5be6\u73fe\u7a69\u5065\u7684\u751f\u7522\u74b0\u5883\u6a21\u578b\u90e8\u7f72\u3002<\/li><li>\u70ba\u7814\u7a76\u63d0\u4f9b\u5f37\u5927\u7684\u5be6\u9a57\u5de5\u5177\u3002<\/li><li>\u6e05\u7406\u4e0d\u5efa\u8b70\u4f7f\u7528\u7684 API \u548c\u6e1b\u5c11\u91cd\u8907\u4f86\u7c21\u5316 API\u3002<\/li><\/ul>\n\n\n\n<p>Google\u8868\u793a\uff0c\u5728\u904e\u53bb\u5e7e\u5e74\u88e1\uff0cTensorFlow \u589e\u52a0\u4e86\u5f88\u591a\u5143\u4ef6\u3002\u901a\u904e TensorFlow 2.0 \u7248\u672c\u7684\u5927\u5e45\u5ea6\u91cd\u5efa\uff0c\u9019\u4e9b\u529f\u80fd\u5c07\u88ab\u6253\u5305\u6210\u70ba\u4e00\u500b\u7d9c\u5408\u5e73\u53f0\uff0c\u652f\u63f4\u5f9e\u8a13\u7df4\u5230\u90e8\u7f72\u7684\u6574\u500b\u6a5f\u5668\u5b78\u7fd2\u5de5\u4f5c\u6d41\u7a0b\u3002\u4e0b\u5716\u5c55\u793a\u4e86 TensorFlow 2.0 \u7684\u65b0\u67b6\u69cb\uff1a<\/p>\n\n\n\n<figure class=\"wp-block-image\"><img decoding=\"async\" width=\"1024\" height=\"568\" src=\"https:\/\/blog.wiedu.tw\/wp-content\/uploads\/2019\/10\/tensorflow-1024x568.jpg\" alt=\"\" class=\"wp-image-14545\" srcset=\"https:\/\/blog.tibame.com\/wp-content\/uploads\/2019\/10\/tensorflow-1024x568.jpg 1024w, https:\/\/blog.tibame.com\/wp-content\/uploads\/2019\/10\/tensorflow-300x166.jpg 300w, https:\/\/blog.tibame.com\/wp-content\/uploads\/2019\/10\/tensorflow-768x426.jpg 768w, https:\/\/blog.tibame.com\/wp-content\/uploads\/2019\/10\/tensorflow.jpg 1080w\" sizes=\"(max-width: 1024px) 100vw, 1024px\" \/><\/figure>\n\n\n\n<p>\u96d6\u7136\u4e0a\u5716\u7684\u8a13\u7df4\u90e8\u5206\u5074\u91cd Python API\uff0c\u4f46\u662f TensorFlow.js \u4e5f\u652f\u63f4\u8a13\u7df4\u6a21\u578b\u3002TensorFlow 2.0 \u5c0d\u5176\u4ed6\u8a9e\u8a00\u4e5f\u6709\u4e0d\u540c\u7a0b\u5ea6\u7684\u652f\u63f4\uff0c\u5305\u62ec Swift\u3001R \u8a9e\u8a00\u548cJulia\u3002<\/p>\n\n\n\n<p><strong>\u8f15\u9b06\u69cb\u5efa\u6a21\u578b<\/strong><\/p>\n\n\n\n<p>TensorFlow \u5718\u968a\u8fd1\u671f\u5ba3\u4f48 Keras API \u5c07\u6210\u70ba TensorFlow \u4e2d\u69cb\u5efa\u548c\u8a13\u7df4\u6a21\u578b\u7684\u6838\u5fc3\u9ad8\u968e API\u3002Keras API \u4f7f\u5f97\u4f7f\u7528 TensorFlow \u958b\u555f\u5c08\u6848\u8b8a\u5f97\u7c21\u55ae\u3002\u91cd\u8981\u7684\u662f\uff0cKeras \u63d0\u4f9b\u591a\u500b\u6a21\u578b\u69cb\u5efa API\uff08Sequential\u3001Functional \u548c Subclassing\uff09\uff0c\u9019\u6a23\u4f60\u53ef\u4ee5\u9078\u64c7\u9069\u5408\u81ea\u5df1\u5c08\u6848\u7684\u62bd\u8c61\u7d1a\u5225\u3002TensorFlow \u7684\u5be6\u73fe\u6709\u591a\u9805\u589e\u5f37\uff0c\u5305\u62ec\u53ef\u76f4\u63a5\u758a\u4ee3\u548c\u76f4\u89c0\u9664\u932f\u7684 eager\nexecution\uff0c\u4ee5\u53ca\u7528\u65bc\u69cb\u5efa\u53ef\u64f4\u5145\u5957\u4ef6\u8f38\u5165\u6d41\u7a0b\u7684 tf.data\u3002<\/p>\n\n\n\n<p><strong>\u5728\u4efb\u610f\u5e73\u53f0\u4e0a\u5be6\u73fe\u7a69\u5065\u7684\u751f\u7522\u74b0\u5883\u6a21\u578b\u90e8\u7f72<\/strong><\/p>\n\n\n\n<p>TensorFlow \u7e3d\u662f\u6703\u63d0\u4f9b\u76f4\u63a5\u7684\u7522\u54c1\u5316\u8def\u5f91\u3002\u4e0d\u8ad6\u662f\u5728\u4f3a\u670d\u5668\u3001\u908a\u7de3\u88dd\u7f6e\u9084\u662f\u7db2\u9801\u4e0a\uff0c\u4e5f\u4e0d\u8ad6\u4f60\u4f7f\u7528\u7684\u662f\u4ec0\u9ebc\u8a9e\u8a00\u6216\u5e73\u81fa\uff0cTensorFlow \u7e3d\u80fd\u8b93\u4f60\u8f15\u6613\u8a13\u7df4\u548c\u90e8\u7f72\u6a21\u578b\u3002\u5728 TensorFlow 2.0 \u4e2d\uff0c\u6211\u5011\u6b63\u5728\u901a\u904e\u6a19\u6e96\u5316\u4ea4\u63db\u683c\u5f0f\u548c\u8abf\u6574 API \u4f86\u6539\u9032\u8de8\u5e73\u81fa\u548c\u5143\u4ef6\u7684\u76f8\u5bb9\u6027\u548c\u5947\u5076\u6027\uff08parity\uff09\u3002<\/p>\n\n\n\n<ul class=\"wp-block-list\"><li>TensorFlow Serving\uff1a\u5141\u8a31\u901a\u904e HTTP\/REST \u6216 gRPC \/\u5354\u8b70\u7de9\u885d\u5340\u70ba\u6a21\u578b\u63d0\u4f9b\u670d\u52d9\u7684 TensorFlow \u5eab\u3002<\/li><li>TensorFlow Lite\uff1aTensorFlow \u91dd\u5c0d\u79fb\u52d5\u548c\u5d4c\u5165\u5f0f\u88dd\u7f6e\u7684\u8f15\u91cf\u7d1a\u89e3\u6c7a\u65b9\u6848\u63d0\u4f9b\u4e86\u5728 Android\u3001iOS \u548c\u5d4c\u5165\u5f0f\u7cfb\u7d71\uff08\u5982 Raspberry Pi \u548c Edge TPU\uff09\u4e0a\u90e8\u7f72\u6a21\u578b\u7684\u80fd\u529b\u3002<\/li><li>TensorFlow.js\uff1a\u652f\u63f4\u5728 JavaScript \u74b0\u5883\u4e2d\u90e8\u7f72\u6a21\u578b\uff0c\u4f8b\u5982\u901a\u904e Node.js.\nTensorFlow.js \u5728 web \u700f\u89bd\u5668\u6216\u4f3a\u670d\u5668\u7aef\u90e8\u7f72\u6a21\u578b\uff0c\u9084\u652f\u63f4\u5728 JavaScript \u4e2d\u5b9a\u7fa9\u6a21\u578b\u548c\u5728 web \u700f\u89bd\u5668\u4e2d\u4f7f\u7528\u985e\u4f3c Keras \u7684 API \u76f4\u63a5\u8a13\u7df4\u6a21\u578b\u3002<\/li><li>TensorFlow \u9084\u652f\u63f4\u5176\u5b83\u8a9e\u8a00\uff08\u7531\u66f4\u5ee3\u6cdb\u7684\u793e\u7fa4\u7dad\u8b77\uff09\uff0c\u5305\u62ec\uff1aC\u3001Java\u3001Go\u3001C#\u3001Rust\u3001\u00a0<a rel=\"noreferrer noopener\" href=\"https:\/\/www.jishuwen.com\/jump\/aHR0cHM6Ly9tcC53ZWl4aW4ucXEuY29tL2NnaS1iaW4vYXBwbXNnP3Q9bWVkaWEvYXBwbXNnX2VkaXQmYWN0aW9uPWVkaXQmdHlwZT0xMCZhcHBtc2dpZD01MDMyNzE5NjAmdG9rZW49Mjk3NTY1OTgxJmxhbmc9emhfQ04=\" target=\"_blank\">Julia<\/a>\u00a0\u3001R \u7b49\u7b49\u3002<\/li><\/ul>\n\n\n\n<p><strong>\u70ba\u7814\u7a76\u63d0\u4f9b\u5f37\u5927\u7684\u5be6\u9a57\u5de5\u5177<\/strong><\/p>\n\n\n\n<p>TensorFlow \u4f7f\u5f97\u5f9e\u6982\u5ff5\u5230\u7a0b\u5f0f\u78bc\u548c\u5f9e\u6a21\u578b\u5230\u51fa\u7248\u7269\u4e2d\u7372\u53d6\u65b0\u60f3\u6cd5\u8b8a\u5f97\u66f4\u52a0\u5bb9\u6613\u3002TensorFlow\n2.0 \u7d50\u5408\u4e86\u5f88\u591a\u529f\u80fd\uff0c\u80fd\u5920\u5728\u4e0d\u72a7\u7272\u901f\u5ea6\u6216\u6548\u80fd\u7684\u60c5\u6cc1\u4e0b\u5b9a\u7fa9\u548c\u8a13\u7df4\u6700\u5148\u9032\u7684\u6a21\u578b\uff1a<\/p>\n\n\n\n<p>-Keras Functional API \u548c Model Subclassing API\uff1a\u5141\u8a31\u5efa\u7acb\u8907\u96dc\u7684\u62d3\u64b2\uff0c\u5305\u62ec\u4f7f\u7528\u6b98\u5dee\u5c64\u3001\u81ea\u5b9a\u7fa9\u591a\u8f38\u5165\/\u8f38\u51fa\u6a21\u578b\u4ee5\u53ca\u5f37\u5236\u7de8\u5beb\u7684\u6b63\u5411\u50b3\u905e\u3002<\/p>\n\n\n\n<p>-\u81ea\u5b9a\u7fa9\u8a13\u7df4\u908f\u8f2f\uff1a\u7528 tf.GradientTape \u548c tf.custom_gradient \u5c0d\u68af\u5ea6\u8a08\u7b97\u9032\u884c\u7d30\u7c92\u5ea6\u63a7\u5236\u3002<\/p>\n\n\n\n<p>-\u70ba\u4e86\u7372\u5f97\u66f4\u5f37\u7684\u9748\u6d3b\u6027\u548c\u63a7\u5236\uff0c\u4f4e\u968e TensorFlow API \u59cb\u7d42\u53ef\u7528\uff0c\u4e26\u8207\u66f4\u9ad8\u7d1a\u5225\u7684\u62bd\u8c61\u4e00\u8d77\u5de5\u4f5c\uff0c\u4ee5\u5be6\u73fe\u5b8c\u5168\u53ef\u5b9a\u88fd\u7684\u908f\u8f2f\u3002<\/p>\n\n\n\n<p>TensorFlow 2.0 \u65b0\u6dfb\u4e86\u4e00\u4e9b\u9644\u52a0\u529f\u80fd\uff0c\u8b93\u7814\u7a76\u4eba\u54e1\u548c\u9ad8\u968e\u4f7f\u7528\u8005\u53ef\u4ee5\u4f7f\u7528\u8c50\u5bcc\u7684\u5916\u639b\u4f86\u9032\u884c\u5be6\u9a57\uff0c\u5982 Ragged Tensors\u3001TensorFlow Probability\u3001Tensor2Tensor \u7b49\u3002<\/p>\n\n\n\n<p>\u9664\u4e86\u9019\u4e9b\u529f\u80fd\u4e4b\u5916\uff0cTensorFlow \u9084\u63d0\u4f9b\u4e86\u6613\u65bc\u88fd\u4f5c\u539f\u578b\u548c\u9664\u932f\u7684 eager execution\uff0c\u53ef\u4ee5\u5927\u898f\u6a21\u8a13\u7df4\u7684 Distribution Strategy API \u548c AutoGraph\uff0c\u4ee5\u53ca\u5c0d TPU \u7684\u652f\u63f4\uff0c\u4f7f TensorFlow 2.0 \u6210\u70ba\u4e00\u500b\u6613\u65bc\u4f7f\u7528\u3001\u53ef\u5b9a\u88fd\u548c\u9ad8\u5ea6\u53ef\u64f4\u5145\u5957\u4ef6\u7684\u5e73\u81fa\uff0c\u7528\u65bc\u5c55\u958b\u6700\u5148\u9032\u7684 ML \u7814\u7a76\u4e26\u5c07\u8a72\u7814\u7a76\u8f49\u5316\u70ba\u751f\u7522\u7684\u6d41\u6c34\u7dda\u3002<\/p>\n\n\n\n<p><strong>\u00a0TensorFlow 1.x \u548c 2.0 \u7684\u5340\u5225<\/strong><\/p>\n\n\n\n<p>\u81ea\u6211\u5011\u958b\u6e90 TensorFlow \u4ee5\u4f86\uff0c\u5230\u73fe\u5728\u5df2\u7d93\u767c\u5c55\u51fa\u5f88\u591a\u500b\u7248\u672c\u548c API \u758a\u4ee3\u3002\u96a8\u8457 ML \u7684\u5feb\u901f\u767c\u5c55\uff0c\u9019\u500b\u5e73\u81fa\u4e5f\u6709\u4e86\u5de8\u5927\u7684\u9032\u5c55\uff0c\u73fe\u5728\u652f\u63f4\u5f88\u591a\u5177\u6709\u4e0d\u540c\u9700\u6c42\u7684\u4e0d\u540c\u4f7f\u7528\u8005\u3002\u6709\u4e86 TensorFlow 2.0\uff0c\u6211\u5011\u6709\u6a5f\u6703\u57fa\u65bc\u8a9e\u7fa9\u7248\u672c\u63a7\u5236\u4f86\u6e05\u7406\u548c\u6a21\u7d44\u5316\u5e73\u81fa\u3002<\/p>\n\n\n\n<p>\u6b64\u6b21\u7684\u91cd\u5927\u6539\u8b8a\u5305\u62ec\uff1a<\/p>\n\n\n\n<ul class=\"wp-block-list\"><li>\u522a\u9664 queue runner \u4ee5\u652f\u63f4 tf.data\u3002<\/li><li>\u522a\u9664\u5716\u5f62\u96c6\u5408\u3002<\/li><li>\u8b8a\u6578\u8655\u7406\u65b9\u5f0f\u7684\u8b8a\u5316\u3002<\/li><li>API \u7b26\u865f\u7684\u79fb\u52d5\u548c\u91cd\u65b0\u547d\u540d\u3002<\/li><\/ul>\n\n\n\n<p>\u6b64\u5916\uff0ctf.contrib \u5c07\u5f9e\u6838\u5fc3 TensorFlow \u5132\u5b58\u5eab\u548c\u69cb\u5efa\u904e\u7a0b\u4e2d\u79fb\u9664\u3002TensorFlow \u7684 contrib \u6a21\u7d44\u5df2\u7d93\u8d85\u51fa\u4e86\u55ae\u500b\u5132\u5b58\u5eab\u53ef\u4ee5\u7dad\u8b77\u548c\u652f\u63f4\u7684\u7bc4\u570d\u3002\u8f03\u5927\u7684\u5c08\u6848\u6700\u597d\u55ae\u7368\u7dad\u8b77\uff0c\u800c\u8f03\u5c0f\u7684\u64f4\u5145\u5957\u4ef6\u5c07\u9010\u6f38\u79fb\u81f3\u6838\u5fc3 TensorFlow \u7a0b\u5f0f\u78bc\u3002\u4e00\u500b\u7279\u5225\u8208\u8da3\u5c0f\u7d44\uff08SIG\uff09\u5df2\u7d93\u6210\u7acb\uff0c\u4ee5\u7dad\u6301\u548c\u9032\u4e00\u6b65\u767c\u5c55\u4e00\u4e9b\u66f4\u91cd\u8981\u7684\u672a\u4f86 contrib \u5c08\u6848\u3002<\/p>\n\n\n\n<p><strong>\u76f8\u5bb9\u6027\u548c\u6301\u7e8c\u6027<\/strong><\/p>\n\n\n\n<p>\u70ba\u4e86\u7c21\u5316\u5411 TensorFlow 2.0 \u7684\u904e\u6e21\uff0c\u5c07\u6703\u6709\u4e00\u500b\u8f49\u5316\u5de5\u5177\u4f86\u66f4\u65b0 TensorFlow 1.x Python \u7a0b\u5f0f\u78bc\uff0c\u4ee5\u4f7f\u7528 TensorFlow 2.0 \u76f8\u5bb9\u7684 API\uff0c\u6216\u6a19\u8a18\u7a0b\u5f0f\u78bc\u7121\u6cd5\u81ea\u52d5\u8f49\u63db\u7684\u60c5\u6cc1\u3002<\/p>\n\n\n\n<p>\u4e0d\u662f\u6240\u6709\u7684\u8b8a\u5316\u90fd\u53ef\u4ee5\u5b8c\u5168\u81ea\u52d5\u5316\u9032\u884c\u3002\u4f8b\u5982\uff0c\u4e00\u4e9b\u88ab\u68c4\u7528\u7684 API \u6c92\u6709\u76f4\u63a5\u7684\u7b49\u6548\u7269\u3002\u9019\u4e5f\u662f\u6211\u5011\u8981\u5f15\u5165 tensorflow.compat.v1 \u76f8\u5bb9\u6027\u6a21\u7d44\u7684\u539f\u56e0\uff0c\u8a72\u6a21\u7d44\u652f\u63f4\u5b8c\u6574\u7684 TensorFlow 1.x API\uff08\u5305\u62ec tf.contrib\uff09\u3002\u8a72\u6a21\u7d44\u5c07\u6703\u5728 TensorFlow 2.x \u7684\u6642\u9593\u7dda\u5167\u5f97\u5230\u7dad\u8b77\uff0c\u4e26\u5141\u8a31\u7528 TensorFlow 1.x \u7de8\u5beb\u7684\u7a0b\u5f0f\u78bc\u4fdd\u6301\u529f\u80fd\u3002<\/p>\n\n\n\n<p>\u6b64\u5916\uff0cSavedModels \u6216\u5132\u5b58\u7684 GraphDefs \u5c07\u5411\u5f8c\u76f8\u5bb9\u3002\u7528 TensorFlow 1.x \u5132\u5b58\u7684 SavedModels \u5c07\u7e7c\u7e8c\u5728 2.x \u4e2d\u8f09\u5165\u548c\u57f7\u884c\u3002\u7136\u800c\uff0c2.0 \u4e2d\u7684\u66f4\u6539\u610f\u5473\u8457\u539f\u59cb\u6aa2\u67e5\u9ede\u4e2d\u7684\u8b8a\u6578\u540d\u53ef\u80fd\u6703\u66f4\u6539\uff0c\u6240\u4ee5\u4f7f\u7528 2.0 \u4e4b\u524d\u7684\u6aa2\u67e5\u9ede\u800c\u7a0b\u5f0f\u78bc\u5df2\u8f49\u5316\u70ba 2.0 \u6642\uff0c\u53ef\u80fd\u7121\u6cd5\u4fdd\u8b49\u6709\u6548\u3002<\/p>\n\n\n\n<p><strong>TensorFlow 2.0 \u7684\u672a\u4f86<\/strong><\/p>\n\n\n\n<p>TensorFlow 2.0 \u65bc\u4eca\u5e74\u5e74\u521d\u767c\u5e03\u4e86\u9810\u89bd\u7248,\u73fe\u5728\u5df2\u7d93\u53ef\u4ee5\u4f7f\u7528 tf.keras \u3001eager execution\u3001\u6253\u5305\u6a21\u578b\u548c\u90e8\u7f72\u5eab\u4f86\u958b\u767c TensorFlow 2.0 \u4e86,\u96a8\u8457\u9806\u5f9e\u6c11\u610f\u3001\u4f7f\u7528\u4e0a\u66f4\u7c21\u55ae\u7684 TensorFlow 2.0 &nbsp;Alpha&nbsp;\u7248\uff0cTensorFlow \u53c8\u5c07\u7372\u5f97\u600e\u6a23\u7684\u6210\u7e3e\u5462\uff1f\u6703\u4e0d\u6703\u6210\u70ba\u6a5f\u5668\u5b78\u7fd2\u8ddf\u6df1\u5ea6\u5b78\u7fd2\u7684\u65b0\u5bf5\u5152, \u5927\u5bb6\u53ef\u4ee5\u62ed\u76ee\u4ee5\u5f85 ! <\/p>\n\n\n\n<p>\u90e8\u5206\u5167\u5bb9\u53ca\u5716\u7247\u5f15\u7528: https:\/\/blog.csdn.net\/iodjSVf8U1J7KYc\/article\/details\/86587096 <\/p>\n\n\n\n<p>\u64b0\u6587\u8005: TibaMe AI\u4eba\u5de5\u667a\u6167\u8ab2\u7a0b\u7e3d\u76e3 Ryan<\/p>\n\n\n\n<div id=\"ez-toc-container\" class=\"ez-toc-v2_0_85 counter-hierarchy ez-toc-counter ez-toc-grey ez-toc-container-direction\">\n<div class=\"ez-toc-title-container\">\n<p class=\"ez-toc-title\" style=\"cursor:inherit\">\u5167\u5bb9\u76ee\u9304<\/p>\n<span class=\"ez-toc-title-toggle\"><a href=\"#\" class=\"ez-toc-pull-right ez-toc-btn ez-toc-btn-xs ez-toc-btn-default ez-toc-toggle\" aria-label=\"\u986f\u793a\/\u96b1\u85cf\u5167\u5bb9\u76ee\u9304\"><span class=\"ez-toc-js-icon-con\"><span class=\"\"><span class=\"eztoc-hide\" style=\"display:none;\">Toggle<\/span><span class=\"ez-toc-icon-toggle-span\"><svg style=\"fill: #999;color:#999\" xmlns=\"http:\/\/www.w3.org\/2000\/svg\" class=\"list-377408\" width=\"20px\" height=\"20px\" viewBox=\"0 0 24 24\" fill=\"none\"><path d=\"M6 6H4v2h2V6zm14 0H8v2h12V6zM4 11h2v2H4v-2zm16 0H8v2h12v-2zM4 16h2v2H4v-2zm16 0H8v2h12v-2z\" fill=\"currentColor\"><\/path><\/svg><svg style=\"fill: #999;color:#999\" class=\"arrow-unsorted-368013\" xmlns=\"http:\/\/www.w3.org\/2000\/svg\" width=\"10px\" height=\"10px\" viewBox=\"0 0 24 24\" version=\"1.2\" baseProfile=\"tiny\"><path d=\"M18.2 9.3l-6.2-6.3-6.2 6.3c-.2.2-.3.4-.3.7s.1.5.3.7c.2.2.4.3.7.3h11c.3 0 .5-.1.7-.3.2-.2.3-.5.3-.7s-.1-.5-.3-.7zM5.8 14.7l6.2 6.3 6.2-6.3c.2-.2.3-.5.3-.7s-.1-.5-.3-.7c-.2-.2-.4-.3-.7-.3h-11c-.3 0-.5.1-.7.3-.2.2-.3.5-.3.7s.1.5.3.7z\"\/><\/svg><\/span><\/span><\/span><\/a><\/span><\/div>\n<nav><ul class='ez-toc-list ez-toc-list-level-1 ' ><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-1\" href=\"https:\/\/blog.tibame.com\/?p=14542\/#%E5%BB%B6%E4%BC%B8%E8%AA%B2%E7%A8%8B\" >\u5ef6\u4f38\u8ab2\u7a0b<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-2\" href=\"https:\/\/blog.tibame.com\/?p=14542\/#%E4%BA%BA%E5%B7%A5%E6%99%BA%E6%85%A7_%E2%80%93_%E6%A9%9F%E5%99%A8%E5%AD%B8%E7%BF%92%E8%88%87%E6%B7%B1%E5%BA%A6%E5%AD%B8%E7%BF%92\" >\u4eba\u5de5\u667a\u6167 &#8211; \u6a5f\u5668\u5b78\u7fd2\u8207\u6df1\u5ea6\u5b78\u7fd2<\/a><\/li><\/ul><\/nav><\/div>\n<h2 class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"%E5%BB%B6%E4%BC%B8%E8%AA%B2%E7%A8%8B\"><\/span>\u5ef6\u4f38\u8ab2\u7a0b<span class=\"ez-toc-section-end\"><\/span><\/h2>\n\n\n\n<figure class=\"wp-block-image\"><img decoding=\"async\" width=\"779\" height=\"434\" src=\"https:\/\/blog.wiedu.tw\/wp-content\/uploads\/2019\/10\/python_cover.png\" alt=\"\" class=\"wp-image-14553\" srcset=\"https:\/\/blog.tibame.com\/wp-content\/uploads\/2019\/10\/python_cover.png 779w, https:\/\/blog.tibame.com\/wp-content\/uploads\/2019\/10\/python_cover-300x167.png 300w, https:\/\/blog.tibame.com\/wp-content\/uploads\/2019\/10\/python_cover-768x428.png 768w\" sizes=\"(max-width: 779px) 100vw, 779px\" \/><\/figure>\n\n\n\n<h2 class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"%E4%BA%BA%E5%B7%A5%E6%99%BA%E6%85%A7_%E2%80%93_%E6%A9%9F%E5%99%A8%E5%AD%B8%E7%BF%92%E8%88%87%E6%B7%B1%E5%BA%A6%E5%AD%B8%E7%BF%92\"><\/span><a href=\"http:\/\/%20https\/\/www.tibame.com\/course\/348\"><strong>\u4eba\u5de5\u667a\u6167 &#8211; \u6a5f\u5668\u5b78\u7fd2\u8207\u6df1\u5ea6\u5b78\u7fd2<\/strong><\/a><span class=\"ez-toc-section-end\"><\/span><\/h2>\n\n\n\n<p><strong>1\u3001\u4e86\u89e3AI,\u4e86\u89e3AI<\/strong>,<strong>ML\u548cDL<\/strong><\/p>\n\n\n\n<p>&#x25aa; \u4e86\u89e3\u6a5f\u5668\u5b78\u7fd2\u7684\u539f\u7406<br \/>&#x25aa; \u4e86\u89e3\u6df1\u5ea6\u5b78\u7fd2\u7684\u539f\u7406\u548c\u6982\u5ff5 <\/p>\n\n\n\n<p><strong>2\u3001\u5b78\u6703Keras\u548cTensorFlow\u6df1\u5ea6\u5b78\u7fd2\u6a21\u578b<\/strong><\/p>\n\n\n\n<p>&#x25aa;&nbsp;\u5b78\u6703\u4f7f\u7528Keras\u548cTensorFlow<br \/>&#x25aa; \u5b78\u6703\u5efa\u7acb\u6df1\u5ea6\u5b78\u7fd2\u6a21\u578b<\/p>\n\n\n\n<p><strong>3\u3001\u64c1\u6709\u5be6\u969b\u5efa\u7acb\u6a5f\u5668\u5b78\u7fd2\u6a21\u578b\u7684\u80fd\u529b<\/strong><\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u5728\u4eba\u5de5\u667a\u6167\uff08AI\uff09\u7684\u6642\u4ee3\uff0cTensorFlow\u5df2&hellip;<\/p>\n","protected":false},"author":19,"featured_media":14560,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_lmt_disableupdate":"","_lmt_disable":"","footnotes":""},"categories":[480,1196,173],"tags":[],"class_list":["post-14542","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-technology","category-ai-","category-173"],"aioseo_notices":[],"aioseo_head":"\n\t\t<!-- All in One SEO 4.9.10 - aioseo.com -->\n\t<meta name=\"description\" content=\"TensorFlow\u5df2\u6210\u70ba\u6a5f\u5668\u5b78\u7fd2\u8ddf\u6df1\u5ea6\u5b78\u7fd2\u958b\u767c\u7684\u4e3b\u6d41\u7a0b\u5f0f\u5eab\uff0c\u5176\u529f\u80fd\u5f37\u5927\u3001\u904b\u7b97\u6548\u7387\u9ad8\u3001\u652f\u63f4\u591a\u500b\u5e73\u53f0\uff0c\u9020\u5c31\u4e86\u696d\u754c\u548c\u5b78\u8853\u754c\u7684\u5ee3\u6cdb\u4f7f\u7528\u3002\u5728TensorFlow 2.0\u5f15\u5165\u4e86Eager Execution\u52d5\u614b\u5716\u6a21\u5f0f\u3001Keras\u9ad8\u968eAPI\u548ctf.data\u7b49\u4e09\u500b\u529f\u80fd\uff0c\u8b93\u5b78\u7fd2\u9580\u6abb\u5927\u5e45\u964d\u4f4e\u3002\" \/>\n\t<meta name=\"robots\" content=\"max-image-preview:large\" \/>\n\t<meta name=\"author\" content=\"TibaMe\u5c0f\u7de8\"\/>\n\t<meta name=\"google-site-verification\" content=\"5qHOkz_aS80gbg22PS-fvrR8c3e_cOK04gCj7qo10RM\" \/>\n\t<meta name=\"keywords\" content=\"tensorflow,tensorflow2.0,\u79d1\u6280\u8da8\u52e2,ai \u4eba\u5de5\u667a\u6167,\u6240\u6709\u6587\u7ae0\" \/>\n\t<link rel=\"canonical\" href=\"https:\/\/blog.tibame.com\/?p=14542\" \/>\n\t<meta name=\"generator\" content=\"All in One SEO (AIOSEO) 4.9.10\" \/>\n\n\t\t<!-- Global site tag (gtag.js) - Google Analytics -->\n<script async src=\"https:\/\/www.googletagmanager.com\/gtag\/js?id=UA-53361606-4\"><\/script>\n<script>\n window.dataLayer = window.dataLayer || [];\n function gtag(){dataLayer.push(arguments);}\n gtag('js', new Date());\n\n gtag('config', 'UA-53361606-4');\n<\/script>\n\t\t<meta property=\"og:locale\" content=\"zh_TW\" \/>\n\t\t<meta property=\"og:site_name\" content=\"TibaMe\" \/>\n\t\t<meta property=\"og:type\" content=\"article\" \/>\n\t\t<meta property=\"og:title\" content=\"TensorFlow 2.0-\u6a5f\u5668\u5b78\u7fd2\u8ddf\u6df1\u5ea6\u5b78\u7fd2\u7684\u65b0\u5bf5\u5152 | \u7def\u80b2TibaMe Blog\" \/>\n\t\t<meta property=\"og:description\" content=\"TensorFlow\u5df2\u6210\u70ba\u6a5f\u5668\u5b78\u7fd2\u8ddf\u6df1\u5ea6\u5b78\u7fd2\u958b\u767c\u7684\u4e3b\u6d41\u7a0b\u5f0f\u5eab\uff0c\u5176\u529f\u80fd\u5f37\u5927\u3001\u904b\u7b97\u6548\u7387\u9ad8\u3001\u652f\u63f4\u591a\u500b\u5e73\u53f0\uff0c\u9020\u5c31\u4e86\u696d\u754c\u548c\u5b78\u8853\u754c\u7684\u5ee3\u6cdb\u4f7f\u7528\u3002\u5728TensorFlow 2.0\u5f15\u5165\u4e86Eager Execution\u52d5\u614b\u5716\u6a21\u5f0f\u3001Keras\u9ad8\u968eAPI\u548ctf.data\u7b49\u4e09\u500b\u529f\u80fd\uff0c\u8b93\u5b78\u7fd2\u9580\u6abb\u5927\u5e45\u964d\u4f4e\u3002\" \/>\n\t\t<meta property=\"og:url\" content=\"https:\/\/blog.tibame.com\/?p=14542\" \/>\n\t\t<meta property=\"og:image\" content=\"https:\/\/blog.tibame.com\/wp-content\/uploads\/2019\/10\/is-a-Member-of-the-Orchard-Country-Club-and-is-entitled-to-all-rights-and-prvileges-appertaining-thereto.-5.png\" \/>\n\t\t<meta property=\"og:image:secure_url\" content=\"https:\/\/blog.tibame.com\/wp-content\/uploads\/2019\/10\/is-a-Member-of-the-Orchard-Country-Club-and-is-entitled-to-all-rights-and-prvileges-appertaining-thereto.-5.png\" \/>\n\t\t<meta property=\"og:image:width\" content=\"1200\" \/>\n\t\t<meta property=\"og:image:height\" content=\"675\" \/>\n\t\t<meta property=\"article:published_time\" content=\"2019-10-17T06:10:38+00:00\" \/>\n\t\t<meta property=\"article:modified_time\" content=\"2022-06-08T03:51:31+00:00\" \/>\n\t\t<meta name=\"twitter:card\" content=\"summary\" \/>\n\t\t<meta name=\"twitter:title\" content=\"TensorFlow 2.0-\u6a5f\u5668\u5b78\u7fd2\u8ddf\u6df1\u5ea6\u5b78\u7fd2\u7684\u65b0\u5bf5\u5152 | \u7def\u80b2TibaMe Blog\" \/>\n\t\t<meta name=\"twitter:description\" content=\"TensorFlow\u5df2\u6210\u70ba\u6a5f\u5668\u5b78\u7fd2\u8ddf\u6df1\u5ea6\u5b78\u7fd2\u958b\u767c\u7684\u4e3b\u6d41\u7a0b\u5f0f\u5eab\uff0c\u5176\u529f\u80fd\u5f37\u5927\u3001\u904b\u7b97\u6548\u7387\u9ad8\u3001\u652f\u63f4\u591a\u500b\u5e73\u53f0\uff0c\u9020\u5c31\u4e86\u696d\u754c\u548c\u5b78\u8853\u754c\u7684\u5ee3\u6cdb\u4f7f\u7528\u3002\u5728TensorFlow 2.0\u5f15\u5165\u4e86Eager Execution\u52d5\u614b\u5716\u6a21\u5f0f\u3001Keras\u9ad8\u968eAPI\u548ctf.data\u7b49\u4e09\u500b\u529f\u80fd\uff0c\u8b93\u5b78\u7fd2\u9580\u6abb\u5927\u5e45\u964d\u4f4e\u3002\" \/>\n\t\t<meta name=\"twitter:image\" content=\"https:\/\/blog.tibame.com\/wp-content\/uploads\/2019\/10\/is-a-Member-of-the-Orchard-Country-Club-and-is-entitled-to-all-rights-and-prvileges-appertaining-thereto.-5.png\" \/>\n\t\t<script type=\"application\/ld+json\" class=\"aioseo-schema\">\n\t\t\t{\"@context\":\"https:\\\/\\\/schema.org\",\"@graph\":[{\"@type\":\"BlogPosting\",\"@id\":\"https:\\\/\\\/blog.tibame.com\\\/?p=14542#blogposting\",\"name\":\"TensorFlow 2.0-\\u6a5f\\u5668\\u5b78\\u7fd2\\u8ddf\\u6df1\\u5ea6\\u5b78\\u7fd2\\u7684\\u65b0\\u5bf5\\u5152 | \\u7def\\u80b2TibaMe Blog\",\"headline\":\"TensorFlow 2.0-\\u6a5f\\u5668\\u5b78\\u7fd2\\u8ddf\\u6df1\\u5ea6\\u5b78\\u7fd2\\u7684\\u65b0\\u5bf5\\u5152\",\"author\":{\"@id\":\"https:\\\/\\\/blog.tibame.com\\\/?author=19#author\"},\"publisher\":{\"@id\":\"https:\\\/\\\/blog.tibame.com\\\/#organization\"},\"image\":{\"@type\":\"ImageObject\",\"url\":\"https:\\\/\\\/blog.tibame.com\\\/wp-content\\\/uploads\\\/2019\\\/10\\\/is-a-Member-of-the-Orchard-Country-Club-and-is-entitled-to-all-rights-and-prvileges-appertaining-thereto.-5.png\",\"width\":1200,\"height\":675},\"datePublished\":\"2019-10-17T14:10:38+08:00\",\"dateModified\":\"2022-06-08T11:51:31+08:00\",\"inLanguage\":\"zh-TW\",\"mainEntityOfPage\":{\"@id\":\"https:\\\/\\\/blog.tibame.com\\\/?p=14542#webpage\"},\"isPartOf\":{\"@id\":\"https:\\\/\\\/blog.tibame.com\\\/?p=14542#webpage\"},\"articleSection\":\"\\u79d1\\u6280\\u8da8\\u52e2, AI \\u4eba\\u5de5\\u667a\\u6167, \\u6240\\u6709\\u6587\\u7ae0\"},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\\\/\\\/blog.tibame.com\\\/?p=14542#breadcrumblist\",\"itemListElement\":[{\"@type\":\"ListItem\",\"@id\":\"https:\\\/\\\/blog.tibame.com#listItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\\\/\\\/blog.tibame.com\",\"nextItem\":{\"@type\":\"ListItem\",\"@id\":\"https:\\\/\\\/blog.tibame.com\\\/?cat=480#listItem\",\"name\":\"\\u79d1\\u6280\\u8da8\\u52e2\"}},{\"@type\":\"ListItem\",\"@id\":\"https:\\\/\\\/blog.tibame.com\\\/?cat=480#listItem\",\"position\":2,\"name\":\"\\u79d1\\u6280\\u8da8\\u52e2\",\"item\":\"https:\\\/\\\/blog.tibame.com\\\/?cat=480\",\"nextItem\":{\"@type\":\"ListItem\",\"@id\":\"https:\\\/\\\/blog.tibame.com\\\/?cat=1196#listItem\",\"name\":\"AI \\u4eba\\u5de5\\u667a\\u6167\"},\"previousItem\":{\"@type\":\"ListItem\",\"@id\":\"https:\\\/\\\/blog.tibame.com#listItem\",\"name\":\"Home\"}},{\"@type\":\"ListItem\",\"@id\":\"https:\\\/\\\/blog.tibame.com\\\/?cat=1196#listItem\",\"position\":3,\"name\":\"AI \\u4eba\\u5de5\\u667a\\u6167\",\"item\":\"https:\\\/\\\/blog.tibame.com\\\/?cat=1196\",\"nextItem\":{\"@type\":\"ListItem\",\"@id\":\"https:\\\/\\\/blog.tibame.com\\\/?p=14542#listItem\",\"name\":\"TensorFlow 2.0-\\u6a5f\\u5668\\u5b78\\u7fd2\\u8ddf\\u6df1\\u5ea6\\u5b78\\u7fd2\\u7684\\u65b0\\u5bf5\\u5152\"},\"previousItem\":{\"@type\":\"ListItem\",\"@id\":\"https:\\\/\\\/blog.tibame.com\\\/?cat=480#listItem\",\"name\":\"\\u79d1\\u6280\\u8da8\\u52e2\"}},{\"@type\":\"ListItem\",\"@id\":\"https:\\\/\\\/blog.tibame.com\\\/?p=14542#listItem\",\"position\":4,\"name\":\"TensorFlow 2.0-\\u6a5f\\u5668\\u5b78\\u7fd2\\u8ddf\\u6df1\\u5ea6\\u5b78\\u7fd2\\u7684\\u65b0\\u5bf5\\u5152\",\"previousItem\":{\"@type\":\"ListItem\",\"@id\":\"https:\\\/\\\/blog.tibame.com\\\/?cat=1196#listItem\",\"name\":\"AI \\u4eba\\u5de5\\u667a\\u6167\"}}]},{\"@type\":\"Organization\",\"@id\":\"https:\\\/\\\/blog.tibame.com\\\/#organization\",\"name\":\"\\u7def\\u80b2TibaMe Blog\",\"description\":\"\\u63d0\\u62d4\\u6211\\u7684\\u5b78\\u7fd2\\u529b\",\"url\":\"https:\\\/\\\/blog.tibame.com\\\/\",\"logo\":{\"@type\":\"ImageObject\",\"url\":\"https:\\\/\\\/blog.wiedu.tw\\\/wp-content\\\/uploads\\\/2019\\\/08\\\/tibame.jpg\",\"@id\":\"https:\\\/\\\/blog.tibame.com\\\/?p=14542\\\/#organizationLogo\"},\"image\":{\"@id\":\"https:\\\/\\\/blog.tibame.com\\\/?p=14542\\\/#organizationLogo\"}},{\"@type\":\"Person\",\"@id\":\"https:\\\/\\\/blog.tibame.com\\\/?author=19#author\",\"url\":\"https:\\\/\\\/blog.tibame.com\\\/?author=19\",\"name\":\"TibaMe\\u5c0f\\u7de8\",\"image\":{\"@type\":\"ImageObject\",\"@id\":\"https:\\\/\\\/blog.tibame.com\\\/?p=14542#authorImage\",\"url\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/acb4eaa72ec159908aa64f92bd2a7755b0a4a15ac59354446f2e3608f59b55d6?s=96&d=retro&r=g\",\"width\":96,\"height\":96,\"caption\":\"TibaMe\\u5c0f\\u7de8\"}},{\"@type\":\"WebPage\",\"@id\":\"https:\\\/\\\/blog.tibame.com\\\/?p=14542#webpage\",\"url\":\"https:\\\/\\\/blog.tibame.com\\\/?p=14542\",\"name\":\"TensorFlow 2.0-\\u6a5f\\u5668\\u5b78\\u7fd2\\u8ddf\\u6df1\\u5ea6\\u5b78\\u7fd2\\u7684\\u65b0\\u5bf5\\u5152 | \\u7def\\u80b2TibaMe Blog\",\"description\":\"TensorFlow\\u5df2\\u6210\\u70ba\\u6a5f\\u5668\\u5b78\\u7fd2\\u8ddf\\u6df1\\u5ea6\\u5b78\\u7fd2\\u958b\\u767c\\u7684\\u4e3b\\u6d41\\u7a0b\\u5f0f\\u5eab\\uff0c\\u5176\\u529f\\u80fd\\u5f37\\u5927\\u3001\\u904b\\u7b97\\u6548\\u7387\\u9ad8\\u3001\\u652f\\u63f4\\u591a\\u500b\\u5e73\\u53f0\\uff0c\\u9020\\u5c31\\u4e86\\u696d\\u754c\\u548c\\u5b78\\u8853\\u754c\\u7684\\u5ee3\\u6cdb\\u4f7f\\u7528\\u3002\\u5728TensorFlow 2.0\\u5f15\\u5165\\u4e86Eager Execution\\u52d5\\u614b\\u5716\\u6a21\\u5f0f\\u3001Keras\\u9ad8\\u968eAPI\\u548ctf.data\\u7b49\\u4e09\\u500b\\u529f\\u80fd\\uff0c\\u8b93\\u5b78\\u7fd2\\u9580\\u6abb\\u5927\\u5e45\\u964d\\u4f4e\\u3002\",\"inLanguage\":\"zh-TW\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/blog.tibame.com\\\/#website\"},\"breadcrumb\":{\"@id\":\"https:\\\/\\\/blog.tibame.com\\\/?p=14542#breadcrumblist\"},\"author\":{\"@id\":\"https:\\\/\\\/blog.tibame.com\\\/?author=19#author\"},\"creator\":{\"@id\":\"https:\\\/\\\/blog.tibame.com\\\/?author=19#author\"},\"image\":{\"@type\":\"ImageObject\",\"url\":\"https:\\\/\\\/blog.tibame.com\\\/wp-content\\\/uploads\\\/2019\\\/10\\\/is-a-Member-of-the-Orchard-Country-Club-and-is-entitled-to-all-rights-and-prvileges-appertaining-thereto.-5.png\",\"@id\":\"https:\\\/\\\/blog.tibame.com\\\/?p=14542\\\/#mainImage\",\"width\":1200,\"height\":675},\"primaryImageOfPage\":{\"@id\":\"https:\\\/\\\/blog.tibame.com\\\/?p=14542#mainImage\"},\"datePublished\":\"2019-10-17T14:10:38+08:00\",\"dateModified\":\"2022-06-08T11:51:31+08:00\"},{\"@type\":\"WebSite\",\"@id\":\"https:\\\/\\\/blog.tibame.com\\\/#website\",\"url\":\"https:\\\/\\\/blog.tibame.com\\\/\",\"name\":\"\\u7def\\u80b2TibaMe Blog\",\"description\":\"\\u63d0\\u62d4\\u6211\\u7684\\u5b78\\u7fd2\\u529b\",\"inLanguage\":\"zh-TW\",\"publisher\":{\"@id\":\"https:\\\/\\\/blog.tibame.com\\\/#organization\"}}]}\n\t\t<\/script>\n\t\t<!-- All in One SEO -->\n\n","aioseo_head_json":{"title":"TensorFlow 2.0-\u6a5f\u5668\u5b78\u7fd2\u8ddf\u6df1\u5ea6\u5b78\u7fd2\u7684\u65b0\u5bf5\u5152 | \u7def\u80b2TibaMe Blog","description":"TensorFlow\u5df2\u6210\u70ba\u6a5f\u5668\u5b78\u7fd2\u8ddf\u6df1\u5ea6\u5b78\u7fd2\u958b\u767c\u7684\u4e3b\u6d41\u7a0b\u5f0f\u5eab\uff0c\u5176\u529f\u80fd\u5f37\u5927\u3001\u904b\u7b97\u6548\u7387\u9ad8\u3001\u652f\u63f4\u591a\u500b\u5e73\u53f0\uff0c\u9020\u5c31\u4e86\u696d\u754c\u548c\u5b78\u8853\u754c\u7684\u5ee3\u6cdb\u4f7f\u7528\u3002\u5728TensorFlow 2.0\u5f15\u5165\u4e86Eager Execution\u52d5\u614b\u5716\u6a21\u5f0f\u3001Keras\u9ad8\u968eAPI\u548ctf.data\u7b49\u4e09\u500b\u529f\u80fd\uff0c\u8b93\u5b78\u7fd2\u9580\u6abb\u5927\u5e45\u964d\u4f4e\u3002","canonical_url":"https:\/\/blog.tibame.com\/?p=14542","robots":"max-image-preview:large","keywords":"tensorflow,tensorflow2.0,\u79d1\u6280\u8da8\u52e2,ai \u4eba\u5de5\u667a\u6167,\u6240\u6709\u6587\u7ae0","webmasterTools":{"google-site-verification":"5qHOkz_aS80gbg22PS-fvrR8c3e_cOK04gCj7qo10RM","miscellaneous":"&lt;!-- Global site tag (gtag.js) - Google Analytics --&gt;\n&lt;script async src=\"https:\/\/www.googletagmanager.com\/gtag\/js?id=UA-53361606-4\"&gt;&lt;\/script&gt;\n&lt;script&gt;\n&nbsp;window.dataLayer = window.dataLayer || [];\n&nbsp;function gtag(){dataLayer.push(arguments);}\n&nbsp;gtag('js', new Date());\n\n&nbsp;gtag('config', 'UA-53361606-4');\n&lt;\/script&gt;"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"BlogPosting","@id":"https:\/\/blog.tibame.com\/?p=14542#blogposting","name":"TensorFlow 2.0-\u6a5f\u5668\u5b78\u7fd2\u8ddf\u6df1\u5ea6\u5b78\u7fd2\u7684\u65b0\u5bf5\u5152 | \u7def\u80b2TibaMe Blog","headline":"TensorFlow 2.0-\u6a5f\u5668\u5b78\u7fd2\u8ddf\u6df1\u5ea6\u5b78\u7fd2\u7684\u65b0\u5bf5\u5152","author":{"@id":"https:\/\/blog.tibame.com\/?author=19#author"},"publisher":{"@id":"https:\/\/blog.tibame.com\/#organization"},"image":{"@type":"ImageObject","url":"https:\/\/blog.tibame.com\/wp-content\/uploads\/2019\/10\/is-a-Member-of-the-Orchard-Country-Club-and-is-entitled-to-all-rights-and-prvileges-appertaining-thereto.-5.png","width":1200,"height":675},"datePublished":"2019-10-17T14:10:38+08:00","dateModified":"2022-06-08T11:51:31+08:00","inLanguage":"zh-TW","mainEntityOfPage":{"@id":"https:\/\/blog.tibame.com\/?p=14542#webpage"},"isPartOf":{"@id":"https:\/\/blog.tibame.com\/?p=14542#webpage"},"articleSection":"\u79d1\u6280\u8da8\u52e2, AI \u4eba\u5de5\u667a\u6167, \u6240\u6709\u6587\u7ae0"},{"@type":"BreadcrumbList","@id":"https:\/\/blog.tibame.com\/?p=14542#breadcrumblist","itemListElement":[{"@type":"ListItem","@id":"https:\/\/blog.tibame.com#listItem","position":1,"name":"Home","item":"https:\/\/blog.tibame.com","nextItem":{"@type":"ListItem","@id":"https:\/\/blog.tibame.com\/?cat=480#listItem","name":"\u79d1\u6280\u8da8\u52e2"}},{"@type":"ListItem","@id":"https:\/\/blog.tibame.com\/?cat=480#listItem","position":2,"name":"\u79d1\u6280\u8da8\u52e2","item":"https:\/\/blog.tibame.com\/?cat=480","nextItem":{"@type":"ListItem","@id":"https:\/\/blog.tibame.com\/?cat=1196#listItem","name":"AI \u4eba\u5de5\u667a\u6167"},"previousItem":{"@type":"ListItem","@id":"https:\/\/blog.tibame.com#listItem","name":"Home"}},{"@type":"ListItem","@id":"https:\/\/blog.tibame.com\/?cat=1196#listItem","position":3,"name":"AI \u4eba\u5de5\u667a\u6167","item":"https:\/\/blog.tibame.com\/?cat=1196","nextItem":{"@type":"ListItem","@id":"https:\/\/blog.tibame.com\/?p=14542#listItem","name":"TensorFlow 2.0-\u6a5f\u5668\u5b78\u7fd2\u8ddf\u6df1\u5ea6\u5b78\u7fd2\u7684\u65b0\u5bf5\u5152"},"previousItem":{"@type":"ListItem","@id":"https:\/\/blog.tibame.com\/?cat=480#listItem","name":"\u79d1\u6280\u8da8\u52e2"}},{"@type":"ListItem","@id":"https:\/\/blog.tibame.com\/?p=14542#listItem","position":4,"name":"TensorFlow 2.0-\u6a5f\u5668\u5b78\u7fd2\u8ddf\u6df1\u5ea6\u5b78\u7fd2\u7684\u65b0\u5bf5\u5152","previousItem":{"@type":"ListItem","@id":"https:\/\/blog.tibame.com\/?cat=1196#listItem","name":"AI \u4eba\u5de5\u667a\u6167"}}]},{"@type":"Organization","@id":"https:\/\/blog.tibame.com\/#organization","name":"\u7def\u80b2TibaMe Blog","description":"\u63d0\u62d4\u6211\u7684\u5b78\u7fd2\u529b","url":"https:\/\/blog.tibame.com\/","logo":{"@type":"ImageObject","url":"https:\/\/blog.wiedu.tw\/wp-content\/uploads\/2019\/08\/tibame.jpg","@id":"https:\/\/blog.tibame.com\/?p=14542\/#organizationLogo"},"image":{"@id":"https:\/\/blog.tibame.com\/?p=14542\/#organizationLogo"}},{"@type":"Person","@id":"https:\/\/blog.tibame.com\/?author=19#author","url":"https:\/\/blog.tibame.com\/?author=19","name":"TibaMe\u5c0f\u7de8","image":{"@type":"ImageObject","@id":"https:\/\/blog.tibame.com\/?p=14542#authorImage","url":"https:\/\/secure.gravatar.com\/avatar\/acb4eaa72ec159908aa64f92bd2a7755b0a4a15ac59354446f2e3608f59b55d6?s=96&d=retro&r=g","width":96,"height":96,"caption":"TibaMe\u5c0f\u7de8"}},{"@type":"WebPage","@id":"https:\/\/blog.tibame.com\/?p=14542#webpage","url":"https:\/\/blog.tibame.com\/?p=14542","name":"TensorFlow 2.0-\u6a5f\u5668\u5b78\u7fd2\u8ddf\u6df1\u5ea6\u5b78\u7fd2\u7684\u65b0\u5bf5\u5152 | \u7def\u80b2TibaMe Blog","description":"TensorFlow\u5df2\u6210\u70ba\u6a5f\u5668\u5b78\u7fd2\u8ddf\u6df1\u5ea6\u5b78\u7fd2\u958b\u767c\u7684\u4e3b\u6d41\u7a0b\u5f0f\u5eab\uff0c\u5176\u529f\u80fd\u5f37\u5927\u3001\u904b\u7b97\u6548\u7387\u9ad8\u3001\u652f\u63f4\u591a\u500b\u5e73\u53f0\uff0c\u9020\u5c31\u4e86\u696d\u754c\u548c\u5b78\u8853\u754c\u7684\u5ee3\u6cdb\u4f7f\u7528\u3002\u5728TensorFlow 2.0\u5f15\u5165\u4e86Eager Execution\u52d5\u614b\u5716\u6a21\u5f0f\u3001Keras\u9ad8\u968eAPI\u548ctf.data\u7b49\u4e09\u500b\u529f\u80fd\uff0c\u8b93\u5b78\u7fd2\u9580\u6abb\u5927\u5e45\u964d\u4f4e\u3002","inLanguage":"zh-TW","isPartOf":{"@id":"https:\/\/blog.tibame.com\/#website"},"breadcrumb":{"@id":"https:\/\/blog.tibame.com\/?p=14542#breadcrumblist"},"author":{"@id":"https:\/\/blog.tibame.com\/?author=19#author"},"creator":{"@id":"https:\/\/blog.tibame.com\/?author=19#author"},"image":{"@type":"ImageObject","url":"https:\/\/blog.tibame.com\/wp-content\/uploads\/2019\/10\/is-a-Member-of-the-Orchard-Country-Club-and-is-entitled-to-all-rights-and-prvileges-appertaining-thereto.-5.png","@id":"https:\/\/blog.tibame.com\/?p=14542\/#mainImage","width":1200,"height":675},"primaryImageOfPage":{"@id":"https:\/\/blog.tibame.com\/?p=14542#mainImage"},"datePublished":"2019-10-17T14:10:38+08:00","dateModified":"2022-06-08T11:51:31+08:00"},{"@type":"WebSite","@id":"https:\/\/blog.tibame.com\/#website","url":"https:\/\/blog.tibame.com\/","name":"\u7def\u80b2TibaMe Blog","description":"\u63d0\u62d4\u6211\u7684\u5b78\u7fd2\u529b","inLanguage":"zh-TW","publisher":{"@id":"https:\/\/blog.tibame.com\/#organization"}}]},"og:locale":"zh_TW","og:site_name":"TibaMe","og:type":"article","og:title":"TensorFlow 2.0-\u6a5f\u5668\u5b78\u7fd2\u8ddf\u6df1\u5ea6\u5b78\u7fd2\u7684\u65b0\u5bf5\u5152 | \u7def\u80b2TibaMe Blog","og:description":"TensorFlow\u5df2\u6210\u70ba\u6a5f\u5668\u5b78\u7fd2\u8ddf\u6df1\u5ea6\u5b78\u7fd2\u958b\u767c\u7684\u4e3b\u6d41\u7a0b\u5f0f\u5eab\uff0c\u5176\u529f\u80fd\u5f37\u5927\u3001\u904b\u7b97\u6548\u7387\u9ad8\u3001\u652f\u63f4\u591a\u500b\u5e73\u53f0\uff0c\u9020\u5c31\u4e86\u696d\u754c\u548c\u5b78\u8853\u754c\u7684\u5ee3\u6cdb\u4f7f\u7528\u3002\u5728TensorFlow 2.0\u5f15\u5165\u4e86Eager Execution\u52d5\u614b\u5716\u6a21\u5f0f\u3001Keras\u9ad8\u968eAPI\u548ctf.data\u7b49\u4e09\u500b\u529f\u80fd\uff0c\u8b93\u5b78\u7fd2\u9580\u6abb\u5927\u5e45\u964d\u4f4e\u3002","og:url":"https:\/\/blog.tibame.com\/?p=14542","og:image":"https:\/\/blog.tibame.com\/wp-content\/uploads\/2019\/10\/is-a-Member-of-the-Orchard-Country-Club-and-is-entitled-to-all-rights-and-prvileges-appertaining-thereto.-5.png","og:image:secure_url":"https:\/\/blog.tibame.com\/wp-content\/uploads\/2019\/10\/is-a-Member-of-the-Orchard-Country-Club-and-is-entitled-to-all-rights-and-prvileges-appertaining-thereto.-5.png","og:image:width":1200,"og:image:height":675,"article:published_time":"2019-10-17T06:10:38+00:00","article:modified_time":"2022-06-08T03:51:31+00:00","twitter:card":"summary","twitter:title":"TensorFlow 2.0-\u6a5f\u5668\u5b78\u7fd2\u8ddf\u6df1\u5ea6\u5b78\u7fd2\u7684\u65b0\u5bf5\u5152 | \u7def\u80b2TibaMe Blog","twitter:description":"TensorFlow\u5df2\u6210\u70ba\u6a5f\u5668\u5b78\u7fd2\u8ddf\u6df1\u5ea6\u5b78\u7fd2\u958b\u767c\u7684\u4e3b\u6d41\u7a0b\u5f0f\u5eab\uff0c\u5176\u529f\u80fd\u5f37\u5927\u3001\u904b\u7b97\u6548\u7387\u9ad8\u3001\u652f\u63f4\u591a\u500b\u5e73\u53f0\uff0c\u9020\u5c31\u4e86\u696d\u754c\u548c\u5b78\u8853\u754c\u7684\u5ee3\u6cdb\u4f7f\u7528\u3002\u5728TensorFlow 2.0\u5f15\u5165\u4e86Eager Execution\u52d5\u614b\u5716\u6a21\u5f0f\u3001Keras\u9ad8\u968eAPI\u548ctf.data\u7b49\u4e09\u500b\u529f\u80fd\uff0c\u8b93\u5b78\u7fd2\u9580\u6abb\u5927\u5e45\u964d\u4f4e\u3002","twitter:image":"https:\/\/blog.tibame.com\/wp-content\/uploads\/2019\/10\/is-a-Member-of-the-Orchard-Country-Club-and-is-entitled-to-all-rights-and-prvileges-appertaining-thereto.-5.png"},"aioseo_meta_data":{"post_id":"14542","title":"TensorFlow 2.0-\u6a5f\u5668\u5b78\u7fd2\u8ddf\u6df1\u5ea6\u5b78\u7fd2\u7684\u65b0\u5bf5\u5152 | #site_title","description":"TensorFlow\u5df2\u6210\u70ba\u6a5f\u5668\u5b78\u7fd2\u8ddf\u6df1\u5ea6\u5b78\u7fd2\u958b\u767c\u7684\u4e3b\u6d41\u7a0b\u5f0f\u5eab\uff0c\u5176\u529f\u80fd\u5f37\u5927\u3001\u904b\u7b97\u6548\u7387\u9ad8\u3001\u652f\u63f4\u591a\u500b\u5e73\u53f0\uff0c\u9020\u5c31\u4e86\u696d\u754c\u548c\u5b78\u8853\u754c\u7684\u5ee3\u6cdb\u4f7f\u7528\u3002\u5728TensorFlow 2.0\u5f15\u5165\u4e86Eager Execution\u52d5\u614b\u5716\u6a21\u5f0f\u3001Keras\u9ad8\u968eAPI\u548ctf.data\u7b49\u4e09\u500b\u529f\u80fd\uff0c\u8b93\u5b78\u7fd2\u9580\u6abb\u5927\u5e45\u964d\u4f4e\u3002","keywords":[{"label":"tensorflow","value":"tensorflow"},{"label":"tensorflow2.0","value":"tensorflow2.0"}],"keyphrases":null,"canonical_url":null,"og_title":null,"og_description":null,"og_object_type":"default","og_image_type":"default","og_image_custom_url":null,"og_image_custom_fields":null,"og_custom_image_width":null,"og_custom_image_height":null,"og_video":null,"og_custom_url":null,"og_article_section":null,"og_article_tags":null,"twitter_use_og":false,"twitter_card":"default","twitter_image_type":"default","twitter_image_custom_url":null,"twitter_image_custom_fields":null,"twitter_title":null,"twitter_description":null,"schema_type":null,"schema_type_options":null,"pillar_content":false,"robots_default":true,"robots_noindex":false,"robots_noarchive":false,"robots_nosnippet":false,"robots_nofollow":false,"robots_noimageindex":false,"robots_noodp":false,"robots_notranslate":false,"robots_max_snippet":null,"robots_max_videopreview":null,"robots_max_imagepreview":"large","tabs":null,"priority":null,"frequency":null,"location":null,"local_seo":null,"created":"2021-02-20 11:19:56","updated":"2026-05-15 01:21:00","primary_term":null,"og_image_url":null,"og_image_width":null,"og_image_height":null,"twitter_image_url":null,"schema":{"blockGraphs":[],"customGraphs":[],"default":{"data":{"Article":[],"Course":[],"Dataset":[],"FAQPage":[],"Movie":[],"Person":[],"Product":[],"ProductReview":[],"Car":[],"Recipe":[],"Service":[],"SoftwareApplication":[],"WebPage":[]},"graphName":"BlogPosting","isEnabled":true},"graphs":[]},"limit_modified_date":false,"ai":null,"breadcrumb_settings":null,"seo_analyzer_scan_date":null},"aioseo_breadcrumb":"<div class=\"aioseo-breadcrumbs\"><span class=\"aioseo-breadcrumb\">\n\t\t\t<a href=\"https:\/\/blog.tibame.com\" title=\"Home\">Home<\/a>\n\t\t<\/span><span class=\"aioseo-breadcrumb-separator\">&raquo;<\/span><span class=\"aioseo-breadcrumb\">\n\t\t\t<a href=\"https:\/\/blog.tibame.com\/?cat=480\" title=\"\u79d1\u6280\u8da8\u52e2\">\u79d1\u6280\u8da8\u52e2<\/a>\n\t\t<\/span><span class=\"aioseo-breadcrumb-separator\">&raquo;<\/span><span class=\"aioseo-breadcrumb\">\n\t\t\t<a href=\"https:\/\/blog.tibame.com\/?cat=1196\" title=\"AI \u4eba\u5de5\u667a\u6167\">AI \u4eba\u5de5\u667a\u6167<\/a>\n\t\t<\/span><span class=\"aioseo-breadcrumb-separator\">&raquo;<\/span><span class=\"aioseo-breadcrumb\">\n\t\t\tTensorFlow 2.0-\u6a5f\u5668\u5b78\u7fd2\u8ddf\u6df1\u5ea6\u5b78\u7fd2\u7684\u65b0\u5bf5\u5152\n\t\t<\/span><\/div>","aioseo_breadcrumb_json":[{"label":"Home","link":"https:\/\/blog.tibame.com"},{"label":"\u79d1\u6280\u8da8\u52e2","link":"https:\/\/blog.tibame.com\/?cat=480"},{"label":"AI \u4eba\u5de5\u667a\u6167","link":"https:\/\/blog.tibame.com\/?cat=1196"},{"label":"TensorFlow 2.0-\u6a5f\u5668\u5b78\u7fd2\u8ddf\u6df1\u5ea6\u5b78\u7fd2\u7684\u65b0\u5bf5\u5152","link":"https:\/\/blog.tibame.com\/?p=14542"}],"views":3082,"amp_enabled":true,"_links":{"self":[{"href":"https:\/\/blog.tibame.com\/index.php?rest_route=\/wp\/v2\/posts\/14542","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/blog.tibame.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/blog.tibame.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/blog.tibame.com\/index.php?rest_route=\/wp\/v2\/users\/19"}],"replies":[{"embeddable":true,"href":"https:\/\/blog.tibame.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=14542"}],"version-history":[{"count":2,"href":"https:\/\/blog.tibame.com\/index.php?rest_route=\/wp\/v2\/posts\/14542\/revisions"}],"predecessor-version":[{"id":14557,"href":"https:\/\/blog.tibame.com\/index.php?rest_route=\/wp\/v2\/posts\/14542\/revisions\/14557"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/blog.tibame.com\/index.php?rest_route=\/wp\/v2\/media\/14560"}],"wp:attachment":[{"href":"https:\/\/blog.tibame.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=14542"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/blog.tibame.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=14542"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/blog.tibame.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=14542"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}