{"id":1129407,"date":"2025-01-08T20:29:17","date_gmt":"2025-01-08T12:29:17","guid":{"rendered":"https:\/\/docs.pingcode.com\/ask\/ask-ask\/1129407.html"},"modified":"2025-01-08T20:29:21","modified_gmt":"2025-01-08T12:29:21","slug":"%e5%a6%82%e4%bd%95%e7%94%a8python%e6%90%ad%e5%bb%ba%e4%b8%80%e4%b8%aa%e7%a5%9e%e7%bb%8f%e7%bd%91%e7%bb%9c","status":"publish","type":"post","link":"https:\/\/docs.pingcode.com\/ask\/1129407.html","title":{"rendered":"\u5982\u4f55\u7528python\u642d\u5efa\u4e00\u4e2a\u795e\u7ecf\u7f51\u7edc"},"content":{"rendered":"<p style=\"text-align:center;\" ><img decoding=\"async\" src=\"https:\/\/cdn-kb.worktile.com\/kb\/wp-content\/uploads\/2024\/04\/25095827\/965a125b-905d-49e8-979f-209f72d49024.webp\" alt=\"\u5982\u4f55\u7528python\u642d\u5efa\u4e00\u4e2a\u795e\u7ecf\u7f51\u7edc\" \/><\/p>\n<p><p> <strong>\u5982\u4f55\u7528Python\u642d\u5efa\u4e00\u4e2a\u795e\u7ecf\u7f51\u7edc<\/strong><\/p>\n<\/p>\n<p><p>\u4f7f\u7528Python\u642d\u5efa\u4e00\u4e2a\u795e\u7ecf\u7f51\u7edc\uff0c\u53ef\u4ee5\u901a\u8fc7\u591a\u4e2a\u6b65\u9aa4\u5b8c\u6210\uff1a<strong>\u9009\u62e9\u5408\u9002\u7684\u5e93\u3001\u8bbe\u8ba1\u795e\u7ecf\u7f51\u7edc\u7684\u67b6\u6784\u3001\u6570\u636e\u9884\u5904\u7406\u3001\u8bad\u7ec3\u6a21\u578b\u3001\u8bc4\u4f30\u6a21\u578b<\/strong>\u3002\u5728\u672c\u6587\u4e2d\uff0c\u6211\u5c06\u8be6\u7ec6\u89e3\u91ca\u6bcf\u4e2a\u6b65\u9aa4\uff0c\u5e76\u91cd\u70b9\u4ecb\u7ecd\u5982\u4f55\u9009\u62e9\u5408\u9002\u7684\u5e93\u3002<\/p>\n<\/p>\n<p><h3>\u4e00\u3001\u9009\u62e9\u5408\u9002\u7684\u5e93<\/h3>\n<\/p>\n<p><p>Python\u6709\u8bb8\u591a\u5e93\u53ef\u4ee5\u7528\u4e8e\u6784\u5efa\u795e\u7ecf\u7f51\u7edc\uff0c\u5176\u4e2d\u6700\u6d41\u884c\u7684\u5305\u62ecTensorFlow\u3001Keras\u3001PyTorch\u3001Theano\u7b49\u3002\u8fd9\u4e9b\u5e93\u5404\u6709\u4f18\u7f3a\u70b9\uff0c\u9009\u62e9\u9002\u5408\u7684\u5e93\u662f\u642d\u5efa\u795e\u7ecf\u7f51\u7edc\u7684\u7b2c\u4e00\u6b65\u3002<\/p>\n<\/p>\n<p><h4>1.1 TensorFlow<\/h4>\n<\/p>\n<p><p>TensorFlow\u662f\u7531Google\u5f00\u53d1\u7684\u5f00\u6e90\u5e93\uff0c\u5177\u6709\u9ad8\u5ea6\u7684\u7075\u6d3b\u6027\u548c\u6269\u5c55\u6027\u3002\u5b83\u652f\u6301\u5206\u5e03\u5f0f\u8ba1\u7b97\uff0c\u53ef\u4ee5\u5728\u591a\u4e2aCPU\u548cGPU\u4e0a\u8fd0\u884c\u3002TensorFlow\u7684\u4e3b\u8981\u4f18\u52bf\u662f\u5176\u5f3a\u5927\u7684\u793e\u533a\u652f\u6301\u548c\u4e30\u5bcc\u7684\u8d44\u6e90\u6587\u6863\u3002<\/p>\n<\/p>\n<p><h4>1.2 Keras<\/h4>\n<\/p>\n<p><p>Keras\u662f\u4e00\u4e2a\u9ad8\u7ea7\u795e\u7ecf\u7f51\u7edcAPI\uff0c\u6784\u5efa\u5728TensorFlow\u3001Theano\u548cCNTK\u4e4b\u4e0a\u3002\u5b83\u65e8\u5728\u7b80\u5316\u795e\u7ecf\u7f51\u7edc\u7684\u6784\u5efa\u8fc7\u7a0b\uff0c\u7279\u522b\u9002\u5408\u521d\u5b66\u8005\u3002Keras\u7684API\u8bbe\u8ba1\u975e\u5e38\u76f4\u89c2\uff0c\u6613\u4e8e\u5feb\u901f\u539f\u578b\u8bbe\u8ba1\u3002<\/p>\n<\/p>\n<p><h4>1.3 PyTorch<\/h4>\n<\/p>\n<p><p>PyTorch\u662f\u7531Facebook\u5f00\u53d1\u7684\u6df1\u5ea6\u5b66\u4e60\u5e93\uff0c\u4ee5\u5176\u52a8\u6001\u8ba1\u7b97\u56fe\u548c\u6613\u4e8e\u8c03\u8bd5\u7684\u7279\u6027\u800c\u95fb\u540d\u3002PyTorch\u5bf9\u4e8e\u7814\u7a76\u4eba\u5458\u548c\u5f00\u53d1\u8005\u6765\u8bf4\u975e\u5e38\u53cb\u597d\uff0c\u56e0\u4e3a\u5b83\u652f\u6301\u7075\u6d3b\u7684\u6a21\u578b\u5b9a\u4e49\u548c\u8c03\u6574\u3002<\/p>\n<\/p>\n<p><h3>\u4e8c\u3001\u8bbe\u8ba1\u795e\u7ecf\u7f51\u7edc\u7684\u67b6\u6784<\/h3>\n<\/p>\n<p><h4>2.1 \u8f93\u5165\u5c42<\/h4>\n<\/p>\n<p><p>\u8f93\u5165\u5c42\u662f\u795e\u7ecf\u7f51\u7edc\u7684\u7b2c\u4e00\u4e2a\u5c42\uff0c\u7528\u4e8e\u63a5\u6536\u539f\u59cb\u6570\u636e\u3002\u8f93\u5165\u5c42\u7684\u795e\u7ecf\u5143\u6570\u91cf\u901a\u5e38\u4e0e\u8f93\u5165\u6570\u636e\u7684\u7279\u5f81\u6570\u91cf\u76f8\u540c\u3002<\/p>\n<\/p>\n<p><h4>2.2 \u9690\u85cf\u5c42<\/h4>\n<\/p>\n<p><p>\u9690\u85cf\u5c42\u662f\u795e\u7ecf\u7f51\u7edc\u7684\u4e2d\u95f4\u5c42\uff0c\u7528\u4e8e\u63d0\u53d6\u6570\u636e\u7279\u5f81\u3002\u9690\u85cf\u5c42\u7684\u6570\u91cf\u548c\u6bcf\u4e2a\u9690\u85cf\u5c42\u7684\u795e\u7ecf\u5143\u6570\u91cf\u53ef\u4ee5\u6839\u636e\u5177\u4f53\u95ee\u9898\u8fdb\u884c\u8c03\u6574\u3002\u5e38\u89c1\u7684\u6fc0\u6d3b\u51fd\u6570\u5305\u62ecReLU\u3001Sigmoid\u548cTanh\u3002<\/p>\n<\/p>\n<p><h4>2.3 \u8f93\u51fa\u5c42<\/h4>\n<\/p>\n<p><p>\u8f93\u51fa\u5c42\u662f\u795e\u7ecf\u7f51\u7edc\u7684\u6700\u540e\u4e00\u5c42\uff0c\u7528\u4e8e\u751f\u6210\u6700\u7ec8\u9884\u6d4b\u7ed3\u679c\u3002\u8f93\u51fa\u5c42\u7684\u795e\u7ecf\u5143\u6570\u91cf\u53d6\u51b3\u4e8e\u4efb\u52a1\u7684\u7c7b\u578b\uff0c\u4f8b\u5982\u56de\u5f52\u4efb\u52a1\u901a\u5e38\u6709\u4e00\u4e2a\u795e\u7ecf\u5143\uff0c\u800c\u5206\u7c7b\u4efb\u52a1\u7684\u795e\u7ecf\u5143\u6570\u91cf\u7b49\u4e8e\u7c7b\u522b\u6570\u91cf\u3002<\/p>\n<\/p>\n<p><h3>\u4e09\u3001\u6570\u636e\u9884\u5904\u7406<\/h3>\n<\/p>\n<p><h4>3.1 \u6570\u636e\u6e05\u6d17<\/h4>\n<\/p>\n<p><p>\u6570\u636e\u6e05\u6d17\u662f\u6570\u636e\u9884\u5904\u7406\u7684\u7b2c\u4e00\u6b65\uff0c\u76ee\u7684\u662f\u53bb\u9664\u6570\u636e\u4e2d\u7684\u566a\u58f0\u548c\u5f02\u5e38\u503c\u3002\u5e38\u89c1\u7684\u6570\u636e\u6e05\u6d17\u65b9\u6cd5\u5305\u62ec\u7f3a\u5931\u503c\u586b\u8865\u3001\u91cd\u590d\u503c\u5220\u9664\u548c\u5f02\u5e38\u503c\u5904\u7406\u3002<\/p>\n<\/p>\n<p><h4>3.2 \u6570\u636e\u6807\u51c6\u5316<\/h4>\n<\/p>\n<p><p>\u6570\u636e\u6807\u51c6\u5316\u662f\u5c06\u6570\u636e\u7f29\u653e\u5230\u4e00\u4e2a\u7279\u5b9a\u8303\u56f4\u5185\uff0c\u901a\u5e38\u662f0\u52301\u6216-1\u52301\u3002\u6807\u51c6\u5316\u53ef\u4ee5\u52a0\u901f\u6a21\u578b\u8bad\u7ec3\u8fc7\u7a0b\uff0c\u63d0\u9ad8\u6a21\u578b\u7684\u6536\u655b\u901f\u5ea6\u3002<\/p>\n<\/p>\n<p><h4>3.3 \u6570\u636e\u5206\u5272<\/h4>\n<\/p>\n<p><p>\u6570\u636e\u5206\u5272\u662f\u5c06\u6570\u636e\u96c6\u5212\u5206\u4e3a\u8bad\u7ec3\u96c6\u3001\u9a8c\u8bc1\u96c6\u548c\u6d4b\u8bd5\u96c6\u3002\u8bad\u7ec3\u96c6\u7528\u4e8e\u8bad\u7ec3\u6a21\u578b\uff0c\u9a8c\u8bc1\u96c6\u7528\u4e8e\u8c03\u4f18\u6a21\u578b\u53c2\u6570\uff0c\u6d4b\u8bd5\u96c6\u7528\u4e8e\u8bc4\u4f30\u6a21\u578b\u6027\u80fd\u3002<\/p>\n<\/p>\n<p><h3>\u56db\u3001\u8bad\u7ec3\u6a21\u578b<\/h3>\n<\/p>\n<p><h4>4.1 \u5b9a\u4e49\u635f\u5931\u51fd\u6570<\/h4>\n<\/p>\n<p><p>\u635f\u5931\u51fd\u6570\u7528\u4e8e\u8861\u91cf\u6a21\u578b\u9884\u6d4b\u7ed3\u679c\u4e0e\u771f\u5b9e\u7ed3\u679c\u4e4b\u95f4\u7684\u5dee\u5f02\u3002\u5e38\u89c1\u7684\u635f\u5931\u51fd\u6570\u5305\u62ec\u5747\u65b9\u8bef\u5dee\uff08MSE\uff09\u3001\u4ea4\u53c9\u71b5\u635f\u5931\u7b49\u3002<\/p>\n<\/p>\n<p><h4>4.2 \u9009\u62e9\u4f18\u5316\u5668<\/h4>\n<\/p>\n<p><p>\u4f18\u5316\u5668\u7528\u4e8e\u8c03\u6574\u6a21\u578b\u7684\u53c2\u6570\uff0c\u4ee5\u6700\u5c0f\u5316\u635f\u5931\u51fd\u6570\u3002\u5e38\u89c1\u7684\u4f18\u5316\u5668\u5305\u62ec\u968f\u673a\u68af\u5ea6\u4e0b\u964d\uff08SGD\uff09\u3001Adam\u3001RMSprop\u7b49\u3002<\/p>\n<\/p>\n<p><h4>4.3 \u8bad\u7ec3\u8fc7\u7a0b<\/h4>\n<\/p>\n<p><p>\u8bad\u7ec3\u8fc7\u7a0b\u662f\u901a\u8fc7\u591a\u6b21\u8fed\u4ee3\u66f4\u65b0\u6a21\u578b\u53c2\u6570\uff0c\u4f7f\u6a21\u578b\u9010\u6e10\u62df\u5408\u6570\u636e\u3002\u5728\u6bcf\u6b21\u8fed\u4ee3\u4e2d\uff0c\u6a21\u578b\u901a\u8fc7\u524d\u5411\u4f20\u64ad\u8ba1\u7b97\u9884\u6d4b\u7ed3\u679c\uff0c\u7136\u540e\u901a\u8fc7\u53cd\u5411\u4f20\u64ad\u66f4\u65b0\u53c2\u6570\u3002<\/p>\n<\/p>\n<p><h3>\u4e94\u3001\u8bc4\u4f30\u6a21\u578b<\/h3>\n<\/p>\n<p><h4>5.1 \u6a21\u578b\u8bc4\u4f30\u6307\u6807<\/h4>\n<\/p>\n<p><p>\u6a21\u578b\u8bc4\u4f30\u6307\u6807\u7528\u4e8e\u8861\u91cf\u6a21\u578b\u7684\u6027\u80fd\u3002\u5e38\u89c1\u7684\u8bc4\u4f30\u6307\u6807\u5305\u62ec\u51c6\u786e\u7387\u3001\u7cbe\u786e\u7387\u3001\u53ec\u56de\u7387\u3001F1\u5206\u6570\u7b49\u3002<\/p>\n<\/p>\n<p><h4>5.2 \u4ea4\u53c9\u9a8c\u8bc1<\/h4>\n<\/p>\n<p><p>\u4ea4\u53c9\u9a8c\u8bc1\u662f\u4e00\u79cd\u8bc4\u4f30\u6a21\u578b\u6027\u80fd\u7684\u65b9\u6cd5\uff0c\u901a\u8fc7\u5c06\u6570\u636e\u96c6\u5212\u5206\u4e3a\u591a\u4e2a\u5b50\u96c6\uff0c\u591a\u6b21\u8bad\u7ec3\u548c\u9a8c\u8bc1\u6a21\u578b\uff0c\u4ee5\u51cf\u5c11\u8fc7\u62df\u5408\u3002<\/p>\n<\/p>\n<p><h4>5.3 \u6df7\u6dc6\u77e9\u9635<\/h4>\n<\/p>\n<p><p>\u6df7\u6dc6\u77e9\u9635\u662f\u4e00\u79cd\u7528\u4e8e\u8bc4\u4f30\u5206\u7c7b\u6a21\u578b\u6027\u80fd\u7684\u5de5\u5177\uff0c\u901a\u8fc7\u663e\u793a\u771f\u5b9e\u6807\u7b7e\u548c\u9884\u6d4b\u6807\u7b7e\u7684\u5bf9\u6bd4\u60c5\u51b5\uff0c\u53ef\u4ee5\u66f4\u76f4\u89c2\u5730\u4e86\u89e3\u6a21\u578b\u7684\u8868\u73b0\u3002<\/p>\n<\/p>\n<p><h3>\u516d\u3001\u5b9e\u9645\u6848\u4f8b\uff1a\u7528Keras\u642d\u5efa\u4e00\u4e2a\u795e\u7ecf\u7f51\u7edc<\/h3>\n<\/p>\n<p><p>\u4e3a\u4e86\u66f4\u597d\u5730\u7406\u89e3\u5982\u4f55\u7528Python\u642d\u5efa\u4e00\u4e2a\u795e\u7ecf\u7f51\u7edc\uff0c\u4e0b\u9762\u662f\u4e00\u4e2a\u4f7f\u7528Keras\u642d\u5efa\u7b80\u5355\u795e\u7ecf\u7f51\u7edc\u7684\u5b9e\u9645\u6848\u4f8b\u3002<\/p>\n<\/p>\n<p><pre><code class=\"language-python\">import numpy as np<\/p>\n<p>from keras.models import Sequential<\/p>\n<p>from keras.layers import Dense<\/p>\n<p>from sklearn.model_selection import tr<a href=\"https:\/\/docs.pingcode.com\/blog\/59162.html\" target=\"_blank\">AI<\/a>n_test_split<\/p>\n<p>from sklearn.preprocessing import StandardScaler<\/p>\n<p>from sklearn.datasets import load_breast_cancer<\/p>\n<h2><strong>\u52a0\u8f7d\u6570\u636e\u96c6<\/strong><\/h2>\n<p>data = load_breast_cancer()<\/p>\n<p>X = data.data<\/p>\n<p>y = data.target<\/p>\n<h2><strong>\u6570\u636e\u9884\u5904\u7406<\/strong><\/h2>\n<p>scaler = StandardScaler()<\/p>\n<p>X = scaler.fit_transform(X)<\/p>\n<p>X_train, X_test, y_train, y_test = train_test_split(X, y, test_size=0.2, random_state=42)<\/p>\n<h2><strong>\u642d\u5efa\u795e\u7ecf\u7f51\u7edc<\/strong><\/h2>\n<p>model = Sequential()<\/p>\n<p>model.add(Dense(30, input_dim=X.shape[1], activation=&#39;relu&#39;))<\/p>\n<p>model.add(Dense(15, activation=&#39;relu&#39;))<\/p>\n<p>model.add(Dense(1, activation=&#39;sigmoid&#39;))<\/p>\n<h2><strong>\u7f16\u8bd1\u6a21\u578b<\/strong><\/h2>\n<p>model.compile(loss=&#39;binary_crossentropy&#39;, optimizer=&#39;adam&#39;, metrics=[&#39;accuracy&#39;])<\/p>\n<h2><strong>\u8bad\u7ec3\u6a21\u578b<\/strong><\/h2>\n<p>model.fit(X_train, y_train, epochs=50, batch_size=10, validation_data=(X_test, y_test))<\/p>\n<h2><strong>\u8bc4\u4f30\u6a21\u578b<\/strong><\/h2>\n<p>loss, accuracy = model.evaluate(X_test, y_test)<\/p>\n<p>print(f&quot;Test Accuracy: {accuracy * 100:.2f}%&quot;)<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><h3>\u4e03\u3001\u603b\u7ed3<\/h3>\n<\/p>\n<p><p>\u4f7f\u7528Python\u642d\u5efa\u795e\u7ecf\u7f51\u7edc\u6d89\u53ca\u591a\u4e2a\u6b65\u9aa4\uff1a<strong>\u9009\u62e9\u5408\u9002\u7684\u5e93\u3001\u8bbe\u8ba1\u795e\u7ecf\u7f51\u7edc\u7684\u67b6\u6784\u3001\u6570\u636e\u9884\u5904\u7406\u3001\u8bad\u7ec3\u6a21\u578b\u3001\u8bc4\u4f30\u6a21\u578b<\/strong>\u3002\u901a\u8fc7\u8be6\u7ec6\u4e86\u89e3\u6bcf\u4e2a\u6b65\u9aa4\uff0c\u5e76\u7ed3\u5408\u5b9e\u9645\u6848\u4f8b\uff0c\u53ef\u4ee5\u66f4\u597d\u5730\u638c\u63e1\u795e\u7ecf\u7f51\u7edc\u7684\u6784\u5efa\u8fc7\u7a0b\u3002\u5e0c\u671b\u672c\u6587\u80fd\u4e3a\u4f60\u63d0\u4f9b\u6709\u4ef7\u503c\u7684\u4fe1\u606f\uff0c\u5e2e\u52a9\u4f60\u66f4\u597d\u5730\u7406\u89e3\u5982\u4f55\u7528Python\u642d\u5efa\u4e00\u4e2a\u795e\u7ecf\u7f51\u7edc\u3002<\/p>\n<\/p>\n<h2><strong>\u76f8\u5173\u95ee\u7b54FAQs\uff1a<\/strong><\/h2>\n<p> <strong>\u5982\u4f55\u9009\u62e9\u5408\u9002\u7684Python\u5e93\u6765\u642d\u5efa\u795e\u7ecf\u7f51\u7edc\uff1f<\/strong><br \/>\u5728Python\u4e2d\uff0c\u6709\u51e0\u4e2a\u6d41\u884c\u7684\u5e93\u53ef\u4ee5\u7528\u6765\u642d\u5efa\u795e\u7ecf\u7f51\u7edc\uff0c\u5305\u62ecTensorFlow\u3001Keras\u548cPyTorch\u3002TensorFlow\u9002\u5408\u9700\u8981\u9ad8\u5ea6\u7075\u6d3b\u6027\u7684\u9879\u76ee\uff0cKeras\u5219\u63d0\u4f9b\u4e86\u66f4\u7b80\u6d01\u7684API\uff0c\u9002\u5408\u521d\u5b66\u8005\u3002\u800cPyTorch\u56e0\u5176\u52a8\u6001\u8ba1\u7b97\u56fe\u800c\u53d7\u5230\u7814\u7a76\u4eba\u5458\u7684\u9752\u7750\u3002\u6839\u636e\u4f60\u7684\u9700\u6c42\u548c\u9879\u76ee\u7684\u590d\u6742\u6027\u9009\u62e9\u5408\u9002\u7684\u5e93\uff0c\u5c06\u6709\u52a9\u4e8e\u63d0\u9ad8\u5f00\u53d1\u6548\u7387\u3002<\/p>\n<p><strong>\u642d\u5efa\u795e\u7ecf\u7f51\u7edc\u9700\u8981\u54ea\u4e9b\u57fa\u672c\u6b65\u9aa4\uff1f<\/strong><br \/>\u642d\u5efa\u795e\u7ecf\u7f51\u7edc\u7684\u57fa\u672c\u6b65\u9aa4\u5305\u62ec\u6570\u636e\u51c6\u5907\u3001\u6a21\u578b\u8bbe\u8ba1\u3001\u7f16\u8bd1\u6a21\u578b\u3001\u8bad\u7ec3\u6a21\u578b\u548c\u8bc4\u4f30\u6a21\u578b\u3002\u6570\u636e\u51c6\u5907\u6d89\u53ca\u6536\u96c6\u548c\u9884\u5904\u7406\u6570\u636e\uff0c\u786e\u4fdd\u6570\u636e\u683c\u5f0f\u9002\u5408\u8f93\u5165\u795e\u7ecf\u7f51\u7edc\u3002\u6a21\u578b\u8bbe\u8ba1\u5219\u5305\u62ec\u9009\u62e9\u5c42\u7684\u7c7b\u578b\u548c\u6570\u91cf\uff0c\u6fc0\u6d3b\u51fd\u6570\uff0c\u4ee5\u53ca\u635f\u5931\u51fd\u6570\u7b49\u3002\u7f16\u8bd1\u6a21\u578b\u65f6\uff0c\u9700\u8981\u6307\u5b9a\u4f18\u5316\u5668\u548c\u8bc4\u4f30\u6307\u6807\u3002\u8bad\u7ec3\u8fc7\u7a0b\u4e2d\uff0c\u4f7f\u7528\u8bad\u7ec3\u6570\u636e\u8c03\u6574\u6a21\u578b\u6743\u91cd\uff0c\u6700\u540e\u901a\u8fc7\u9a8c\u8bc1\u96c6\u6216\u6d4b\u8bd5\u96c6\u8bc4\u4f30\u6a21\u578b\u7684\u8868\u73b0\u3002<\/p>\n<p><strong>\u795e\u7ecf\u7f51\u7edc\u7684\u8bad\u7ec3\u8fc7\u7a0b\u4e2d\u5982\u4f55\u907f\u514d\u8fc7\u62df\u5408\uff1f<\/strong><br \/>\u4e3a\u4e86\u907f\u514d\u795e\u7ecf\u7f51\u7edc\u7684\u8fc7\u62df\u5408\uff0c\u53ef\u4ee5\u91c7\u7528\u591a\u79cd\u7b56\u7565\u3002\u4f8b\u5982\uff0c\u4f7f\u7528\u4ea4\u53c9\u9a8c\u8bc1\u6765\u786e\u4fdd\u6a21\u578b\u5728\u4e0d\u540c\u6570\u636e\u96c6\u4e0a\u7684\u8868\u73b0\u4e00\u81f4\u3002\u589e\u52a0\u6570\u636e\u91cf\u6216\u4f7f\u7528\u6570\u636e\u589e\u5f3a\u6280\u672f\u4e5f\u80fd\u6709\u6548\u964d\u4f4e\u8fc7\u62df\u5408\u98ce\u9669\u3002\u6b64\u5916\uff0c\u8c03\u6574\u7f51\u7edc\u7684\u590d\u6742\u6027\uff0c\u5982\u51cf\u5c11\u5c42\u6570\u6216\u8282\u70b9\u6570\uff0c\u4f7f\u7528\u6b63\u5219\u5316\u65b9\u6cd5\uff08\u5982L1\u548cL2\u6b63\u5219\u5316\uff09\uff0c\u4ee5\u53ca\u5e94\u7528Dropout\u6280\u672f\uff0c\u90fd\u662f\u6709\u6548\u7684\u9632\u6b62\u8fc7\u62df\u5408\u7684\u624b\u6bb5\u3002<\/p>\n","protected":false},"excerpt":{"rendered":"\u5982\u4f55\u7528Python\u642d\u5efa\u4e00\u4e2a\u795e\u7ecf\u7f51\u7edc \u4f7f\u7528Python\u642d\u5efa\u4e00\u4e2a\u795e\u7ecf\u7f51\u7edc\uff0c\u53ef\u4ee5\u901a\u8fc7\u591a\u4e2a\u6b65\u9aa4\u5b8c\u6210\uff1a\u9009\u62e9\u5408\u9002\u7684\u5e93\u3001\u8bbe\u8ba1 [&hellip;]","protected":false},"author":3,"featured_media":1129418,"comment_status":"closed","ping_status":"","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"footnotes":""},"categories":[37],"tags":[],"acf":[],"_links":{"self":[{"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/posts\/1129407"}],"collection":[{"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/users\/3"}],"replies":[{"embeddable":true,"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/comments?post=1129407"}],"version-history":[{"count":"1","href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/posts\/1129407\/revisions"}],"predecessor-version":[{"id":1129423,"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/posts\/1129407\/revisions\/1129423"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/media\/1129418"}],"wp:attachment":[{"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/media?parent=1129407"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/categories?post=1129407"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/tags?post=1129407"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}