{"id":3871,"date":"2026-07-05T23:11:43","date_gmt":"2026-07-05T15:11:43","guid":{"rendered":"https:\/\/www.khsci.com\/docs\/index.php\/2026\/07\/05\/cnn-rnn-regression-python\/"},"modified":"2026-07-06T00:06:19","modified_gmt":"2026-07-05T16:06:19","slug":"cnn-rnn-regression-python","status":"publish","type":"post","link":"https:\/\/www.khsci.com\/docs\/index.php\/2026\/07\/05\/cnn-rnn-regression-python\/","title":{"rendered":"CNN-RNN\u6df7\u5408\u56de\u5f52\u9884\u6d4bPython\u4ee3\u7801"},"content":{"rendered":"\n<ul>\n<li>\u4f7f\u7528\u6ce2\u58eb\u987f\u623f\u4ef7\u9884\u6d4b\u4f5c\u4e3a\u6f14\u793a\u6848\u4f8b\u3002<\/li>\n<li>\u53ef\u4ee5\u8bbe\u7f6e CNN \u5377\u79ef\u901a\u9053\u6570\u3001\u5377\u79ef\u6838\u5bbd\u5ea6\u3001\u6700\u5927\u6c60\u5316\u7a97\u53e3\u7b49\u7ed3\u6784\u53c2\u6570\u3002<\/li>\n<li>\u53ef\u4ee5\u5728 RNN\u3001LSTM\u3001GRU\u3001BiLSTM\u3001BiGRU \u4e94\u79cd\u5faa\u73af\u7f51\u7edc\u7ed3\u6784\u4e4b\u95f4\u5feb\u901f\u5207\u6362\u3002<\/li>\n<li>\u53ef\u4ee5\u5feb\u901f\u5212\u5206\u8bad\u7ec3\u96c6\u3001\u9a8c\u8bc1\u96c6\u3001\u6d4b\u8bd5\u96c6\uff0c\u5e76\u4fdd\u8bc1\u6d4b\u8bd5\u96c6\u53ea\u5728\u6a21\u578b\u8bad\u7ec3\u5b8c\u6210\u540e\u53c2\u4e0e\u6700\u7ec8\u8bc4\u4ef7\u3002<\/li>\n<li>\u7a0b\u5e8f\u8fd0\u884c\u5b8c\u540e\u81ea\u52a8\u7ed8\u5236\u8bad\u7ec3\u96c6\u9884\u6d4b\u6548\u679c\u3001\u6d4b\u8bd5\u96c6\u9884\u6d4b\u6548\u679c\u3001\u8bad\u7ec3\/\u9a8c\u8bc1\/\u6d4b\u8bd5\u6563\u70b9\u56fe\u3001MAE\/RMSE\/MAPE\/R\u00b2 \u6307\u6807\u5bf9\u6bd4\u56fe\u3001\u8bad\u7ec3\u4e0e\u9a8c\u8bc1\u635f\u5931\u66f2\u7ebf\u3002<\/li>\n<li>\u53ef\u81ea\u52a8\u8ba1\u7b97 MAE\u3001MSE\u3001RMSE\u3001MAPE\u3001R\u00b2 \u7b49\u56de\u5f52\u8bc4\u4ef7\u6307\u6807\u3002<\/li>\n<li>\u591a\u79cd\u8bad\u7ec3\u53c2\u6570\u53ef\u8bbe\u7f6e\uff0c\u5305\u62ec\u8fed\u4ee3\u6b21\u6570\u3001\u521d\u59cb\u5b66\u4e60\u7387\u3001\u6279\u5c3a\u5bf8\u3001L2 \u6b63\u5219\u3001\u63d0\u524d\u505c\u6b62\u8f6e\u6570\u7b49\u7b49\u3002<\/li>\n<li>\u53ef\u8bbe\u7f6e\u968f\u673a\u79cd\u5b50\uff0c\u4fdd\u8bc1\u6bcf\u6b21\u8fd0\u884c\u7684\u6570\u636e\u5212\u5206\u548c\u8bad\u7ec3\u7ed3\u679c\u5c3d\u91cf\u4fdd\u6301\u4e00\u81f4\u3002<\/li>\n<li>\u7a0b\u5e8f\u4f1a\u81ea\u52a8\u68c0\u6d4b CPU \u6216 GPU\uff1b\u5982\u679c\u5f53\u524d\u6ca1\u6709\u53ef\u7528 GPU\uff0c\u5219\u81ea\u52a8\u4f7f\u7528 CPU\u3002<\/li>\n<\/ul>\n\n\n\n<p>\u9700\u8981\u4f60\u505a\u7684\u57fa\u672c\u53ea\u6709\u5bfc\u5165\u6570\u636e\u548c\u8c03\u53c2\u3002<\/p>\n\n\n\n<p>\u7edd\u5927\u591a\u6570\u6d41\u7a0b\u90fd\u5df2\u7ecf\u5c01\u88c5\u56fa\u5316\u5230 <code>FunRegCNNRNN<\/code> \u51fd\u6570\u4e2d\uff0c\u4eff\u7167\u6848\u4f8b\u5bfc\u5165\u81ea\u5df1\u7684\u6570\u636e\uff0c\u5373\u53ef\u5feb\u901f\u5f97\u5230\u9884\u6d4b\u7ed3\u679c\u3001\u8bc4\u4ef7\u6307\u6807\u548c\u7ed3\u679c\u56fe\u3002<\/p>\n\n\n\n<p>\u9700\u8981\u6ce8\u610f\u7684\u662f\uff0c\u672c\u7a0b\u5e8f\u9002\u5408\u201c\u6bcf\u6761\u6837\u672c\u5185\u90e8\u5177\u6709\u660e\u786e\u987a\u5e8f\u201d\u7684\u4e00\u7ef4\u6570\u636e\uff0c\u4f8b\u5982\u6ed1\u52a8\u65f6\u95f4\u7a97\u3001\u5149\u8c31\u6ce2\u6bb5\u3001\u4f20\u611f\u5668\u5e8f\u5217\u7b49\u3002\u6ce2\u58eb\u987f\u623f\u4ef7\u6570\u636e\u4e3b\u8981\u7528\u4e8e\u6f14\u793a\u4ee3\u7801\u8c03\u7528\u6d41\u7a0b\uff1b\u666e\u901a\u8868\u683c\u7279\u5f81\u5e76\u4e0d\u5929\u7136\u5177\u6709\u65f6\u95f4\u987a\u5e8f\uff0c\u5b9e\u9645\u4f7f\u7528\u65f6\u5e94\u6839\u636e\u4e1a\u52a1\u542b\u4e49\u786e\u8ba4\u5217\u987a\u5e8f\u662f\u5426\u5408\u7406\u3002<\/p>\n\n\n\n<h4 class=\"wp-block-heading\">\u4e00\u3001\u4ee3\u7801\u8fd0\u884c\u73af\u5883<\/h4>\n\n\n\n<p>\u8fd0\u884c\u73af\u5883\u63a8\u8350\u4e3a\uff1aVSCode + Anaconda + PyTorch\u3002<\/p>\n\n\n\n<p>\u5982\u679c\u6309\u7167\u63a8\u8350\u73af\u5883\u914d\u7f6e\uff0c\u5219\u4ee3\u7801\u57fa\u672c\u53ef\u4ee5\u4e0b\u8f7d\u5373\u7528\u3002Python \u7248\u672c\u5efa\u8bae\u4f7f\u7528 Python 3.11\u3002<\/p>\n\n\n\n<p>\u5982\u679c\u4f7f\u7528\u4f60\u73b0\u6709\u7684 Python \u73af\u5883\uff0c\u9700\u8981\u5b89\u88c5\u4f9d\u8d56\u5305\u3002\u53ef\u4ee5\u6839\u636e\u4ee3\u7801\u8fd0\u884c\u65f6\u62a5\u9519\u5185\u5bb9\u9010\u4e2a\u5b89\u88c5\uff0c\u4e5f\u53ef\u4ee5\u5148\u5b89\u88c5 <code>requirements.txt<\/code> \u4e2d\u5217\u51fa\u7684\u4f9d\u8d56\u3002<\/p>\n\n\n\n<p>\u5e38\u7528\u4f9d\u8d56\u5305\u62ec\uff1a<\/p>\n\n\n\n<pre class=\"wp-block-prismatic-blocks\"><code class=\"language-bash\">pip install numpy matplotlib scikit-learn torch<\/code><\/pre>\n\n\n\n<p>\u5982\u679c\u9700\u8981\u4f7f\u7528 GPU \u8bad\u7ec3\uff0c\u8bf7\u6839\u636e\u81ea\u5df1\u7684 CUDA \u7248\u672c\u5b89\u88c5\u5bf9\u5e94\u7684 PyTorch\u3002\u6ca1\u6709 GPU \u4e5f\u53ef\u4ee5\u8fd0\u884c\uff0c\u7a0b\u5e8f\u4f1a\u81ea\u52a8\u4f7f\u7528 CPU\u3002<\/p>\n\n\n\n<h4 class=\"wp-block-heading\">\u4e8c\u3001\u7a0b\u5e8f\u4ecb\u7ecd<\/h4>\n\n\n\n<h6 class=\"wp-block-heading\">\u7a0b\u5e8f\u6587\u4ef6<\/h6>\n\n\n\n<pre class=\"wp-block-prismatic-blocks\"><code class=\"language-text\">CNN_RNN_Regression\/\n\u251c\u2500\u2500 demoCNNRNN_Regression.py\n\u251c\u2500\u2500 FunRegCNNRNN.py\n\u251c\u2500\u2500 requirements.txt\n\u251c\u2500\u2500 housing.txt\n\u251c\u2500\u2500 \u4ee3\u7801\u8bf4\u660e.txt\n\u2514\u2500\u2500 figure\/\u56fe1.png ... \u56fe5.png<\/code><\/pre>\n\n\n\n<p>\u6ce8\uff1a<code>demoCNNRNN_Regression.py<\/code> \u662f\u53ef\u4ee5\u76f4\u63a5\u8fd0\u884c\u7684\u6f14\u793a\u811a\u672c\uff1b<code>FunRegCNNRNN.py<\/code> \u662f\u51fd\u6570\u5e93\u6587\u4ef6\uff0c\u901a\u5e38\u7531 demo \u8c03\u7528\uff0c\u4e0d\u5efa\u8bae\u5728\u6ca1\u6709\u8f93\u5165\u53d8\u91cf\u7684\u60c5\u51b5\u4e0b\u76f4\u63a5\u8fd0\u884c\u3002<\/p>\n\n\n\n<h6 class=\"wp-block-heading\">1. <code>demoCNNRNN_Regression.py<\/code> \u6587\u4ef6<\/h6>\n\n\n\n<p>\u4f7f\u7528\u6ce2\u58eb\u987f\u57ce\u90ca\u533a\u57df\u7684\u623f\u4ef7\u6570\u636e\u96c6\u8fdb\u884c\u56de\u5f52\u9884\u6d4b\u7684\u6f14\u793a\u6848\u4f8b\uff0c\u5176\u4e2d\u6f14\u793a\u4e86 <code>FunRegCNNRNN.py<\/code> \u6587\u4ef6\u4e2d <code>FunRegCNNRNN<\/code> \u51fd\u6570\u7684\u5e94\u7528\u65b9\u5f0f\u3002<\/p>\n\n\n\n<p>\u6587\u4ef6\u53ef\u4ee5\u76f4\u63a5\u8fd0\u884c\u3002\u7a0b\u5e8f\u8fd0\u884c\u5b8c\u6210\u540e\uff0c\u4f1a\u5728 <code>figure<\/code> \u6587\u4ef6\u5939\u4e2d\u81ea\u52a8\u4fdd\u5b58\u5982\u4e0b\u56fe\u50cf\uff1a<\/p>\n\n\n\n<p>\u8bad\u7ec3\u96c6\u9884\u6d4b\u6548\u679c\u4e0e\u8bef\u5dee\u5206\u5e03\u56fe\uff1a<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img decoding=\"async\" src=\"https:\/\/khsci.com\/docs\/wp-content\/uploads\/2026\/07\/CNN_RNN_Regression_Python_fig1.png\" alt=\"\u8bad\u7ec3\u96c6\u9884\u6d4b\u6548\u679c\" \/><\/figure>\n\n\n\n<p>\u6d4b\u8bd5\u96c6\u9884\u6d4b\u6548\u679c\u4e0e\u8bef\u5dee\u5206\u5e03\u56fe\uff1a<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img decoding=\"async\" src=\"https:\/\/khsci.com\/docs\/wp-content\/uploads\/2026\/07\/CNN_RNN_Regression_Python_fig2.png\" alt=\"\u6d4b\u8bd5\u96c6\u9884\u6d4b\u6548\u679c\" \/><\/figure>\n\n\n\n<p>\u8bad\u7ec3\u96c6\u3001\u9a8c\u8bc1\u96c6\u3001\u6d4b\u8bd5\u96c6\u771f\u5b9e\u503c\u4e0e\u9884\u6d4b\u503c\u6563\u70b9\u56fe\uff1a<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img decoding=\"async\" src=\"https:\/\/khsci.com\/docs\/wp-content\/uploads\/2026\/07\/CNN_RNN_Regression_Python_fig3.png\" alt=\"\u8bad\u7ec3\u9a8c\u8bc1\u6d4b\u8bd5\u6563\u70b9\" \/><\/figure>\n\n\n\n<p>MAE\u3001RMSE\u3001MAPE\u3001R\u00b2 \u7b49\u6307\u6807\u5bf9\u6bd4\u56fe\uff1a<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img decoding=\"async\" src=\"https:\/\/khsci.com\/docs\/wp-content\/uploads\/2026\/07\/CNN_RNN_Regression_Python_fig4.png\" alt=\"\u8bc4\u4ef7\u6307\u6807\u5bf9\u6bd4\" \/><\/figure>\n\n\n\n<p>\u8bad\u7ec3\u4e0e\u9a8c\u8bc1\u635f\u5931\u6536\u655b\u66f2\u7ebf\uff1a<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img decoding=\"async\" src=\"https:\/\/khsci.com\/docs\/wp-content\/uploads\/2026\/07\/CNN_RNN_Regression_Python_fig5.png\" alt=\"\u8bad\u7ec3\u4e0e\u9a8c\u8bc1\u635f\u5931\" \/><\/figure>\n\n\n\n<p>\u5728\u547d\u4ee4\u884c\u7a97\u53e3\u8fd8\u4f1a\u6253\u5370\u51fa\u4ee5\u4e0b\u5185\u5bb9\uff1a<\/p>\n\n\n\n<ul>\n<li>\u6570\u636e\u96c6\u6837\u672c\u6570\u3001\u7279\u5f81\u7ef4\u5ea6\u3001\u76ee\u6807\u503c\u8303\u56f4\uff1b<\/li>\n<li>\u5f53\u524d\u4f7f\u7528\u7684\u5faa\u73af\u7ed3\u6784\u3001\u5377\u79ef\u6838\u6570\u91cf\u3001\u5377\u79ef\u6838\u5927\u5c0f\u3001\u6c60\u5316\u7a97\u53e3\uff1b<\/li>\n<li>\u8bad\u7ec3\u96c6\u3001\u9a8c\u8bc1\u96c6\u3001\u6d4b\u8bd5\u96c6\u5212\u5206\u6570\u91cf\uff1b<\/li>\n<li>\u5f53\u524d\u8ba1\u7b97\u8bbe\u5907\uff08CPU \u6216 GPU\uff09\uff1b<\/li>\n<li>\u8bad\u7ec3\u8fc7\u7a0b\u4e2d\u7684\u8bad\u7ec3\u635f\u5931\u3001\u9a8c\u8bc1\u635f\u5931\uff1b<\/li>\n<li>\u8bad\u7ec3\u96c6\u3001\u9a8c\u8bc1\u96c6\u3001\u6d4b\u8bd5\u96c6\u4e0a\u7684 MAE\u3001MSE\u3001RMSE\u3001MAPE\u3001R\u00b2 \u7b49\u6307\u6807\u3002<\/li>\n<\/ul>\n\n\n\n<h6 class=\"wp-block-heading\">2. <code>FunRegCNNRNN.py<\/code> \u6587\u4ef6<\/h6>\n\n\n\n<p>\u4f7f\u7528 CNN-RNN \u6df7\u5408\u7f51\u7edc\u8fdb\u884c\u56de\u5f52\u9884\u6d4b\u7684\u5feb\u901f\u5b9e\u73b0\u5e93\u6587\u4ef6\uff0c\u5176\u4e2d\u5305\u542b\u6838\u5fc3\u51fd\u6570 <code>FunRegCNNRNN<\/code>\u3002<\/p>\n\n\n\n<p>\u51fd\u6570\u8bf4\u660e\u5982\u4e0b\uff1a<\/p>\n\n\n\n<pre class=\"wp-block-prismatic-blocks\"><code class=\"language-python\">def FunRegCNNRNN(X, Y, options=None):\n    &quot;&quot;&quot;\n    CNN-RNN \u6df7\u5408\u56de\u5f52\u9884\u6d4b\u51fd\u6570\u3002\n\n    Parameters\n    ----------\n    X : np.ndarray\n        [n_samples, sequence_length]\u3002\n        \u6bcf\u884c\u5fc5\u987b\u662f\u6709\u5e8f\u5e8f\u5217\u6216\u6709\u5e8f\u4f4d\u7f6e\uff1b\u5217\u987a\u5e8f\u4f1a\u5f71\u54cd\u7ed3\u679c\u3002\n\n    Y : np.ndarray\n        [n_samples,] \u8fde\u7eed\u56de\u5f52\u76ee\u6807\u3002\n\n    options : dict, optional\n        \u53c2\u6570\u5b57\u5178\uff0c\u63a7\u5236\u6570\u636e\u5212\u5206\u3001\u7f51\u7edc\u7ed3\u6784\u3001\u8bad\u7ec3\u8fc7\u7a0b\u3001\u5f52\u4e00\u5316\u548c\u7ed8\u56fe\u3002\n\n    Returns\n    -------\n    foreData : \u6700\u7ec8\u6d4b\u8bd5\u96c6\u9884\u6d4b\u503c\u3002\n    foreDataTrain : \u8bad\u7ec3\u96c6\u62df\u5408\u503c\u3002\n    info : \u6a21\u578b\u3001\u5f52\u4e00\u5316\u5668\u3001\u7d22\u5f15\u3001\u6307\u6807\u548c\u8bad\u7ec3\u8fc7\u7a0b\u3002\n    &quot;&quot;&quot;<\/code><\/pre>\n\n\n\n<p><code>options<\/code> \u4e3a\u5b57\u5178\u7c7b\u578b\uff0c\u662f\u4f7f\u7528\u8fd9\u4e2a\u51fd\u6570\u65f6\u6700\u5e38\u8c03\u6574\u7684\u90e8\u5206\u3002\u5b83\u628a\u6570\u636e\u600e\u4e48\u5212\u5206\u3001\u7f51\u7edc\u600e\u4e48\u642d\u3001\u8bad\u7ec3\u600e\u4e48\u505c\u3001\u7ed3\u679c\u8981\u4e0d\u8981\u753b\u56fe\u90fd\u96c6\u4e2d\u5230\u4e00\u8d77\u3002\u5e38\u7528\u8bbe\u7f6e\u5982\u4e0b\uff1a<\/p>\n\n\n\n<pre class=\"wp-block-prismatic-blocks\"><code class=\"language-python\">options = {\n    &#039;rTrain&#039;: 0.8,\n    &#039;validationRatio&#039;: 0.15,\n    &#039;networkType&#039;: &#039;LSTM&#039;,\n    &#039;convChannels&#039;: 16,\n    &#039;kernelSize&#039;: 3,\n    &#039;poolSize&#039;: 2,\n    &#039;rnnHidden&#039;: 32,\n    &#039;epochs&#039;: 150,\n    &#039;lr&#039;: 0.01,\n    &#039;batchSize&#039;: 32,\n    &#039;weightDecay&#039;: 1e-4,\n    &#039;earlyStoppingPatience&#039;: 25,\n    &#039;mapflag&#039;: True,\n    &#039;figflag&#039;: True,\n    &#039;shuffle&#039;: True,\n    &#039;seed&#039;: 42\n}<\/code><\/pre>\n\n\n\n<p>\u5404\u5b57\u6bb5\u542b\u4e49\u5982\u4e0b\uff1a<\/p>\n\n\n\n<figure class=\"wp-block-table\"><table>\n<thead>\n<tr>\n<th style=\"text-align:left\">\u53c2\u6570<\/th>\n<th style=\"text-align:left\">\u9ed8\u8ba4\u503c<\/th>\n<th style=\"text-align:left\">\u5141\u8bb8\u53d6\u503c\/\u8303\u56f4<\/th>\n<th style=\"text-align:left\">\u4f5c\u7528\u4e0e\u8c03\u53c2\u5f71\u54cd<\/th>\n<\/tr>\n<\/thead>\n<tbody>\n<tr>\n<td style=\"text-align:left\"><code>rTrain<\/code><\/td>\n<td style=\"text-align:left\"><code>0.8<\/code><\/td>\n<td style=\"text-align:left\"><code>[0.5, 1)<\/code><\/td>\n<td style=\"text-align:left\">\u8bad\u7ec3+\u9a8c\u8bc1\u6570\u636e\u6bd4\u4f8b\uff0c\u5176\u4f59\u6837\u672c\u4f5c\u4e3a\u6700\u7ec8\u6d4b\u8bd5\u96c6\u3002\u6ce8\u610f\u5b83\u4e0d\u662f\u7eaf\u8bad\u7ec3\u96c6\u6bd4\u4f8b\u3002<\/td>\n<\/tr>\n<tr>\n<td style=\"text-align:left\"><code>validationRatio<\/code><\/td>\n<td style=\"text-align:left\"><code>0.15<\/code><\/td>\n<td style=\"text-align:left\"><code>(0, 0.5)<\/code><\/td>\n<td style=\"text-align:left\">\u9a8c\u8bc1\u96c6\u5360\u8bad\u7ec3+\u9a8c\u8bc1\u6570\u636e\u7684\u6bd4\u4f8b\uff0c\u7528\u4e8e\u65e9\u505c\u548c\u89c2\u5bdf\u6cdb\u5316\uff0c\u4e0d\u53c2\u4e0e\u53c2\u6570\u66f4\u65b0\u3002<\/td>\n<\/tr>\n<tr>\n<td style=\"text-align:left\"><code>shuffle<\/code><\/td>\n<td style=\"text-align:left\"><code>True<\/code><\/td>\n<td style=\"text-align:left\"><code>True\/False<\/code><\/td>\n<td style=\"text-align:left\">\u5212\u5206\u524d\u662f\u5426\u6253\u4e71\u6837\u672c\u3002\u72ec\u7acb\u6837\u672c\u53ef\u6253\u4e71\uff1b\u4e25\u683c\u65f6\u95f4\u5e8f\u5217\u901a\u5e38\u5e94\u5148\u6784\u9020\u6ed1\u52a8\u7a97\u53e3\uff0c\u518d\u6309\u65f6\u95f4\u987a\u5e8f\u5207\u5206\u3002<\/td>\n<\/tr>\n<tr>\n<td style=\"text-align:left\"><code>seed<\/code><\/td>\n<td style=\"text-align:left\"><code>42<\/code><\/td>\n<td style=\"text-align:left\">\u975e\u8d1f\u6574\u6570<\/td>\n<td style=\"text-align:left\">\u968f\u673a\u79cd\u5b50\u3002\u56fa\u5b9a\u6574\u6570\u4fbf\u4e8e\u590d\u73b0\u5b9e\u9a8c\uff0c\u8bbe\u4e3a <code>0<\/code> \u8868\u793a\u4e0d\u56fa\u5b9a\u968f\u673a\u6027\u3002<\/td>\n<\/tr>\n<tr>\n<td style=\"text-align:left\"><code>networkType<\/code><\/td>\n<td style=\"text-align:left\"><code>&#039;LSTM&#039;<\/code><\/td>\n<td style=\"text-align:left\"><code>&#039;RNN&#039;\/&#039;LSTM&#039;\/&#039;GRU&#039;\/&#039;BiLSTM&#039;\/&#039;BiGRU&#039;<\/code><\/td>\n<td style=\"text-align:left\">\u5faa\u73af\u5c42\u7c7b\u578b\u3002RNN \u6700\u7b80\u5355\uff0cLSTM \u8f83\u7a33\uff0cGRU \u53c2\u6570\u8f83\u5c11\uff0c\u53cc\u5411\u7ed3\u6784\u4f1a\u540c\u65f6\u8bfb\u6b63\u53cd\u4e24\u4e2a\u65b9\u5411\u3002<\/td>\n<\/tr>\n<tr>\n<td style=\"text-align:left\"><code>convChannels<\/code><\/td>\n<td style=\"text-align:left\"><code>16<\/code><\/td>\n<td style=\"text-align:left\">\u6b63\u6574\u6570<\/td>\n<td style=\"text-align:left\">\u4e00\u7ef4\u5377\u79ef\u901a\u9053\u6570\u3002\u8d8a\u5927\u53ef\u63d0\u53d6\u66f4\u591a\u5c40\u90e8\u6a21\u5f0f\uff0c\u4f46\u8bad\u7ec3\u66f4\u6162\u3001\u66f4\u5bb9\u6613\u8fc7\u62df\u5408\u3002<\/td>\n<\/tr>\n<tr>\n<td style=\"text-align:left\"><code>kernelSize<\/code><\/td>\n<td style=\"text-align:left\"><code>3<\/code><\/td>\n<td style=\"text-align:left\">\u6b63\u5947\u6570<\/td>\n<td style=\"text-align:left\">\u4e00\u7ef4\u5377\u79ef\u6838\u5bbd\u5ea6\u3002\u8d8a\u5927\u8868\u793a\u4e00\u6b21\u89c2\u5bdf\u66f4\u5bbd\u7684\u76f8\u90bb\u533a\u57df\uff1b\u592a\u5927\u53ef\u80fd\u62b9\u6389\u5c40\u90e8\u7ec6\u8282\u3002<\/td>\n<\/tr>\n<tr>\n<td style=\"text-align:left\"><code>poolSize<\/code><\/td>\n<td style=\"text-align:left\"><code>2<\/code><\/td>\n<td style=\"text-align:left\"><code>[1, \u5e8f\u5217\u957f\u5ea6]<\/code><\/td>\n<td style=\"text-align:left\">\u6700\u5927\u6c60\u5316\u7a97\u53e3\u3002\u8bbe\u4e3a <code>1<\/code> \u57fa\u672c\u7b49\u4ef7\u4e8e\u4e0d\u6c60\u5316\uff1b\u8d8a\u5927\u538b\u7f29\u8d8a\u5f3a\uff0c\u53ef\u80fd\u4e22\u5931\u7ec6\u8282\u3002<\/td>\n<\/tr>\n<tr>\n<td style=\"text-align:left\"><code>rnnHidden<\/code><\/td>\n<td style=\"text-align:left\"><code>32<\/code><\/td>\n<td style=\"text-align:left\">\u6b63\u6574\u6570<\/td>\n<td style=\"text-align:left\">\u5faa\u73af\u5c42\u9690\u85cf\u5355\u5143\u6570\u3002\u8d8a\u5927\u8bb0\u5fc6\u5bb9\u91cf\u8d8a\u5f3a\uff0c\u4f46\u8bad\u7ec3\u66f4\u6162\uff0c\u4e5f\u66f4\u5bb9\u6613\u8fc7\u62df\u5408\u3002<\/td>\n<\/tr>\n<tr>\n<td style=\"text-align:left\"><code>epochs<\/code><\/td>\n<td style=\"text-align:left\"><code>150<\/code><\/td>\n<td style=\"text-align:left\">\u6b63\u6574\u6570<\/td>\n<td style=\"text-align:left\">\u6700\u5927\u8bad\u7ec3\u8f6e\u6570\u3002\u5b9e\u9645\u8bad\u7ec3\u53ef\u80fd\u56e0\u4e3a\u65e9\u505c\u63d0\u524d\u7ed3\u675f\u3002<\/td>\n<\/tr>\n<tr>\n<td style=\"text-align:left\"><code>lr<\/code><\/td>\n<td style=\"text-align:left\"><code>0.01<\/code><\/td>\n<td style=\"text-align:left\">\u6b63\u6570<\/td>\n<td style=\"text-align:left\">Adam \u521d\u59cb\u5b66\u4e60\u7387\u3002\u592a\u5927\u5bb9\u6613\u9707\u8361\uff0c\u592a\u5c0f\u6536\u655b\u6162\u3002<\/td>\n<\/tr>\n<tr>\n<td style=\"text-align:left\"><code>batchSize<\/code><\/td>\n<td style=\"text-align:left\"><code>32<\/code><\/td>\n<td style=\"text-align:left\">\u6b63\u6574\u6570<\/td>\n<td style=\"text-align:left\">\u6279\u5c3a\u5bf8\u3002\u5c0f\u6279\u6b21\u6ce2\u52a8\u66f4\u5927\uff0c\u5927\u6279\u6b21\u66f4\u7a33\u5b9a\u4f46\u5360\u663e\u5b58\/\u5185\u5b58\u3002<\/td>\n<\/tr>\n<tr>\n<td style=\"text-align:left\"><code>weightDecay<\/code><\/td>\n<td style=\"text-align:left\"><code>1e-4<\/code><\/td>\n<td style=\"text-align:left\">\u975e\u8d1f\u6570<\/td>\n<td style=\"text-align:left\">L2 \u6b63\u5219\u7cfb\u6570\u3002\u9002\u5f53\u589e\u5927\u53ef\u6291\u5236\u8fc7\u62df\u5408\uff0c\u8fc7\u5927\u53ef\u80fd\u6b20\u62df\u5408\u3002<\/td>\n<\/tr>\n<tr>\n<td style=\"text-align:left\"><code>earlyStoppingPatience<\/code><\/td>\n<td style=\"text-align:left\"><code>25<\/code><\/td>\n<td style=\"text-align:left\">\u975e\u8d1f\u6574\u6570<\/td>\n<td style=\"text-align:left\">\u9a8c\u8bc1\u635f\u5931\u8fde\u7eed\u4e0d\u6539\u5584\u7684\u5bb9\u5fcd\u8f6e\u6570\u3002\u8bbe\u4e3a <code>0<\/code> \u8868\u793a\u5173\u95ed\u65e9\u505c\u3002<\/td>\n<\/tr>\n<tr>\n<td style=\"text-align:left\"><code>mapflag<\/code><\/td>\n<td style=\"text-align:left\"><code>True<\/code><\/td>\n<td style=\"text-align:left\"><code>True\/False<\/code><\/td>\n<td style=\"text-align:left\">\u662f\u5426\u6267\u884c Min-Max \u5f52\u4e00\u5316\u3002\u5efa\u8bae\u5f00\u542f\uff1b\u5f00\u542f\u65f6\u53ea\u7528\u8bad\u7ec3\u96c6\u62df\u5408\u5f52\u4e00\u5316\u5668\u3002<\/td>\n<\/tr>\n<tr>\n<td style=\"text-align:left\"><code>figflag<\/code><\/td>\n<td style=\"text-align:left\"><code>True<\/code><\/td>\n<td style=\"text-align:left\"><code>True\/False<\/code><\/td>\n<td style=\"text-align:left\">\u662f\u5426\u81ea\u52a8\u7ed8\u56fe\u5e76\u4fdd\u5b58\u5230 <code>figure<\/code> \u6587\u4ef6\u5939\u3002\u6279\u91cf\u8c03\u53c2\u65f6\u53ef\u8bbe\u4e3a <code>False<\/code>\u3002<\/td>\n<\/tr>\n<\/tbody>\n<\/table><\/figure>\n\n\n\n<p>\u5176\u4e2d\uff0c<code>networkType<\/code> \u652f\u6301\u4e94\u79cd\u53d6\u503c\uff1a<\/p>\n\n\n\n<pre class=\"wp-block-prismatic-blocks\"><code class=\"language-python\">options[&#039;networkType&#039;] = &#039;RNN&#039;     # \u666e\u901a\u5faa\u73af\u7f51\u7edc\noptions[&#039;networkType&#039;] = &#039;LSTM&#039;    # LSTM\uff0c\u9ed8\u8ba4\u8bbe\u7f6e\noptions[&#039;networkType&#039;] = &#039;GRU&#039;     # GRU\uff0c\u7ed3\u6784\u76f8\u5bf9\u7cbe\u7b80\noptions[&#039;networkType&#039;] = &#039;BiLSTM&#039;  # \u53cc\u5411 LSTM\noptions[&#039;networkType&#039;] = &#039;BiGRU&#039;   # \u53cc\u5411 GRU<\/code><\/pre>\n\n\n\n<p>\u51fd\u6570\u5185\u90e8\u4f1a\u81ea\u52a8\u5b8c\u6210\uff1a<\/p>\n\n\n\n<ul>\n<li>\u8f93\u5165\u53c2\u6570\u68c0\u67e5\uff1b<\/li>\n<li>\u8bad\u7ec3\u96c6\u3001\u9a8c\u8bc1\u96c6\u3001\u6d4b\u8bd5\u96c6\u5212\u5206\uff1b<\/li>\n<li>\u4ec5\u4f7f\u7528\u8bad\u7ec3\u96c6\u62df\u5408 <code>MinMaxScaler<\/code>\uff0c\u518d\u5e94\u7528\u5230\u9a8c\u8bc1\u96c6\u548c\u6d4b\u8bd5\u96c6\uff1b<\/li>\n<li>CNN-RNN \u6a21\u578b\u6784\u5efa\uff1b<\/li>\n<li>\u6a21\u578b\u8bad\u7ec3\u3001\u9a8c\u8bc1\u96c6\u63d0\u524d\u505c\u6b62\u548c\u6700\u4f73\u6743\u91cd\u6062\u590d\uff1b<\/li>\n<li>\u6d4b\u8bd5\u96c6\u9884\u6d4b\uff1b<\/li>\n<li>MAE\u3001MSE\u3001RMSE\u3001MAPE\u3001R\u00b2 \u6307\u6807\u8ba1\u7b97\uff1b<\/li>\n<li>\u7ed3\u679c\u56fe\u81ea\u52a8\u4fdd\u5b58\u3002<\/li>\n<\/ul>\n\n\n\n<h6 class=\"wp-block-heading\">3. <code>_CNNRNN<\/code> \u7c7b<\/h6>\n\n\n\n<p><code>_CNNRNN<\/code> \u662f <code>FunRegCNNRNN.py<\/code> \u5185\u90e8\u5b9a\u4e49\u7684 PyTorch \u7f51\u7edc\u7c7b\uff0c\u7ed3\u6784\u4e3a\uff1a<\/p>\n\n\n\n<pre class=\"wp-block-prismatic-blocks\"><code class=\"language-text\">Conv1d \u2192 ReLU \u2192 \u53ef\u9009 MaxPool1d \u2192 RNN\/LSTM\/GRU \u2192 Linear<\/code><\/pre>\n\n\n\n<p>\u4e00\u822c\u7528\u6237\u4e0d\u9700\u8981\u76f4\u63a5\u8c03\u7528\u8fd9\u4e2a\u7c7b\uff0c\u53ea\u9700\u8981\u901a\u8fc7 <code>FunRegCNNRNN<\/code> \u51fd\u6570\u8bbe\u7f6e\u53c2\u6570\u5373\u53ef\u3002<\/p>\n\n\n\n<h6 class=\"wp-block-heading\">4. <code>EvaRegEffect<\/code> \u51fd\u6570<\/h6>\n\n\n\n<p>\u7528\u4e8e\u8bc4\u4ef7\u56de\u5f52\u9884\u6d4b\u6548\u679c\u7684\u901a\u7528\u51fd\u6570\uff0c\u53ef\u4ee5\u8ba1\u7b97 MAE\u3001MSE\u3001RMSE\u3001MAPE\u3001R\u00b2 \u7b49\u6307\u6807\u3002<\/p>\n\n\n\n<pre class=\"wp-block-prismatic-blocks\"><code class=\"language-python\">def EvaRegEffect(realData, foreData, indNames):\n    &quot;&quot;&quot;\n    \u8f93\u5165\uff1a\n    - realData\uff1a\u771f\u5b9e\u503c\n    - foreData\uff1a\u9884\u6d4b\u503c\n    - indNames\uff1a\u62df\u8ba1\u7b97\u7684\u6307\u6807\u540d\u79f0\u5217\u8868\n\n    \u5f53\u524d\u652f\u6301\uff1a\n    - MAE\u3001MSE\u3001RMSE\u3001MAPE\u3001R2\n\n    \u8f93\u51fa\uff1a\n    - \u6307\u6807\u7ed3\u679c\u6570\u7ec4\uff0c\u5176\u987a\u5e8f\u4e0e indNames \u4e00\u4e00\u5bf9\u5e94\n    &quot;&quot;&quot;<\/code><\/pre>\n\n\n\n<p>\u4f8b\u5982\uff1a<\/p>\n\n\n\n<pre class=\"wp-block-prismatic-blocks\"><code class=\"language-python\">indNames = [&#039;MAE&#039;, &#039;MSE&#039;, &#039;RMSE&#039;, &#039;MAPE&#039;, &#039;R2&#039;]\nind = EvaRegEffect(realData, foreData, indNames)<\/code><\/pre>\n\n\n\n<h6 class=\"wp-block-heading\">5. <code>housing.txt<\/code> \u6587\u4ef6<\/h6>\n\n\n\n<p>\u6ce2\u58eb\u987f\u623f\u4ef7\u6f14\u793a\u6570\u636e\u96c6\uff0c\u5171 506 \u6761\u6837\u672c\u3002\u524d 13 \u5217\u4e3a\u8f93\u5165\u7279\u5f81\uff0c\u7b2c 14 \u5217\u4e3a\u623f\u4ef7\u76ee\u6807\u503c\u3002<\/p>\n\n\n\n<h6 class=\"wp-block-heading\">6. <code>requirements.txt<\/code> \u6587\u4ef6<\/h6>\n\n\n\n<p>\u8bb0\u5f55 Python \u4ee3\u7801\u8fd0\u884c\u6240\u9700\u7684\u4e3b\u8981\u4f9d\u8d56\u5305\u3002\u5efa\u8bae\u5728\u65b0\u73af\u5883\u4e2d\u5148\u5b89\u88c5\u4f9d\u8d56\uff0c\u518d\u8fd0\u884c\u6f14\u793a\u811a\u672c\u3002<\/p>\n\n\n\n<h6 class=\"wp-block-heading\">7. <code>figure<\/code> \u6587\u4ef6\u5939<\/h6>\n\n\n\n<p>\u7a0b\u5e8f\u8fd0\u884c\u540e\u81ea\u52a8\u751f\u6210\u7684\u7ed3\u679c\u56fe\u4f1a\u4fdd\u5b58\u5728\u8be5\u6587\u4ef6\u5939\u4e2d\u3002<\/p>\n\n\n\n<h4 class=\"wp-block-heading\">\u4e09\u3001\u5feb\u901f\u5f00\u59cb<\/h4>\n\n\n\n<h6 class=\"wp-block-heading\">1. \u73af\u5883\u914d\u7f6e<\/h6>\n\n\n\n<p>\u63a8\u8350\u4f7f\u7528 Anaconda \u521b\u5efa Python 3.11 \u73af\u5883\uff0c\u7136\u540e\u5b89\u88c5 PyTorch\u3001NumPy\u3001Matplotlib\u3001scikit-learn \u7b49\u4f9d\u8d56\u3002<\/p>\n\n\n\n<p>\u5982\u679c\u4f7f\u7528 CPU \u8fd0\u884c\uff0c\u53ef\u4ee5\u76f4\u63a5\u5b89\u88c5 CPU \u7248 PyTorch\u3002\u82e5\u4f7f\u7528 GPU\uff0c\u8bf7\u6839\u636e CUDA \u7248\u672c\u5b89\u88c5\u5bf9\u5e94\u7684 PyTorch\u3002<\/p>\n\n\n\n<p>\u5728\u4ee3\u7801\u76ee\u5f55\u4e2d\u53ef\u5148\u5c1d\u8bd5\uff1a<\/p>\n\n\n\n<pre class=\"wp-block-prismatic-blocks\"><code class=\"language-bash\">pip install -r requirements.txt<\/code><\/pre>\n\n\n\n<p>\u5982\u679c\u73af\u5883\u4e2d\u7f3a\u5c11\u67d0\u4e9b\u5305\uff0c\u6309\u62a5\u9519\u63d0\u793a\u8865\u88c5\u5373\u53ef\u3002<\/p>\n\n\n\n<h6 class=\"wp-block-heading\">2. \u8fd0\u884c\u6d4b\u8bd5\u811a\u672c<\/h6>\n\n\n\n<p>\u5148\u5728 VSCode \u6216\u547d\u4ee4\u884c\u4e2d\u6253\u5f00\u4e0b\u8f7d\u597d\u7684\u6587\u4ef6\u5939\uff0c\u8fdb\u5165 Python \u4ee3\u7801\u76ee\u5f55\uff1a<\/p>\n\n\n\n<pre class=\"wp-block-prismatic-blocks\"><code class=\"language-bash\">cd Python\/CNN_RNN_Regression\npython demoCNNRNN_Regression.py<\/code><\/pre>\n\n\n\n<p>\u7a0b\u5e8f\u8fd0\u884c\u5b8c\u6bd5\u540e\uff0c\u5982\u679c\u6ca1\u6709\u62a5\u9519\uff0c\u5e76\u4e14 <code>figure<\/code> \u6587\u4ef6\u5939\u4e2d\u6b63\u5e38\u751f\u6210\u4e0a\u8ff0 5 \u5f20\u56fe\u50cf\uff0c\u5219\u8bf4\u660e\u8fd0\u884c\u73af\u5883\u6b63\u5e38\uff0c\u7a0b\u5e8f\u53ef\u4ee5\u4f7f\u7528\u3002<\/p>\n\n\n\n<h6 class=\"wp-block-heading\">3. \u66ff\u6362\u6210\u4f60\u81ea\u5df1\u7684\u6570\u636e<\/h6>\n\n\n\n<p>\u590d\u5236\u4e00\u4efd <code>demoCNNRNN_Regression.py<\/code>\uff0c\u5728\u526f\u672c\u4e2d\u4fee\u6539\u7b2c\u4e00\u90e8\u5206\u7684\u6570\u636e\u5bfc\u5165\u4ee3\u7801\u3002<\/p>\n\n\n\n<p>\u6f14\u793a\u6848\u4f8b\u4e2d\u4f7f\u7528\u7684\u662f\uff1a<\/p>\n\n\n\n<pre class=\"wp-block-prismatic-blocks\"><code class=\"language-python\">data = np.loadtxt(&#039;housing.txt&#039;)\nX = data[:, :13]\nY = data[:, 13]<\/code><\/pre>\n\n\n\n<p>\u66ff\u6362\u6210\u81ea\u5df1\u7684\u6570\u636e\u65f6\uff0c\u9700\u8981\u6574\u7406\u51fa\u4e24\u4e2a\u53d8\u91cf\uff1a<\/p>\n\n\n\n<pre class=\"wp-block-prismatic-blocks\"><code class=\"language-python\">X = ...   # \u8f93\u5165\u6570\u636e\uff0c\u5f62\u72b6\u4e3a [\u6837\u672c\u6570, \u6709\u5e8f\u5e8f\u5217\u957f\u5ea6]\nY = ...   # \u8f93\u51fa\u76ee\u6807\uff0c\u5f62\u72b6\u4e3a [\u6837\u672c\u6570,]<\/code><\/pre>\n\n\n\n<p>\u6ce8\u610f\uff0c<code>X<\/code> \u7684\u5217\u65b9\u5411\u4f1a\u88ab\u7a0b\u5e8f\u5f53\u4f5c\u4e00\u7ef4\u5e8f\u5217\u3002\u82e5\u4f60\u7684\u6570\u636e\u662f\u65f6\u95f4\u5e8f\u5217\u9884\u6d4b\u4efb\u52a1\uff0c\u5efa\u8bae\u5148\u5728\u5916\u90e8\u6784\u9020\u6ed1\u52a8\u7a97\u53e3\uff0c\u518d\u628a\u6bcf\u4e2a\u7a97\u53e3\u4f5c\u4e3a\u4e00\u884c\u8f93\u5165\u3002<\/p>\n\n\n\n<h6 class=\"wp-block-heading\">4. \u8c03\u6574\u7f51\u7edc\u4e0e\u8bad\u7ec3\u53c2\u6570<\/h6>\n\n\n\n<p>\u53c2\u7167\u811a\u672c\u6587\u4ef6\u4e2d <code>options<\/code> \u5b57\u5178\uff0c\u6839\u636e\u9700\u8981\u8c03\u6574\u76f8\u5173\u53c2\u6570\u3002\u4f8b\u5982\uff1a<\/p>\n\n\n\n<pre class=\"wp-block-prismatic-blocks\"><code class=\"language-python\">options[&#039;networkType&#039;] = &#039;LSTM&#039;\noptions[&#039;convChannels&#039;] = 16\noptions[&#039;kernelSize&#039;] = 3\noptions[&#039;poolSize&#039;] = 2\noptions[&#039;rnnHidden&#039;] = 32\noptions[&#039;epochs&#039;] = 150\noptions[&#039;lr&#039;] = 0.01\noptions[&#039;batchSize&#039;] = 32\noptions[&#039;seed&#039;] = 42<\/code><\/pre>\n\n\n\n<p>\u5982\u679c\u60f3\u6bd4\u8f83\u4e0d\u540c\u5faa\u73af\u7ed3\u6784\uff0c\u53ea\u9700\u4fee\u6539 <code>networkType<\/code>\uff0c\u5e76\u5728\u76f8\u540c\u6570\u636e\u5212\u5206\u4e0b\u6bd4\u8f83\u9a8c\u8bc1\u96c6\u548c\u6d4b\u8bd5\u96c6\u6307\u6807\u3002<\/p>\n\n\n\n<h6 class=\"wp-block-heading\">5. \u8fd0\u884c\u7a0b\u5e8f<\/h6>\n\n\n\n<p>\u6570\u636e\u5bfc\u5165\u548c\u53c2\u6570\u8bbe\u7f6e\u5b8c\u6210\u540e\uff0c\u8fd0\u884c\u811a\u672c\u5373\u53ef\u3002\u7a0b\u5e8f\u4f1a\u81ea\u52a8\u8bad\u7ec3\u6a21\u578b\u3001\u751f\u6210\u9884\u6d4b\u7ed3\u679c\u3001\u8ba1\u7b97\u8bc4\u4ef7\u6307\u6807\u5e76\u4fdd\u5b58\u7ed3\u679c\u56fe\u3002<\/p>\n\n\n\n<p>\u5269\u4e0b\u7684\u4e3b\u8981\u5de5\u4f5c\u5c31\u662f\u8c03\u53c2\u3002\u8c03\u53c2\u901a\u5e38\u9700\u8981\u4e00\u5b9a\u8010\u5fc3\uff0c\u5efa\u8bae\u6bcf\u6b21\u53ea\u6539\u5c11\u91cf\u53c2\u6570\uff0c\u5e76\u8bb0\u5f55\u9a8c\u8bc1\u96c6\u548c\u6d4b\u8bd5\u96c6\u6307\u6807\u53d8\u5316\u3002<\/p>\n\n\n\n<h4 class=\"wp-block-heading\">\u56db\u3001\u5173\u4e8e\u5b8c\u6574\u7248\u4e0e\u516c\u5f00\u7248\u4ee3\u7801<\/h4>\n\n\n\n<figure class=\"wp-block-table\"><table>\n<thead>\n<tr>\n<th style=\"text-align:left\">\u529f\u80fd<\/th>\n<th style=\"text-align:center\">\u5b8c\u6574\u7248<\/th>\n<th style=\"text-align:center\">\u516c\u5f00\u7248<\/th>\n<\/tr>\n<\/thead>\n<tbody>\n<tr>\n<td style=\"text-align:left\">\u6570\u636e\u5bfc\u5165\u3001\u53c2\u6570\u8bbe\u7f6e<\/td>\n<td style=\"text-align:center\">\u221a<\/td>\n<td style=\"text-align:center\">\u221a<\/td>\n<\/tr>\n<tr>\n<td style=\"text-align:left\">\u8f6f\u4ef6\u5168\u90e8\u6e90\u7801\uff08py \u6587\u4ef6\uff09<\/td>\n<td style=\"text-align:center\">\u221a<\/td>\n<td style=\"text-align:center\">\u00d7<\/td>\n<\/tr>\n<tr>\n<td style=\"text-align:left\">\u6838\u5fc3\u51fd\u6570\u52a0\u5bc6<\/td>\n<td style=\"text-align:center\">\u00d7<\/td>\n<td style=\"text-align:center\">\u221a\uff0c\u6838\u5fc3\u51fd\u6570\u4e3a <code>.pyd<\/code> \u6587\u4ef6<\/td>\n<\/tr>\n<tr>\n<td style=\"text-align:left\">\u6570\u636e\u957f\u5ea6\u9650\u5236<\/td>\n<td style=\"text-align:center\">\u65e0\u9650\u5236<\/td>\n<td style=\"text-align:center\">100 \u4e2a\u6837\u672c\u4ee5\u5185<\/td>\n<\/tr>\n<tr>\n<td style=\"text-align:left\">\u7ed3\u679c\u56fe\u6c34\u5370<\/td>\n<td style=\"text-align:center\">\u65e0\u6c34\u5370<\/td>\n<td style=\"text-align:center\">\u6709\u201c\u8bd5\u7528\u7248@khsci.com\/docs\u201d\u6c34\u5370<\/td>\n<\/tr>\n<tr>\n<td style=\"text-align:left\">\u81ea\u52a8\u7ed8\u5236\u8bad\u7ec3\u96c6\/\u6d4b\u8bd5\u96c6\u9884\u6d4b\u56fe<\/td>\n<td style=\"text-align:center\">\u221a<\/td>\n<td style=\"text-align:center\">\u221a<\/td>\n<\/tr>\n<tr>\n<td style=\"text-align:left\">\u81ea\u52a8\u7ed8\u5236\u6563\u70b9\u56fe\u3001\u6307\u6807\u56fe\u3001\u635f\u5931\u66f2\u7ebf<\/td>\n<td style=\"text-align:center\">\u221a<\/td>\n<td style=\"text-align:center\">\u221a<\/td>\n<\/tr>\n<tr>\n<td style=\"text-align:left\">\u652f\u6301 RNN\/LSTM\/BiLSTM\/GRU\/BiGRU \u5207\u6362<\/td>\n<td style=\"text-align:center\">\u221a<\/td>\n<td style=\"text-align:center\">\u221a<\/td>\n<\/tr>\n<tr>\n<td style=\"text-align:left\">\u5bfc\u51fa\u6d4b\u8bd5\u96c6\u9884\u6d4b\u7ed3\u679c\u3001\u8bad\u7ec3\u96c6\u9884\u6d4b\u7ed3\u679c\u3001\u6a21\u578b\u548c\u8bad\u7ec3\u4fe1\u606f<\/td>\n<td style=\"text-align:center\">\u221a<\/td>\n<td style=\"text-align:center\">\u53d7\u9650<\/td>\n<\/tr>\n<tr>\n<td style=\"text-align:left\">\u4fee\u6539\u6838\u5fc3\u7b97\u6cd5\u7ec6\u8282<\/td>\n<td style=\"text-align:center\">\u221a<\/td>\n<td style=\"text-align:center\">\u00d7<\/td>\n<\/tr>\n<\/tbody>\n<\/table><\/figure>\n\n\n\n<p>\u516c\u5f00\u7248\u968f\u5305 <code>housing.txt<\/code> \u56fa\u5b9a\u4e3a 100 \u6761\u6837\u672c\uff0c\u4e3b\u8981\u7528\u4e8e\u9a8c\u8bc1\u8fd0\u884c\u73af\u5883\u548c\u8c03\u7528\u6d41\u7a0b\u3002\u5b8c\u6574\u7248\u4e0d\u9650\u5236\u6837\u672c\u6570\uff0c\u4e14\u5305\u542b\u53ef\u7f16\u8f91\u6e90\u7801\u3002<\/p>\n\n\n\n<h4 class=\"wp-block-heading\">\u4e94\u3001\u83b7\u53d6\u516c\u5f00\u7248\u7a0b\u5e8f\uff08\u9700\u4f7f\u7528\u7535\u8111\u6d4f\u89c8\u5668\u6253\u5f00\uff09<\/h4>\n\n\n\n<p>\u516c\u5f00\u7248\u7a0b\u5e8f\u53ef\u4ee5\u76f4\u63a5\u4e0b\u8f7d\uff0c\u7528\u4e8e\u6d4b\u8bd5\u8fd0\u884c\u73af\u5883\u548c\u4f53\u9a8c\u5b8c\u6574\u8c03\u7528\u6d41\u7a0b\u3002<\/p>\n\n\n\n<blockquote class=\"wp-block-quote\">\n<p><strong>\u516c\u5f00\u7248\u4e0b\u8f7d\uff1a<\/strong><br>\n<a href=\"https:\/\/khsci.com\/docs\/wp-content\/uploads\/2026\/07\/CNN_RNN_Regression_Python_%E8%AF%95%E7%94%A8%E7%89%88_V26z8k8c6.zip\">\u70b9\u51fb\u6b64\u5904\u4e0b\u8f7d CNN-RNN \u6df7\u5408\u56de\u5f52\u9884\u6d4b Python \u516c\u5f00\u7248\u4ee3\u7801<\/a><\/p>\n<\/blockquote>\n\n\n\n<p>\u6ce8\uff1a\u516c\u5f00\u7248\u4ee3\u7801\u5efa\u8bae\u4f7f\u7528 Python 3.11 \u7248\u672c\u7684 conda \u73af\u5883\u3002\u516c\u5f00\u7248\u9650\u5236\u4e3a 100 \u4e2a\u6837\u672c\u4ee5\u5185\uff0c\u751f\u6210\u56fe\u7247\u5e26\u6c34\u5370\uff0c\u6838\u5fc3\u51fd\u6570\u5df2\u52a0\u5bc6\u3002<\/p>\n\n\n\n<h4 class=\"wp-block-heading\">\u516d\u3001\u83b7\u53d6\u5b8c\u6574\u7248\u7a0b\u5e8f\uff08\u4f7f\u7528\u7535\u8111\u6d4f\u89c8\u5668\u6216\u8005\u624b\u673a\u6d4f\u89c8\u5668\u6253\u5f00\uff09<\/h4>\n\n\n\n<p>\u70b9\u51fb\u4e0b\u9762\u201c\u7acb\u5373\u652f\u4ed8\u201d\u6309\u94ae\uff0c\u4ed8\u6b3e\u540e\u83b7\u53d6\u5b8c\u6574\u7248\u4ee3\u7801\u4e0b\u8f7d\u94fe\u63a5\u548c\u552e\u540e\u8054\u7cfb\u65b9\u5f0f\u3002\u4ed8\u6b3e\u5b8c\u6210\u540e\u5237\u65b0\u4e00\u4e0b\u672c\u9875\u9762\u5373\u53ef\u770b\u5230\u4e0b\u8f7d\u94fe\u63a5\u3002<\/p>\n\n\n\n<p>\uff08\u6ce8\u610f\u652f\u4ed8\u8df3\u8f6c\u5931\u8d25\u7684\u8bdd\uff0c\u8bf7\u4f7f\u7528\u6d4f\u89c8\u5668\u6253\u5f00\u672c\u9875\u9762\uff09<\/p>\n\n\n<p><div class=\"erphp-wppay\">\n\t\t\t\t\u60a8\u9700\u8981\u5148\u652f\u4ed8 <b>69.5\u5143<\/b> \u624d\u80fd\u67e5\u770b\u6b64\u5904\u5185\u5bb9\uff01<a href=\"javascript:;\" class=\"erphp-wppay-loader\" data-post=\"3871\">\u7acb\u5373\u652f\u4ed8<\/a>\n\t\t\t<\/div><\/p>\n\n\n\n<h4 class=\"wp-block-heading\">\u4e03\u3001\u5b8c\u6574\u7248\u4ee3\u7801\u91cd\u8981\u66f4\u65b0<\/h4>\n\n\n\n<p>20260621 \u5b8c\u6210\u521d\u7248\u4ee3\u7801\u3002<\/p>\n\n\n\n<h4 class=\"wp-block-heading\">\u516b\u3001\u5e38\u89c1\u95ee\u9898<\/h4>\n\n\n\n<h6 class=\"wp-block-heading\">Q1\uff1a\u62a5\u9519 <code>ModuleNotFoundError<\/code> \u600e\u4e48\u529e\uff1f<\/h6>\n\n\n\n<p>\u8bf4\u660e\u5f53\u524d\u73af\u5883\u7f3a\u5c11\u5bf9\u5e94\u4f9d\u8d56\u5305\u3002\u53ef\u5148\u6267\u884c\uff1a<\/p>\n\n\n\n<pre class=\"wp-block-prismatic-blocks\"><code class=\"language-bash\">pip install -r requirements.txt<\/code><\/pre>\n\n\n\n<p>\u5982\u679c\u4ecd\u6709\u7f3a\u5931\u5305\uff0c\u518d\u6839\u636e\u62a5\u9519\u63d0\u793a\u5355\u72ec\u5b89\u88c5\u3002<\/p>\n\n\n\n<h6 class=\"wp-block-heading\">Q2\uff1a\u6ca1\u6709 GPU \u80fd\u4e0d\u80fd\u8fd0\u884c\uff1f<\/h6>\n\n\n\n<p>\u53ef\u4ee5\u3002\u7a0b\u5e8f\u4f1a\u81ea\u52a8\u68c0\u6d4b\u5f53\u524d\u73af\u5883\uff0cGPU \u4e0d\u53ef\u7528\u65f6\u4f1a\u4f7f\u7528 CPU \u8fd0\u884c\u3002\u53ea\u662f\u8bad\u7ec3\u901f\u5ea6\u53ef\u80fd\u6162\u4e00\u4e9b\u3002<\/p>\n\n\n\n<h6 class=\"wp-block-heading\">Q3\uff1a\u8fd9\u4e2a\u7a0b\u5e8f\u662f\u4e0d\u662f\u53ea\u80fd\u505a\u65f6\u95f4\u5e8f\u5217\u9884\u6d4b\uff1f<\/h6>\n\n\n\n<p>\u4e0d\u662f\u3002\u5b83\u672c\u8d28\u4e0a\u662f\u201c\u6709\u5e8f\u4e00\u7ef4\u8f93\u5165\u5230\u8fde\u7eed\u6570\u503c\u8f93\u51fa\u201d\u7684\u56de\u5f52\u9884\u6d4b\u7a0b\u5e8f\u3002\u53ea\u6709\u5f53\u8f93\u5165\u884c\u8868\u793a\u5386\u53f2\u65f6\u95f4\u7a97\u53e3\uff0c\u5e76\u4e14\u76ee\u6807\u503c\u8868\u793a\u672a\u6765\u67d0\u4e00\u65f6\u523b\u65f6\uff0c\u624d\u5c5e\u4e8e\u65f6\u95f4\u5e8f\u5217\u9884\u6d4b\u3002\u5149\u8c31\u4f30\u8ba1\u3001\u4f20\u611f\u5668\u5e8f\u5217\u56de\u5f52\u7b49\u4efb\u52a1\u4e5f\u53ef\u4ee5\u4f7f\u7528\u3002<\/p>\n\n\n\n<h6 class=\"wp-block-heading\">Q4\uff1a\u6211\u60f3\u6362\u6210\u81ea\u5df1\u7684\u6570\u636e\uff0c\u6700\u5c11\u9700\u8981\u6539\u54ea\u91cc\uff1f<\/h6>\n\n\n\n<p>\u6700\u5c11\u53ea\u9700\u8981\u6539 <code>demoCNNRNN_Regression.py<\/code> \u4e2d\u7684\u6570\u636e\u5bfc\u5165\u90e8\u5206\uff0c\u628a\u81ea\u5df1\u7684\u8f93\u5165\u6574\u7406\u4e3a <code>X<\/code>\uff0c\u8f93\u51fa\u6574\u7406\u4e3a <code>Y<\/code>\uff0c\u7136\u540e\u6839\u636e\u9700\u8981\u8c03\u6574 <code>options<\/code> \u53c2\u6570\u3002<\/p>\n\n","protected":false},"excerpt":{"rendered":"<p>\u4f7f\u7528\u6ce2\u58eb\u987f\u623f\u4ef7\u9884\u6d4b\u4f5c\u4e3a\u6f14\u793a\u6848\u4f8b\u3002 \u53ef\u4ee5\u8bbe\u7f6e CNN \u5377\u79ef\u901a\u9053\u6570\u3001\u5377\u79ef\u6838\u5bbd\u5ea6\u3001\u6700\u5927\u6c60\u5316\u7a97\u53e3\u7b49\u7ed3\u6784\u53c2\u6570\u3002 \u53ef\u4ee5\u5728  [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v20.13 - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>CNN-RNN\u6df7\u5408\u56de\u5f52\u9884\u6d4bPython\u4ee3\u7801 - \u5de5\u5177\u7bb1\u6587\u6863<\/title>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/www.khsci.com\/docs\/index.php\/2026\/07\/05\/cnn-rnn-regression-python\/\" \/>\n<meta property=\"og:locale\" content=\"zh_CN\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"CNN-RNN\u6df7\u5408\u56de\u5f52\u9884\u6d4bPython\u4ee3\u7801 - \u5de5\u5177\u7bb1\u6587\u6863\" \/>\n<meta property=\"og:description\" content=\"\u4f7f\u7528\u6ce2\u58eb\u987f\u623f\u4ef7\u9884\u6d4b\u4f5c\u4e3a\u6f14\u793a\u6848\u4f8b\u3002 \u53ef\u4ee5\u8bbe\u7f6e CNN \u5377\u79ef\u901a\u9053\u6570\u3001\u5377\u79ef\u6838\u5bbd\u5ea6\u3001\u6700\u5927\u6c60\u5316\u7a97\u53e3\u7b49\u7ed3\u6784\u53c2\u6570\u3002 \u53ef\u4ee5\u5728 [&hellip;]\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.khsci.com\/docs\/index.php\/2026\/07\/05\/cnn-rnn-regression-python\/\" \/>\n<meta property=\"og:site_name\" content=\"\u5de5\u5177\u7bb1\u6587\u6863\" \/>\n<meta property=\"article:published_time\" content=\"2026-07-05T15:11:43+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2026-07-05T16:06:19+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/khsci.com\/docs\/wp-content\/uploads\/2026\/07\/CNN_RNN_Regression_Python_fig1.png\" \/>\n<meta name=\"author\" content=\"kuohao\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"\u4f5c\u8005\" \/>\n\t<meta name=\"twitter:data1\" content=\"kuohao\" \/>\n\t<meta name=\"twitter:label2\" content=\"\u9884\u8ba1\u9605\u8bfb\u65f6\u95f4\" \/>\n\t<meta name=\"twitter:data2\" content=\"2 \u5206\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\/\/www.khsci.com\/docs\/index.php\/2026\/07\/05\/cnn-rnn-regression-python\/#article\",\"isPartOf\":{\"@id\":\"https:\/\/www.khsci.com\/docs\/index.php\/2026\/07\/05\/cnn-rnn-regression-python\/\"},\"author\":{\"name\":\"kuohao\",\"@id\":\"https:\/\/www.khsci.com\/docs\/#\/schema\/person\/44b1dc94a273203f641349de36ebc0a5\"},\"headline\":\"CNN-RNN\u6df7\u5408\u56de\u5f52\u9884\u6d4bPython\u4ee3\u7801\",\"datePublished\":\"2026-07-05T15:11:43+00:00\",\"dateModified\":\"2026-07-05T16:06:19+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\/\/www.khsci.com\/docs\/index.php\/2026\/07\/05\/cnn-rnn-regression-python\/\"},\"wordCount\":102,\"commentCount\":0,\"publisher\":{\"@id\":\"https:\/\/www.khsci.com\/docs\/#\/schema\/person\/44b1dc94a273203f641349de36ebc0a5\"},\"inLanguage\":\"zh-Hans\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\/\/www.khsci.com\/docs\/index.php\/2026\/07\/05\/cnn-rnn-regression-python\/#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\/\/www.khsci.com\/docs\/index.php\/2026\/07\/05\/cnn-rnn-regression-python\/\",\"url\":\"https:\/\/www.khsci.com\/docs\/index.php\/2026\/07\/05\/cnn-rnn-regression-python\/\",\"name\":\"CNN-RNN\u6df7\u5408\u56de\u5f52\u9884\u6d4bPython\u4ee3\u7801 - \u5de5\u5177\u7bb1\u6587\u6863\",\"isPartOf\":{\"@id\":\"https:\/\/www.khsci.com\/docs\/#website\"},\"datePublished\":\"2026-07-05T15:11:43+00:00\",\"dateModified\":\"2026-07-05T16:06:19+00:00\",\"breadcrumb\":{\"@id\":\"https:\/\/www.khsci.com\/docs\/index.php\/2026\/07\/05\/cnn-rnn-regression-python\/#breadcrumb\"},\"inLanguage\":\"zh-Hans\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/www.khsci.com\/docs\/index.php\/2026\/07\/05\/cnn-rnn-regression-python\/\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/www.khsci.com\/docs\/index.php\/2026\/07\/05\/cnn-rnn-regression-python\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"\u9996\u9875\",\"item\":\"https:\/\/www.khsci.com\/docs\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"CNN-RNN\u6df7\u5408\u56de\u5f52\u9884\u6d4bPython\u4ee3\u7801\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/www.khsci.com\/docs\/#website\",\"url\":\"https:\/\/www.khsci.com\/docs\/\",\"name\":\"\u5de5\u5177\u7bb1\u6587\u6863\",\"description\":\"khToolbox\",\"publisher\":{\"@id\":\"https:\/\/www.khsci.com\/docs\/#\/schema\/person\/44b1dc94a273203f641349de36ebc0a5\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/www.khsci.com\/docs\/?s={search_term_string}\"},\"query-input\":\"required name=search_term_string\"}],\"inLanguage\":\"zh-Hans\"},{\"@type\":[\"Person\",\"Organization\"],\"@id\":\"https:\/\/www.khsci.com\/docs\/#\/schema\/person\/44b1dc94a273203f641349de36ebc0a5\",\"name\":\"kuohao\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"zh-Hans\",\"@id\":\"https:\/\/www.khsci.com\/docs\/#\/schema\/person\/image\/\",\"url\":\"https:\/\/khsci.com\/docs\/wp-content\/uploads\/2022\/11\/logo-1.png\",\"contentUrl\":\"https:\/\/khsci.com\/docs\/wp-content\/uploads\/2022\/11\/logo-1.png\",\"width\":255,\"height\":97,\"caption\":\"kuohao\"},\"logo\":{\"@id\":\"https:\/\/www.khsci.com\/docs\/#\/schema\/person\/image\/\"},\"url\":\"https:\/\/www.khsci.com\/docs\/index.php\/author\/kuohao\/\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"CNN-RNN\u6df7\u5408\u56de\u5f52\u9884\u6d4bPython\u4ee3\u7801 - \u5de5\u5177\u7bb1\u6587\u6863","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/www.khsci.com\/docs\/index.php\/2026\/07\/05\/cnn-rnn-regression-python\/","og_locale":"zh_CN","og_type":"article","og_title":"CNN-RNN\u6df7\u5408\u56de\u5f52\u9884\u6d4bPython\u4ee3\u7801 - \u5de5\u5177\u7bb1\u6587\u6863","og_description":"\u4f7f\u7528\u6ce2\u58eb\u987f\u623f\u4ef7\u9884\u6d4b\u4f5c\u4e3a\u6f14\u793a\u6848\u4f8b\u3002 \u53ef\u4ee5\u8bbe\u7f6e CNN \u5377\u79ef\u901a\u9053\u6570\u3001\u5377\u79ef\u6838\u5bbd\u5ea6\u3001\u6700\u5927\u6c60\u5316\u7a97\u53e3\u7b49\u7ed3\u6784\u53c2\u6570\u3002 \u53ef\u4ee5\u5728 [&hellip;]","og_url":"https:\/\/www.khsci.com\/docs\/index.php\/2026\/07\/05\/cnn-rnn-regression-python\/","og_site_name":"\u5de5\u5177\u7bb1\u6587\u6863","article_published_time":"2026-07-05T15:11:43+00:00","article_modified_time":"2026-07-05T16:06:19+00:00","og_image":[{"url":"https:\/\/khsci.com\/docs\/wp-content\/uploads\/2026\/07\/CNN_RNN_Regression_Python_fig1.png"}],"author":"kuohao","twitter_card":"summary_large_image","twitter_misc":{"\u4f5c\u8005":"kuohao","\u9884\u8ba1\u9605\u8bfb\u65f6\u95f4":"2 \u5206"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/www.khsci.com\/docs\/index.php\/2026\/07\/05\/cnn-rnn-regression-python\/#article","isPartOf":{"@id":"https:\/\/www.khsci.com\/docs\/index.php\/2026\/07\/05\/cnn-rnn-regression-python\/"},"author":{"name":"kuohao","@id":"https:\/\/www.khsci.com\/docs\/#\/schema\/person\/44b1dc94a273203f641349de36ebc0a5"},"headline":"CNN-RNN\u6df7\u5408\u56de\u5f52\u9884\u6d4bPython\u4ee3\u7801","datePublished":"2026-07-05T15:11:43+00:00","dateModified":"2026-07-05T16:06:19+00:00","mainEntityOfPage":{"@id":"https:\/\/www.khsci.com\/docs\/index.php\/2026\/07\/05\/cnn-rnn-regression-python\/"},"wordCount":102,"commentCount":0,"publisher":{"@id":"https:\/\/www.khsci.com\/docs\/#\/schema\/person\/44b1dc94a273203f641349de36ebc0a5"},"inLanguage":"zh-Hans","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/www.khsci.com\/docs\/index.php\/2026\/07\/05\/cnn-rnn-regression-python\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/www.khsci.com\/docs\/index.php\/2026\/07\/05\/cnn-rnn-regression-python\/","url":"https:\/\/www.khsci.com\/docs\/index.php\/2026\/07\/05\/cnn-rnn-regression-python\/","name":"CNN-RNN\u6df7\u5408\u56de\u5f52\u9884\u6d4bPython\u4ee3\u7801 - \u5de5\u5177\u7bb1\u6587\u6863","isPartOf":{"@id":"https:\/\/www.khsci.com\/docs\/#website"},"datePublished":"2026-07-05T15:11:43+00:00","dateModified":"2026-07-05T16:06:19+00:00","breadcrumb":{"@id":"https:\/\/www.khsci.com\/docs\/index.php\/2026\/07\/05\/cnn-rnn-regression-python\/#breadcrumb"},"inLanguage":"zh-Hans","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.khsci.com\/docs\/index.php\/2026\/07\/05\/cnn-rnn-regression-python\/"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/www.khsci.com\/docs\/index.php\/2026\/07\/05\/cnn-rnn-regression-python\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"\u9996\u9875","item":"https:\/\/www.khsci.com\/docs\/"},{"@type":"ListItem","position":2,"name":"CNN-RNN\u6df7\u5408\u56de\u5f52\u9884\u6d4bPython\u4ee3\u7801"}]},{"@type":"WebSite","@id":"https:\/\/www.khsci.com\/docs\/#website","url":"https:\/\/www.khsci.com\/docs\/","name":"\u5de5\u5177\u7bb1\u6587\u6863","description":"khToolbox","publisher":{"@id":"https:\/\/www.khsci.com\/docs\/#\/schema\/person\/44b1dc94a273203f641349de36ebc0a5"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/www.khsci.com\/docs\/?s={search_term_string}"},"query-input":"required name=search_term_string"}],"inLanguage":"zh-Hans"},{"@type":["Person","Organization"],"@id":"https:\/\/www.khsci.com\/docs\/#\/schema\/person\/44b1dc94a273203f641349de36ebc0a5","name":"kuohao","image":{"@type":"ImageObject","inLanguage":"zh-Hans","@id":"https:\/\/www.khsci.com\/docs\/#\/schema\/person\/image\/","url":"https:\/\/khsci.com\/docs\/wp-content\/uploads\/2022\/11\/logo-1.png","contentUrl":"https:\/\/khsci.com\/docs\/wp-content\/uploads\/2022\/11\/logo-1.png","width":255,"height":97,"caption":"kuohao"},"logo":{"@id":"https:\/\/www.khsci.com\/docs\/#\/schema\/person\/image\/"},"url":"https:\/\/www.khsci.com\/docs\/index.php\/author\/kuohao\/"}]}},"_links":{"self":[{"href":"https:\/\/www.khsci.com\/docs\/index.php\/wp-json\/wp\/v2\/posts\/3871"}],"collection":[{"href":"https:\/\/www.khsci.com\/docs\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.khsci.com\/docs\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.khsci.com\/docs\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.khsci.com\/docs\/index.php\/wp-json\/wp\/v2\/comments?post=3871"}],"version-history":[{"count":3,"href":"https:\/\/www.khsci.com\/docs\/index.php\/wp-json\/wp\/v2\/posts\/3871\/revisions"}],"predecessor-version":[{"id":3877,"href":"https:\/\/www.khsci.com\/docs\/index.php\/wp-json\/wp\/v2\/posts\/3871\/revisions\/3877"}],"wp:attachment":[{"href":"https:\/\/www.khsci.com\/docs\/index.php\/wp-json\/wp\/v2\/media?parent=3871"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.khsci.com\/docs\/index.php\/wp-json\/wp\/v2\/categories?post=3871"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.khsci.com\/docs\/index.php\/wp-json\/wp\/v2\/tags?post=3871"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}