{"id":10235,"date":"2025-04-18T17:54:23","date_gmt":"2025-04-18T09:54:23","guid":{"rendered":"https:\/\/www.wsisp.com\/helps\/10235.html"},"modified":"2025-04-18T17:54:23","modified_gmt":"2025-04-18T09:54:23","slug":"%e6%98%87%e6%80%9d25%e5%a4%a9%e5%ad%a6%e4%b9%a0%e6%89%93%e5%8d%a1%e8%90%a5%e7%ac%ac1%e5%a4%a9%e5%bf%ab%e9%80%9f%e5%85%a5%e9%97%a8","status":"publish","type":"post","link":"https:\/\/www.wsisp.com\/helps\/10235.html","title":{"rendered":"\u6607\u601d25\u5929\u5b66\u4e60\u6253\u5361\u8425\u7b2c1\u5929|\u5feb\u901f\u5165\u95e8"},"content":{"rendered":"<h2 id=\"articleContentId\">\u6607\u601d25\u5929\u5b66\u4e60\u6253\u5361\u8425\u7b2c1\u5929|\u5feb\u901f\u5165\u95e8<\/h2>\n<p id=\"main-toc\">\u76ee\u5f55<\/p>\n<p id=\"articleContentId-toc\" style=\"margin-left:0px\">\u6607\u601d25\u5929\u5b66\u4e60\u6253\u5361\u8425\u7b2c1\u5929|\u5feb\u901f\u5165\u95e8\u5b9e\u64cd\u6559\u7a0b<\/p>\n<p id=\"%E4%B8%80%E3%80%81MindSpore%E5%86%85%E5%AE%B9%E7%AE%80%E4%BB%8B-toc\" style=\"margin-left:40px\">\u4e00\u3001MindSpore\u5185\u5bb9\u7b80\u4ecb<\/p>\n<p id=\"%E4%B8%BB%E8%A6%81%E7%89%B9%E7%82%B9%EF%BC%9A-toc\" style=\"margin-left:80px\">\u4e3b\u8981\u7279\u70b9&#xff1a;<\/p>\n<p id=\"MindSpore%E7%9A%84%E7%BB%84%E6%88%90%E9%83%A8%E5%88%86%EF%BC%9A-toc\" style=\"margin-left:80px\">MindSpore\u7684\u7ec4\u6210\u90e8\u5206&#xff1a;<\/p>\n<p id=\"%E4%BA%8C%E3%80%81%E5%85%A5%E9%97%A8%E5%AE%9E%E6%93%8D%E6%AD%A5%E9%AA%A4-toc\" style=\"margin-left:40px\">\u4e8c\u3001\u5165\u95e8\u5b9e\u64cd\u6b65\u9aa4<\/p>\n<p id=\"1.%20%E5%AE%89%E8%A3%85%E5%BF%85%E8%A6%81%E7%9A%84%E4%BE%9D%E8%B5%96%E5%8C%85-toc\" style=\"margin-left:80px\">1. \u5b89\u88c5\u5fc5\u8981\u7684\u4f9d\u8d56\u5305<\/p>\n<p id=\"2.%20%E4%B8%8B%E8%BD%BD%E5%B9%B6%E5%A4%84%E7%90%86%E6%95%B0%E6%8D%AE%E9%9B%86-toc\" style=\"margin-left:80px\">2. \u4e0b\u8f7d\u5e76\u5904\u7406\u6570\u636e\u96c6<\/p>\n<p id=\"3.%20%E6%9E%84%E5%BB%BA%E7%BD%91%E7%BB%9C%E6%A8%A1%E5%9E%8B-toc\" style=\"margin-left:80px\">3. \u6784\u5efa\u7f51\u7edc\u6a21\u578b<\/p>\n<p id=\"4.%20%E8%AE%AD%E7%BB%83%E6%A8%A1%E5%9E%8B-toc\" style=\"margin-left:80px\">4. \u8bad\u7ec3\u6a21\u578b<\/p>\n<p id=\"5.%20%E6%B5%8B%E8%AF%95%E6%A8%A1%E5%9E%8B%E6%80%A7%E8%83%BD-toc\" style=\"margin-left:80px\">5. \u6d4b\u8bd5\u6a21\u578b\u6027\u80fd<\/p>\n<p id=\"6.%20%E8%BF%9B%E8%A1%8C%E5%A4%9A%E8%BD%AE%E8%AE%AD%E7%BB%83-toc\" style=\"margin-left:80px\">6. \u8fdb\u884c\u591a\u8f6e\u8bad\u7ec3<\/p>\n<p id=\"7.%20%E7%A4%BA%E4%BE%8B%E8%BE%93%E5%87%BA-toc\" style=\"margin-left:80px\">7. \u793a\u4f8b\u8f93\u51fa<\/p>\n<p id=\"%E6%80%BB%E7%BB%93-toc\" style=\"margin-left:40px\">\u603b\u7ed3<\/p>\n<p id=\"%E5%8D%9A%E4%B8%BBv%EF%BC%9AXiaoMing_Java-toc\" style=\"margin-left:0px\">\u00a0\u535a\u4e3bv&#xff1a;XiaoMing_Java<\/p>\n<p id=\"%C2%A0%E5%8D%9A%E4%B8%BBv%EF%BC%9AXiaoMing_Java-toc\" style=\"margin-left:0px\">\u535a\u4e3bv&#xff1a;XiaoMing_Java<\/p>\n<hr id=\"hr-toc\" \/>\n<\/p>\n<h3 id=\"%E4%B8%80%E3%80%81MindSpore%E5%86%85%E5%AE%B9%E7%AE%80%E4%BB%8B\">\u4e00\u3001MindSpore\u5185\u5bb9\u7b80\u4ecb<\/h3>\n<p>\u672c\u6587\u4e3b\u8981\u662f\u501f\u52a9\u6607\u601d\u5927\u6a21\u578b\u5e73\u53f0\u7684Jupyter\u4e91\u4e0a\u5f00\u53d1\u5b66\u4e60\u6607\u601dMindSpore\u5165\u95e8\u77e5\u8bc6<\/p>\n<p>\u6607\u601dMindSpore\u662f\u4e00\u4e2a\u5168\u573a\u666f\u6df1\u5ea6\u5b66\u4e60\u6846\u67b6&#xff0c;\u65e8\u5728\u5b9e\u73b0\u6613\u5f00\u53d1\u3001\u9ad8\u6548\u6267\u884c\u3001\u5168\u573a\u666f\u7edf\u4e00\u90e8\u7f72\u4e09\u5927\u76ee\u6807\u3002<\/p>\n<p>\u8bbe\u8ba1\u76ee\u6807\u662f\u4f7f\u5f97\u6df1\u5ea6\u5b66\u4e60\u7684\u5f00\u53d1\u53d8\u5f97\u66f4\u52a0\u7b80\u5355\u9ad8\u6548&#xff0c;\u5e76\u63d0\u4f9b\u7edf\u4e00\u7684\u90e8\u7f72\u65b9\u6848\u3002\u5b83\u80fd\u591f\u652f\u6301\u591a\u79cd\u8fd0\u884c\u73af\u5883&#xff0c;\u5305\u62ec\u4e91\u7aef\u3001\u8fb9\u7f18\u548c\u7ec8\u7aef\u8bbe\u5907\u3002<\/p>\n<h4 id=\"%E4%B8%BB%E8%A6%81%E7%89%B9%E7%82%B9%EF%BC%9A\">\u4e3b\u8981\u7279\u70b9&#xff1a;<\/h4>\n<li>\u6613\u5f00\u53d1&#xff1a;MindSpore \u63d0\u4f9b\u4e86\u53cb\u597d\u7684API\u63a5\u53e3&#xff0c;\u4f7f\u5f97\u5f00\u53d1\u8005\u53ef\u4ee5\u5feb\u901f\u4e0a\u624b&#xff0c;\u540c\u65f6\u8c03\u8bd5\u8fc7\u7a0b\u4e5f\u53d8\u5f97\u66f4\u52a0\u76f4\u89c2\u3002<\/li>\n<li>\u9ad8\u6548\u6267\u884c&#xff1a;\u6846\u67b6\u5728\u8ba1\u7b97\u6548\u7387\u3001\u6570\u636e\u9884\u5904\u7406\u548c\u5206\u5e03\u5f0f\u8bad\u7ec3\u65b9\u9762\u8fdb\u884c\u4e86\u4f18\u5316&#xff0c;\u53ef\u4ee5\u5145\u5206\u5229\u7528\u786c\u4ef6\u8d44\u6e90\u3002<\/li>\n<li>\u5168\u573a\u666f\u652f\u6301&#xff1a;\u65e0\u8bba\u662f\u5728\u4e91\u7aef\u8fd8\u662f\u8fb9\u7f18\u8bbe\u5907&#xff0c;\u751a\u81f3\u662f\u5c0f\u578bIoT\u8bbe\u5907&#xff0c;MindSpore\u90fd\u80fd\u63d0\u4f9b\u826f\u597d\u7684\u652f\u6301\u3002<\/li>\n<h4 id=\"MindSpore%E7%9A%84%E7%BB%84%E6%88%90%E9%83%A8%E5%88%86%EF%BC%9A\">MindSpore\u7684\u7ec4\u6210\u90e8\u5206&#xff1a;<\/h4>\n<ul>\n<li>ModelZoo&#xff08;\u6a21\u578b\u5e93&#xff09;&#xff1a;\u63d0\u4f9b\u4e30\u5bcc\u7684\u6df1\u5ea6\u5b66\u4e60\u7b97\u6cd5\u6a21\u578b&#xff0c;\u5f00\u53d1\u8005\u4e5f\u53ef\u4ee5\u8d21\u732e\u81ea\u5df1\u7684\u6a21\u578b\u3002<\/li>\n<li>MindSpore Extend&#xff08;\u6269\u5c55\u5e93&#xff09;&#xff1a;\u652f\u6301\u9886\u57df\u6269\u5c55&#xff0c;\u5982\u56fe\u795e\u7ecf\u7f51\u7edc&#xff08;GNN&#xff09;\u3001\u6df1\u5ea6\u6982\u7387\u7f16\u7a0b\u7b49\u3002<\/li>\n<li>MindSpore Science&#xff08;\u79d1\u5b66\u8ba1\u7b97&#xff09;&#xff1a;\u4e13\u4e3a\u79d1\u5b66\u8ba1\u7b97\u8bbe\u8ba1&#xff0c;\u5305\u542b\u9886\u5148\u7684\u6570\u636e\u96c6\u548c\u9ad8\u7cbe\u5ea6\u6a21\u578b\u3002<\/li>\n<li>MindExpression&#xff08;\u5168\u573a\u666f\u7edf\u4e00API&#xff09;&#xff1a;\u652f\u6301Python\u524d\u7aef\u8868\u8fbe\u4e0e\u7f16\u7a0b\u63a5\u53e3&#xff0c;\u7b80\u5316\u5f00\u53d1\u6d41\u7a0b\u3002<\/li>\n<li>MindSpore Data&#xff08;\u6570\u636e\u5904\u7406\u5c42&#xff09;&#xff1a;\u63d0\u4f9b\u9ad8\u6548\u7684\u6570\u636e\u5904\u7406\u548c\u5e38\u7528\u6570\u636e\u96c6\u52a0\u8f7d\u529f\u80fd\u3002<\/li>\n<li>MindCompiler&#xff08;AI\u7f16\u8bd1\u5668&#xff09;&#xff1a;\u4f18\u5316\u8ba1\u7b97\u56fe&#xff0c;\u652f\u6301\u5404\u79cd\u786c\u4ef6\u52a0\u901f\u3002<\/li>\n<li>MindRT&#xff08;\u8fd0\u884c\u65f6\u7cfb\u7edf&#xff09;&#xff1a;\u5b9e\u73b0\u9ad8\u6548\u7684\u8fd0\u884c\u65f6\u652f\u6301&#xff0c;\u9002\u7528\u4e8e\u4e0d\u540c\u573a\u666f\u3002<\/li>\n<li>MindSpore Insight&#xff08;\u53ef\u89c6\u5316\u8c03\u8bd5\u5de5\u5177&#xff09;&#xff1a;\u63d0\u4f9b\u53ef\u89c6\u5316\u8bad\u7ec3\u76d1\u63a7\u548c\u8c03\u4f18\u80fd\u529b\u3002<\/li>\n<li>MindSpore Armour&#xff08;\u5b89\u5168\u589e\u5f3a\u5e93&#xff09;&#xff1a;\u9488\u5bf9\u4f01\u4e1a\u7ea7\u5e94\u7528\u63d0\u4f9b\u5b89\u5168\u4e0e\u9690\u79c1\u4fdd\u62a4\u529f\u80fd\u3002<\/li>\n<\/ul>\n<p><img loading=\"lazy\" decoding=\"async\" alt=\"\" height=\"494\" src=\"https:\/\/www.wsisp.com\/helps\/wp-content\/uploads\/2025\/04\/20250418095421-6802214d499b1.png\" width=\"976\" \/><\/p>\n<h3 id=\"%E4%BA%8C%E3%80%81%E5%85%A5%E9%97%A8%E5%AE%9E%E6%93%8D%E6%AD%A5%E9%AA%A4\">\u4e8c\u3001\u5165\u95e8\u5b9e\u64cd\u6b65\u9aa4<\/h3>\n<p>\u63a5\u4e0b\u6765&#xff0c;\u6211\u4eec\u5c06\u901a\u8fc7MindSpore\u7684API\u6765\u5feb\u901f\u6784\u5efa\u548c\u8bad\u7ec3\u4e00\u4e2a\u7b80\u5355\u7684\u6df1\u5ea6\u5b66\u4e60\u6a21\u578b\u3002<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" alt=\"\" height=\"770\" src=\"https:\/\/www.wsisp.com\/helps\/wp-content\/uploads\/2025\/04\/20250418095421-6802214d70b7d.png\" width=\"1200\" \/><\/p>\n<h4 id=\"1.%20%E5%AE%89%E8%A3%85%E5%BF%85%E8%A6%81%E7%9A%84%E4%BE%9D%E8%B5%96%E5%8C%85\">1. \u5b89\u88c5\u5fc5\u8981\u7684\u4f9d\u8d56\u5305<\/h4>\n<p>\u9996\u5148&#xff0c;\u5728\u8fdb\u884c\u4efb\u4f55\u5f00\u53d1\u4e4b\u524d&#xff0c;\u60a8\u9700\u8981\u786e\u4fdd\u5df2\u7ecf\u5b89\u88c5\u4e86MindSpore\u53ca\u5176\u76f8\u5173\u4f9d\u8d56\u3002\u53ef\u4ee5\u4f7f\u7528\u4ee5\u4e0b\u547d\u4ee4\u8fdb\u884c\u5b89\u88c5&#xff1a;<\/p>\n<p>pip install mindspore<\/p>\n<p>\u7136\u540e\u6211\u4eec\u5bfc\u5165\u6240\u9700\u7684\u5e93&#xff1a;<\/p>\n<p>import mindspore<br \/>\nfrom mindspore import nn<br \/>\nfrom mindspore.dataset import vision, transforms<br \/>\nfrom mindspore.dataset import MnistDataset<\/p>\n<h4 id=\"2.%20%E4%B8%8B%E8%BD%BD%E5%B9%B6%E5%A4%84%E7%90%86%E6%95%B0%E6%8D%AE%E9%9B%86\">2. \u4e0b\u8f7d\u5e76\u5904\u7406\u6570\u636e\u96c6<\/h4>\n<p>\u5728\u6211\u4eec\u7684\u793a\u4f8b\u4e2d&#xff0c;\u6211\u4eec\u5c06\u4f7f\u7528MNIST\u6570\u636e\u96c6&#xff0c;\u8fd9\u662f\u4e00\u4e2a\u7ecf\u5178\u7684\u624b\u5199\u6570\u5b57\u8bc6\u522b\u6570\u636e\u96c6\u3002\u4e0b\u9762\u662f\u4e0b\u8f7d\u8be5\u6570\u636e\u96c6\u7684\u4ee3\u7801&#xff1a;<\/p>\n<p># \u5bfc\u5165\u4e0b\u8f7d\u5de5\u5177<br \/>\nfrom download import download<\/p>\n<p># \u5b9a\u4e49\u6570\u636e\u96c6\u7684URL<br \/>\nurl &#061; &#034;https:\/\/mindspore-website.obs.cn-north-4.myhuaweicloud.com\/notebook\/datasets\/MNIST_Data.zip&#034;<br \/>\n# \u4e0b\u8f7d\u6570\u636e\u96c6\u5e76\u89e3\u538b<br \/>\npath &#061; download(url, &#034;.\/&#034;, kind&#061;&#034;zip&#034;, replace&#061;True)<\/p>\n<h4 id=\"3.%20%E6%9E%84%E5%BB%BA%E7%BD%91%E7%BB%9C%E6%A8%A1%E5%9E%8B\">3. \u6784\u5efa\u7f51\u7edc\u6a21\u578b<\/h4>\n<p>\u63a5\u4e0b\u6765&#xff0c;\u6211\u4eec\u5b9a\u4e49\u4e00\u4e2a\u7b80\u5355\u7684\u795e\u7ecf\u7f51\u7edc\u6a21\u578b&#xff0c;\u8be5\u6a21\u578b\u7531\u591a\u4e2a\u5168\u8fde\u63a5\u5c42\u548cReLU\u6fc0\u6d3b\u51fd\u6570\u7ec4\u6210&#xff1a;<\/p>\n<p># \u5b9a\u4e49\u6a21\u578b\u7ed3\u6784<br \/>\nclass Network(nn.Cell):<br \/>\n    def __init__(self):<br \/>\n        super().__init__()<br \/>\n        self.flatten &#061; nn.Flatten()  # \u6241\u5e73\u5316\u5c42<br \/>\n        self.dense_relu_sequential &#061; nn.SequentialCell(<br \/>\n            nn.Dense(28*28, 512),  # \u8f93\u5165\u5c42\u5230\u9690\u85cf\u5c42<br \/>\n            nn.ReLU(),              # \u6fc0\u6d3b\u51fd\u6570<br \/>\n            nn.Dense(512, 512),     # \u9690\u85cf\u5c42\u5230\u9690\u85cf\u5c42<br \/>\n            nn.ReLU(),<br \/>\n            nn.Dense(512, 10)       # \u9690\u85cf\u5c42\u5230\u8f93\u51fa\u5c42<br \/>\n        )<\/p>\n<p>    def construct(self, x):<br \/>\n        x &#061; self.flatten(x)          # \u6241\u5e73\u5316\u8f93\u5165\u6570\u636e<br \/>\n        logits &#061; self.dense_relu_sequential(x)  # \u524d\u5411\u4f20\u64ad<br \/>\n        return logits<\/p>\n<p>model &#061; Network()<br \/>\nprint(model)  # \u6253\u5370\u6a21\u578b\u7ed3\u6784<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" alt=\"\" height=\"541\" src=\"https:\/\/www.wsisp.com\/helps\/wp-content\/uploads\/2025\/04\/20250418095421-6802214dbdb42.png\" width=\"683\" \/>\u00a0<\/p>\n<h4 id=\"4.%20%E8%AE%AD%E7%BB%83%E6%A8%A1%E5%9E%8B\">4. \u8bad\u7ec3\u6a21\u578b<\/h4>\n<p>\u63a5\u4e0b\u6765&#xff0c;\u6211\u4eec\u9700\u8981\u5b9a\u4e49\u635f\u5931\u51fd\u6570\u548c\u4f18\u5316\u5668&#xff0c;\u7136\u540e\u7f16\u5199\u8bad\u7ec3\u6b65\u9aa4&#xff1a;<\/p>\n<p># \u5b9e\u4f8b\u5316\u635f\u5931\u51fd\u6570\u548c\u4f18\u5316\u5668<br \/>\nloss_fn &#061; nn.CrossEntropyLoss()  # \u4f7f\u7528\u4ea4\u53c9\u71b5\u635f\u5931<br \/>\noptimizer &#061; nn.SGD(model.trainable_params(), learning_rate&#061;1e-2)  # Stochastic Gradient Descent<\/p>\n<p># \u5b9a\u4e49\u524d\u5411\u4f20\u64ad\u51fd\u6570<br \/>\ndef forward_fn(data, label):<br \/>\n    logits &#061; model(data)  # \u6a21\u578b\u9884\u6d4b<br \/>\n    loss &#061; loss_fn(logits, label)  # \u8ba1\u7b97\u635f\u5931<br \/>\n    return loss, logits<\/p>\n<p># \u83b7\u53d6\u68af\u5ea6\u51fd\u6570<br \/>\ngrad_fn &#061; mindspore.value_and_grad(forward_fn, None, optimizer.parameters, has_aux&#061;True)<\/p>\n<p># \u5b9a\u4e49\u5355\u6b65\u8bad\u7ec3\u51fd\u6570<br \/>\ndef train_step(data, label):<br \/>\n    (loss, _), grads &#061; grad_fn(data, label)  # \u8ba1\u7b97\u635f\u5931\u548c\u68af\u5ea6<br \/>\n    optimizer(grads)  # \u66f4\u65b0\u53c2\u6570<br \/>\n    return loss<\/p>\n<p>def train(model, dataset):<br \/>\n    size &#061; dataset.get_dataset_size()  # \u6570\u636e\u96c6\u5927\u5c0f<br \/>\n    model.set_train()  # \u8bbe\u7f6e\u6a21\u578b\u4e3a\u8bad\u7ec3\u6a21\u5f0f<br \/>\n    for batch, (data, label) in enumerate(dataset.create_tuple_iterator()):<br \/>\n        loss &#061; train_step(data, label)  # \u5355\u6b65\u8bad\u7ec3<\/p>\n<p>        if batch % 100 &#061;&#061; 0:<br \/>\n            loss, current &#061; loss.asnumpy(), batch  # \u8f6c\u6362\u4e3anumpy\u683c\u5f0f<br \/>\n            print(f&#034;loss: {loss:&gt;7f}  [{current:&gt;3d}\/{size:&gt;3d}]&#034;)<\/p>\n<h4 id=\"5.%20%E6%B5%8B%E8%AF%95%E6%A8%A1%E5%9E%8B%E6%80%A7%E8%83%BD\">5. \u6d4b\u8bd5\u6a21\u578b\u6027\u80fd<\/h4>\n<p>\u7f16\u5199\u6d4b\u8bd5\u51fd\u6570\u4ee5\u8bc4\u4f30\u6a21\u578b\u5728\u6d4b\u8bd5\u96c6\u4e0a\u7684\u8868\u73b0&#xff1a;<\/p>\n<p>def test(model, dataset, loss_fn):<br \/>\n    num_batches &#061; dataset.get_dataset_size()  # \u6d4b\u8bd5\u96c6\u5927\u5c0f<br \/>\n    model.set_train(False)  # \u8bbe\u7f6e\u6a21\u578b\u4e3a\u8bc4\u4f30\u6a21\u5f0f<br \/>\n    total, test_loss, correct &#061; 0, 0, 0<br \/>\n    for data, label in dataset.create_tuple_iterator():<br \/>\n        pred &#061; model(data)  # \u6a21\u578b\u9884\u6d4b<br \/>\n        total &#043;&#061; len(data)  # \u7d2f\u8ba1\u6837\u672c\u6570<br \/>\n        test_loss &#043;&#061; loss_fn(pred, label).asnumpy()  # \u8ba1\u7b97\u603b\u635f\u5931<br \/>\n        correct &#043;&#061; (pred.argmax(1) &#061;&#061; label).asnumpy().sum()  # \u8ba1\u7b97\u6b63\u786e\u9884\u6d4b\u6570<br \/>\n    test_loss \/&#061; num_batches  # \u5e73\u5747\u635f\u5931<br \/>\n    correct \/&#061; total  # \u6b63\u786e\u7387<br \/>\n    print(f&#034;Test: \\\\n Accuracy: {(100*correct):&gt;0.1f}%, Avg loss: {test_loss:&gt;8f} \\\\n&#034;)<\/p>\n<h4 id=\"6.%20%E8%BF%9B%E8%A1%8C%E5%A4%9A%E8%BD%AE%E8%AE%AD%E7%BB%83\">6. \u8fdb\u884c\u591a\u8f6e\u8bad\u7ec3<\/h4>\n<p>\u8bad\u7ec3\u8fc7\u7a0b\u9700\u8981\u591a\u6b21\u8fed\u4ee3\u6570\u636e\u96c6&#xff0c;\u4e00\u6b21\u5b8c\u6574\u7684\u8fed\u4ee3\u79f0\u4e3a\u4e00\u8f6e&#xff08;epoch&#xff09;\u3002\u53ef\u4ee5\u4f7f\u7528\u5982\u4e0b\u4ee3\u7801\u8fdb\u884c\u8bad\u7ec3\u548c\u6d4b\u8bd5&#xff1a;<\/p>\n<p>epochs &#061; 3  # \u8bbe\u7f6e\u8bad\u7ec3\u8f6e\u6570<br \/>\nfor t in range(epochs):<br \/>\n    print(f&#034;Epoch {t&#043;1}\\\\n&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-&#034;)<br \/>\n    train(model, train_dataset)  # \u8bad\u7ec3<br \/>\n    test(model, test_dataset, loss_fn)  # \u6d4b\u8bd5\u7ed3\u679c<br \/>\nprint(&#034;Done!&#034;)<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" alt=\"\" height=\"531\" src=\"https:\/\/www.wsisp.com\/helps\/wp-content\/uploads\/2025\/04\/20250418095421-6802214dd1cd2.png\" width=\"511\" \/>\u00a0<\/p>\n<h4 id=\"7.%20%E7%A4%BA%E4%BE%8B%E8%BE%93%E5%87%BA\">7. \u793a\u4f8b\u8f93\u51fa<\/h4>\n<p>\u5728\u6bcf\u4e00\u8f6e\u8bad\u7ec3\u540e&#xff0c;\u60a8\u5c06\u4f1a\u770b\u5230\u5982\u4e0b\u8f93\u51fa&#xff1a;<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" alt=\"\" height=\"145\" src=\"https:\/\/www.wsisp.com\/helps\/wp-content\/uploads\/2025\/04\/20250418095421-6802214de4681.png\" width=\"552\" \/>\u00a0<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" alt=\"\" height=\"146\" src=\"https:\/\/www.wsisp.com\/helps\/wp-content\/uploads\/2025\/04\/20250418095421-6802214defadc.png\" width=\"524\" \/><\/p>\n<\/p>\n<h3 id=\"%E6%80%BB%E7%BB%93\">\u603b\u7ed3<\/h3>\n<p>\u901a\u8fc7\u4e0a\u8ff0\u6b65\u9aa4&#xff0c;\u6211\u4eec\u6210\u529f\u5730\u4f7f\u7528MindSpore\u6784\u5efa\u5e76\u8bad\u7ec3\u4e86\u4e00\u4e2a\u7b80\u5355\u7684\u6df1\u5ea6\u5b66\u4e60\u6a21\u578b&#xff0c;\u5e76\u9a8c\u8bc1\u4e86\u6a21\u578b\u7684\u6027\u80fd\u3002\u8fd9\u4e00\u8fc7\u7a0b\u5c55\u793a\u4e86MindSpore\u7684\u6613\u7528\u6027\u548c\u5f3a\u5927\u529f\u80fd&#xff0c;\u975e\u5e38\u9002\u5408\u65b0\u624b\u5165\u95e8\u5b66\u4e60\u3002<\/p>\n<p>\u5728\u5b9e\u9645\u64cd\u4f5c\u4e2d&#xff0c;\u60a8\u53ef\u4ee5\u6839\u636e\u9700\u8981\u8c03\u6574\u6a21\u578b\u7684\u7ed3\u6784\u3001\u8d85\u53c2\u6570\u4ee5\u53ca\u6570\u636e\u96c6&#xff0c;\u4ee5\u63a2\u7d22\u66f4\u591a\u6df1\u5ea6\u5b66\u4e60\u6280\u672f\u7684\u53ef\u80fd\u6027\u3002\u5e0c\u671b\u672c\u6559\u7a0b\u5bf9\u60a8\u6709\u6240\u5e2e\u52a9&#xff01;<\/p>\n<h2 id=\"%E5%8D%9A%E4%B8%BBv%EF%BC%9AXiaoMing_Java\">\u00a0\u535a\u4e3bv&#xff1a;XiaoMing_Java<\/h2>\n<p><img loading=\"lazy\" decoding=\"async\" alt=\"\" height=\"1200\" src=\"https:\/\/www.wsisp.com\/helps\/wp-content\/uploads\/2025\/04\/20250418095422-6802214e073f5.jpg\" width=\"950\" \/><\/p>\n<h2 id=\"%C2%A0%E5%8D%9A%E4%B8%BBv%EF%BC%9AXiaoMing_Java\">\u535a\u4e3bv&#xff1a;XiaoMing_Java<\/h2>\n<p>\u00a0&#x1f4eb;\u4f5c\u8005\u7b80\u4ecb&#xff1a;\u55e8&#xff0c;\u5927\u5bb6\u597d&#xff0c;\u6211\u662f\u00a0\u5c0f\u00a0\u660e&#xff08;\u5c0f\u660ejava\u95ee\u9053\u4e4b\u8def&#xff09;&#xff0c;\u4e92\u8054\u7f51\u5927\u5382\u540e\u7aef\u7814\u53d1\u4e13\u5bb6&#xff0c;2022\u535a\u5ba2\u4e4b\u661fTOP3 \/ \u535a\u5ba2\u4e13\u5bb6 \/ CSDN\u540e\u7aef\u5185\u5bb9\u5408\u4f19\u4eba\u3001InfoQ(\u6781\u5ba2\u65f6\u95f4)\u7b7e\u7ea6\u4f5c\u8005\u3001\u963f\u91cc\u4e91\u7b7e\u7ea6\u535a\u4e3b\u3001\u5168\u7f515\u4e07\u7c89\u4e1d\u535a\u4e3b\u3002<\/p>\n<hr \/>\n<p>&#x1f345; \u6587\u672b\u83b7\u53d6\u8054\u7cfb &#x1f345;\u00a0\u00a0&#x1f447;&#x1f3fb; \u7cbe\u5f69\u4e13\u680f\u63a8\u8350\u8ba2\u9605\u6536\u85cf &#x1f447;&#x1f3fb;<\/p>\n<table>\n<tbody>\n<tr>\n<td>\n<p>\u4e13\u680f\u7cfb\u5217&#xff08;\u70b9\u51fb\u89e3\u9501&#xff09;<\/p>\n<\/td>\n<td>\n<p>\u5b66\u4e60\u8def\u7ebf&#xff08;\u70b9\u51fb\u89e3\u9501&#xff09;<\/p>\n<\/td>\n<td>\n<p>\u77e5\u8bc6\u5b9a\u4f4d<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td>\n<p>&#x1f525;Redis\u4ece\u5165\u95e8\u5230\u7cbe\u901a\u4e0e\u5b9e\u6218&#x1f525;<\/p>\n<\/td>\n<td>\n<p>Redis\u4ece\u5165\u95e8\u5230\u7cbe\u901a\u4e0e\u5b9e\u6218<\/p>\n<\/td>\n<td>\n<p>\u56f4\u7ed5\u539f\u7406\u6e90\u7801\u8bb2\u89e3Redis\u9762\u8bd5\u77e5\u8bc6\u70b9\u4e0e\u5b9e\u6218<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td>\n<p>&#x1f525;MySQL\u4ece\u5165\u95e8\u5230\u7cbe\u901a&#x1f525;<\/p>\n<\/td>\n<td>\n<p>MySQL\u4ece\u5165\u95e8\u5230\u7cbe\u901a<\/p>\n<\/td>\n<td>\u5168\u9762\u8bb2\u89e3MySQL\u77e5\u8bc6\u4e0e\u4f01\u4e1a\u7ea7MySQL\u5b9e\u6218<\/td>\n<\/tr>\n<tr>\n<td rowspan=\"2\">\n<p>&#x1f525;\u8ba1\u7b97\u673a\u5e95\u5c42\u539f\u7406&#x1f525;<\/p>\n<\/td>\n<td>\n<p>\u6df1\u5165\u7406\u89e3\u8ba1\u7b97\u673a\u7cfb\u7edfCSAPP<\/p>\n<\/td>\n<td>\n<p>\u4ee5\u6df1\u5165\u7406\u89e3\u8ba1\u7b97\u673a\u7cfb\u7edf\u4e3a\u57fa\u77f3&#xff0c;\u6784\u4ef6\u8ba1\u7b97\u673a\u4f53\u7cfb\u548c\u8ba1\u7b97\u673a\u601d\u7ef4<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td>\n<p>Linux\u5185\u6838\u6e90\u7801\u89e3\u6790<\/p>\n<\/td>\n<td>\n<p>\u56f4\u7ed5Linux\u5185\u6838\u8bb2\u89e3\u8ba1\u7b97\u673a\u5e95\u5c42\u539f\u7406\u4e0e\u5e76\u53d1<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td>\n<p>&#x1f525;\u6570\u636e\u7ed3\u6784\u4e0e\u4f01\u4e1a\u9898\u5e93\u7cbe\u8bb2&#x1f525;<\/p>\n<\/td>\n<td>\n<p>\u6570\u636e\u7ed3\u6784\u4e0e\u4f01\u4e1a\u9898\u5e93\u7cbe\u8bb2<\/p>\n<\/td>\n<td>\n<p>\u7ed3\u5408\u5de5\u4f5c\u7ecf\u9a8c\u6df1\u5165\u6d45\u51fa&#xff0c;\u9002\u5408\u5404\u5c42\u6b21&#xff0c;\u7b14\u8bd5\u9762\u8bd5\u7b97\u6cd5\u9898\u7cbe\u8bb2<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td rowspan=\"2\">\n<p>&#x1f525;\u4e92\u8054\u7f51\u67b6\u6784\u5206\u6790\u4e0e\u5b9e\u6218&#x1f525;<\/p>\n<\/td>\n<td>\n<p>\u4f01\u4e1a\u7cfb\u7edf\u67b6\u6784\u5206\u6790\u5b9e\u8df5\u4e0e\u843d\u5730<\/p>\n<\/td>\n<td>\n<p>\u884c\u4e1a\u6700\u524d\u6cbf\u89c6\u89d2&#xff0c;\u4e13\u6ce8\u4e8e\u6280\u672f\u67b6\u6784\u5347\u7ea7\u8def\u7ebf\u3001\u67b6\u6784\u5b9e\u8df5<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td>\n<p>\u4e92\u8054\u7f51\u4f01\u4e1a\u9632\u8d44\u635f\u5b9e\u8df5<\/p>\n<\/td>\n<td>\n<p>\u4e92\u8054\u7f51\u91d1\u878d\u516c\u53f8\u7684\u9632\u8d44\u635f\u65b9\u6cd5\u8bba\u3001\u4ee3\u7801\u4e0e\u5b9e\u8df5<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td>\n<p>&#x1f525;Java\u5168\u6808\u767d\u5b9d\u4e66&#x1f525;<\/p>\n<\/td>\n<td>\n<p>\u7cbe\u901aJava8\u4e0e\u51fd\u6570\u5f0f\u7f16\u7a0b<\/p>\n<\/td>\n<td>\n<p>\u672c\u4e13\u680f\u4ee5\u5b9e\u6218\u4e3a\u57fa\u7840&#xff0c;\u9010\u6b65\u6df1\u5165Java8\u4ee5\u53ca\u672a\u6765\u7684\u7f16\u7a0b\u6a21\u5f0f<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td><\/td>\n<td>\n<p>\u6df1\u5165\u7406\u89e3JVM<\/p>\n<\/td>\n<td>\n<p>\u8be6\u7ec6\u4ecb\u7ecd\u5185\u5b58\u533a\u57df\u3001\u5b57\u8282\u7801\u3001\u65b9\u6cd5\u5e95\u5c42&#xff0c;\u7c7b\u52a0\u8f7d\u548cGC\u7b49\u77e5\u8bc6<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td><\/td>\n<td>\n<p>\u6df1\u5165\u7406\u89e3\u9ad8\u5e76\u53d1\u7f16\u7a0b<\/p>\n<\/td>\n<td>\n<p>\u6df1\u5165Liunx\u5185\u6838\u3001\u6c47\u7f16\u3001C&#043;&#043;\u5168\u65b9\u4f4d\u7406\u89e3\u5e76\u53d1\u7f16\u7a0b<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td><\/td>\n<td>\n<p>Spring\u6e90\u7801\u5206\u6790<\/p>\n<\/td>\n<td>\n<p>Spring\u6838\u5fc3\u4e03IOC\/AOP\u7b49\u6e90\u7801\u5206\u6790<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td><\/td>\n<td>\n<p>MyBatis\u6e90\u7801\u5206\u6790<\/p>\n<\/td>\n<td>\n<p>MyBatis\u6838\u5fc3\u6e90\u7801\u5206\u6790<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td><\/td>\n<td>\n<p>Java\u6838\u5fc3\u6280\u672f<\/p>\n<\/td>\n<td>\n<p>\u53ea\u8bb2Java\u6838\u5fc3\u6280\u672f<\/p>\n<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n","protected":false},"excerpt":{"rendered":"<p>\u6587\u7ae0\u6d4f\u89c8\u9605\u8bfb7.1k\u6b21\uff0c\u70b9\u8d5e55\u6b21\uff0c\u6536\u85cf50\u6b21\u3002\u6607\u601d25\u5929\u5b66\u4e60\u6253\u5361\u8425\u7b2c1\u5929|\u5feb\u901f\u5165\u95e8_mindexpression c++<\/p>\n","protected":false},"author":2,"featured_media":10228,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[99,292,43,188,125,427,44,176],"topic":[],"class_list":["post-10235","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-server","tag-java","tag-292","tag-43","tag-188","tag-125","tag-427","tag-44","tag-176"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v20.3 - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>\u6607\u601d25\u5929\u5b66\u4e60\u6253\u5361\u8425\u7b2c1\u5929|\u5feb\u901f\u5165\u95e8 - \u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3<\/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.wsisp.com\/helps\/10235.html\" \/>\n<meta property=\"og:locale\" content=\"zh_CN\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"\u6607\u601d25\u5929\u5b66\u4e60\u6253\u5361\u8425\u7b2c1\u5929|\u5feb\u901f\u5165\u95e8 - \u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3\" \/>\n<meta property=\"og:description\" content=\"\u6587\u7ae0\u6d4f\u89c8\u9605\u8bfb7.1k\u6b21\uff0c\u70b9\u8d5e55\u6b21\uff0c\u6536\u85cf50\u6b21\u3002\u6607\u601d25\u5929\u5b66\u4e60\u6253\u5361\u8425\u7b2c1\u5929|\u5feb\u901f\u5165\u95e8_mindexpression c++\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.wsisp.com\/helps\/10235.html\" \/>\n<meta property=\"og:site_name\" content=\"\u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3\" \/>\n<meta property=\"article:published_time\" content=\"2025-04-18T09:54:23+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/www.wsisp.com\/helps\/wp-content\/uploads\/2025\/04\/20250418095421-6802214d499b1.png\" \/>\n<meta name=\"author\" content=\"admin\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"\u4f5c\u8005\" \/>\n\t<meta name=\"twitter:data1\" content=\"admin\" \/>\n\t<meta name=\"twitter:label2\" content=\"\u9884\u8ba1\u9605\u8bfb\u65f6\u95f4\" \/>\n\t<meta name=\"twitter:data2\" content=\"3 \u5206\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"WebPage\",\"@id\":\"https:\/\/www.wsisp.com\/helps\/10235.html\",\"url\":\"https:\/\/www.wsisp.com\/helps\/10235.html\",\"name\":\"\u6607\u601d25\u5929\u5b66\u4e60\u6253\u5361\u8425\u7b2c1\u5929|\u5feb\u901f\u5165\u95e8 - \u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3\",\"isPartOf\":{\"@id\":\"https:\/\/www.wsisp.com\/helps\/#website\"},\"datePublished\":\"2025-04-18T09:54:23+00:00\",\"dateModified\":\"2025-04-18T09:54:23+00:00\",\"author\":{\"@id\":\"https:\/\/www.wsisp.com\/helps\/#\/schema\/person\/358e386c577a3ab51c4493330a20ad41\"},\"breadcrumb\":{\"@id\":\"https:\/\/www.wsisp.com\/helps\/10235.html#breadcrumb\"},\"inLanguage\":\"zh-Hans\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/www.wsisp.com\/helps\/10235.html\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/www.wsisp.com\/helps\/10235.html#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"\u9996\u9875\",\"item\":\"https:\/\/www.wsisp.com\/helps\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"\u6607\u601d25\u5929\u5b66\u4e60\u6253\u5361\u8425\u7b2c1\u5929|\u5feb\u901f\u5165\u95e8\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/www.wsisp.com\/helps\/#website\",\"url\":\"https:\/\/www.wsisp.com\/helps\/\",\"name\":\"\u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3\",\"description\":\"\u9999\u6e2f\u670d\u52a1\u5668_\u9999\u6e2f\u4e91\u670d\u52a1\u5668\u8d44\u8baf_\u670d\u52a1\u5668\u5e2e\u52a9\u6587\u6863_\u670d\u52a1\u5668\u6559\u7a0b\",\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/www.wsisp.com\/helps\/?s={search_term_string}\"},\"query-input\":\"required name=search_term_string\"}],\"inLanguage\":\"zh-Hans\"},{\"@type\":\"Person\",\"@id\":\"https:\/\/www.wsisp.com\/helps\/#\/schema\/person\/358e386c577a3ab51c4493330a20ad41\",\"name\":\"admin\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"zh-Hans\",\"@id\":\"https:\/\/www.wsisp.com\/helps\/#\/schema\/person\/image\/\",\"url\":\"https:\/\/gravatar.wp-china-yes.net\/avatar\/?s=96&d=mystery\",\"contentUrl\":\"https:\/\/gravatar.wp-china-yes.net\/avatar\/?s=96&d=mystery\",\"caption\":\"admin\"},\"sameAs\":[\"http:\/\/wp.wsisp.com\"],\"url\":\"https:\/\/www.wsisp.com\/helps\/author\/admin\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"\u6607\u601d25\u5929\u5b66\u4e60\u6253\u5361\u8425\u7b2c1\u5929|\u5feb\u901f\u5165\u95e8 - \u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3","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.wsisp.com\/helps\/10235.html","og_locale":"zh_CN","og_type":"article","og_title":"\u6607\u601d25\u5929\u5b66\u4e60\u6253\u5361\u8425\u7b2c1\u5929|\u5feb\u901f\u5165\u95e8 - \u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3","og_description":"\u6587\u7ae0\u6d4f\u89c8\u9605\u8bfb7.1k\u6b21\uff0c\u70b9\u8d5e55\u6b21\uff0c\u6536\u85cf50\u6b21\u3002\u6607\u601d25\u5929\u5b66\u4e60\u6253\u5361\u8425\u7b2c1\u5929|\u5feb\u901f\u5165\u95e8_mindexpression c++","og_url":"https:\/\/www.wsisp.com\/helps\/10235.html","og_site_name":"\u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3","article_published_time":"2025-04-18T09:54:23+00:00","og_image":[{"url":"https:\/\/www.wsisp.com\/helps\/wp-content\/uploads\/2025\/04\/20250418095421-6802214d499b1.png"}],"author":"admin","twitter_card":"summary_large_image","twitter_misc":{"\u4f5c\u8005":"admin","\u9884\u8ba1\u9605\u8bfb\u65f6\u95f4":"3 \u5206"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"WebPage","@id":"https:\/\/www.wsisp.com\/helps\/10235.html","url":"https:\/\/www.wsisp.com\/helps\/10235.html","name":"\u6607\u601d25\u5929\u5b66\u4e60\u6253\u5361\u8425\u7b2c1\u5929|\u5feb\u901f\u5165\u95e8 - \u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3","isPartOf":{"@id":"https:\/\/www.wsisp.com\/helps\/#website"},"datePublished":"2025-04-18T09:54:23+00:00","dateModified":"2025-04-18T09:54:23+00:00","author":{"@id":"https:\/\/www.wsisp.com\/helps\/#\/schema\/person\/358e386c577a3ab51c4493330a20ad41"},"breadcrumb":{"@id":"https:\/\/www.wsisp.com\/helps\/10235.html#breadcrumb"},"inLanguage":"zh-Hans","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.wsisp.com\/helps\/10235.html"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/www.wsisp.com\/helps\/10235.html#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"\u9996\u9875","item":"https:\/\/www.wsisp.com\/helps"},{"@type":"ListItem","position":2,"name":"\u6607\u601d25\u5929\u5b66\u4e60\u6253\u5361\u8425\u7b2c1\u5929|\u5feb\u901f\u5165\u95e8"}]},{"@type":"WebSite","@id":"https:\/\/www.wsisp.com\/helps\/#website","url":"https:\/\/www.wsisp.com\/helps\/","name":"\u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3","description":"\u9999\u6e2f\u670d\u52a1\u5668_\u9999\u6e2f\u4e91\u670d\u52a1\u5668\u8d44\u8baf_\u670d\u52a1\u5668\u5e2e\u52a9\u6587\u6863_\u670d\u52a1\u5668\u6559\u7a0b","potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/www.wsisp.com\/helps\/?s={search_term_string}"},"query-input":"required name=search_term_string"}],"inLanguage":"zh-Hans"},{"@type":"Person","@id":"https:\/\/www.wsisp.com\/helps\/#\/schema\/person\/358e386c577a3ab51c4493330a20ad41","name":"admin","image":{"@type":"ImageObject","inLanguage":"zh-Hans","@id":"https:\/\/www.wsisp.com\/helps\/#\/schema\/person\/image\/","url":"https:\/\/gravatar.wp-china-yes.net\/avatar\/?s=96&d=mystery","contentUrl":"https:\/\/gravatar.wp-china-yes.net\/avatar\/?s=96&d=mystery","caption":"admin"},"sameAs":["http:\/\/wp.wsisp.com"],"url":"https:\/\/www.wsisp.com\/helps\/author\/admin"}]}},"_links":{"self":[{"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/posts\/10235","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/comments?post=10235"}],"version-history":[{"count":0,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/posts\/10235\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/media\/10228"}],"wp:attachment":[{"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/media?parent=10235"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/categories?post=10235"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/tags?post=10235"},{"taxonomy":"topic","embeddable":true,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/topic?post=10235"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}