{"id":113644,"date":"2026-10-07T02:33:10","date_gmt":"2026-10-06T18:33:10","guid":{"rendered":"https:\/\/www.wsisp.com\/helps\/113644.html"},"modified":"2026-10-07T02:33:10","modified_gmt":"2026-10-06T18:33:10","slug":"vla-%e7%b3%bb%e7%bb%9f%e5%ad%a6%e4%b9%a0%e7%ac%ac-4-%e8%af%be%ef%bc%9a%e4%b8%80%e4%b8%aa-batch-%e8%bf%9b%e5%85%a5%e7%a5%9e%e7%bb%8f%e7%bd%91%e7%bb%9c%e5%90%8e%ef%bc%8c%e6%a8%a1%e5%9e%8b%e5%88%b0","status":"publish","type":"post","link":"https:\/\/www.wsisp.com\/helps\/113644.html","title":{"rendered":"VLA \u7cfb\u7edf\u5b66\u4e60\u7b2c 4 \u8bfe\uff1a\u4e00\u4e2a Batch \u8fdb\u5165\u795e\u7ecf\u7f51\u7edc\u540e\uff0c\u6a21\u578b\u5230\u5e95\u662f\u600e\u4e48\u201c\u5b66\u4f1a\u201d\u7684\uff1f"},"content":{"rendered":"<h2>\u7b2c\u4e09\u8bfe\u6807\u51c6\u7b54\u6848&#xff1a;Robot Dataset<\/h2>\n<h3>1. \u4e3a\u4ec0\u4e48 100 \u4e2a Episode \u4e0d\u4ee3\u8868\u53ea\u6709 100 \u4e2a\u8bad\u7ec3\u6837\u672c&#xff1f;<\/h3>\n<p>\u56e0\u4e3a&#xff1a;<\/p>\n<p>Episode \u662f\u4e00\u6b21\u5b8c\u6574\u4efb\u52a1&#xff0c;\u800c\u8bad\u7ec3\u6837\u672c\u53ef\u4ee5\u6765\u81ea Episode \u5185\u90e8\u7684\u6bcf\u4e2a\u65f6\u95f4\u70b9\u3002<\/p>\n<p>\u4f8b\u5982&#xff1a;<\/p>\n<p>\\\\[ 100\\\\text{ episodes} \\\\]<\/p>\n<p>\u6bcf\u4e2a Episode \u6709&#xff1a;<\/p>\n<p>\\\\[ 100\\\\text{ frames} \\\\]<\/p>\n<p>\u90a3\u4e48\u6700\u7b80\u5355\u60c5\u51b5\u4e0b\u5c31\u53ef\u80fd\u6709\u7ea6&#xff1a;<\/p>\n<p>\\\\[ 100\\\\times100&#061;10000 \\\\]<\/p>\n<p>\u4e2a&#xff1a;<\/p>\n<p>\\\\[ (o_t,a_t) \\\\]<\/p>\n<p>\u8bad\u7ec3\u5bf9\u3002<\/p>\n<p>\u6240\u4ee5&#xff1a;<\/p>\n<p>\\\\[ \\\\boxed{ Episode\u6570\u91cf\\\\neq Sample\u6570\u91cf } \\\\]<\/p>\n<hr \/>\n<h3>2. dataset[10] \u548c dataloader \u5206\u522b\u8d1f\u8d23\u4ec0\u4e48&#xff1f;<\/h3>\n<p>dataset[10]&#xff1a;<\/p>\n<p>\u4ece Dataset \u4e2d\u83b7\u53d6\u7b2c 10 \u4e2a Sample\u3002<\/p>\n<p>\u5b83\u901a\u5e38\u89e6\u53d1&#xff1a;<\/p>\n<p>__getitem__(10)<\/p>\n<p>\u4f8b\u5982\u5f97\u5230&#xff1a;<\/p>\n<p>{    &#034;image&#034;: image,    &#034;state&#034;: state,    &#034;action&#034;: action}<\/p>\n<p>\u800c DataLoader&#xff1a;<\/p>\n<p>\u4ece Dataset \u4e2d\u4e0d\u65ad\u83b7\u53d6\u591a\u4e2a Sample&#xff0c;\u5e76\u628a\u5b83\u4eec\u7ec4\u7ec7\u6210 Batch\u3002<\/p>\n<p>\u6240\u4ee5&#xff1a;<\/p>\n<p>Dataset<br \/>\n\u2192 \u4e00\u4e2aSample\u600e\u4e48\u53d6<\/p>\n<p>DataLoader<br \/>\n\u2192 \u591a\u4e2aSample\u600e\u4e48\u7ec4\u7ec7\u3001\u6279\u91cf\u9001\u5165\u8bad\u7ec3<\/p>\n<hr \/>\n<h3>3. \u4e3a\u4ec0\u4e48<\/h3>\n<p>\\\\[ [3,224,224] \\\\]<\/p>\n<p>\u4f1a\u53d8\u6210&#xff1a;<\/p>\n<p>\\\\[ [32,3,224,224] \\\\]<\/p>\n<p>&#xff1f;<\/p>\n<p>\u56e0\u4e3a&#xff1a;<\/p>\n<p>\\\\[ [3,224,224] \\\\]<\/p>\n<p>\u662f\u4e00\u5f20 RGB \u56fe\u7247\u3002<\/p>\n<p>\u5982\u679c DataLoader \u4e00\u6b21\u53d6 32 \u4e2a\u6837\u672c&#xff1a;<\/p>\n<p>image1 [3,224,224]<br \/>\nimage2 [3,224,224]<br \/>\n&#8230;<br \/>\nimage32 [3,224,224]<\/p>\n<p>\u628a\u5b83\u4eec\u5806\u8d77\u6765&#xff1a;<\/p>\n<p>\\\\[ [32,3,224,224] \\\\]<\/p>\n<p>\u6700\u524d\u9762\u7684&#xff1a;<\/p>\n<p>\\\\[ 32 \\\\]<\/p>\n<p>\u5c31\u662f Batch Dimension\u3002<\/p>\n<hr \/>\n<h3>4. \u4e3a\u4ec0\u4e48 Training \u6709 Expert Action&#xff0c;\u4f46 Rollout \u6ca1\u6709&#xff1f;<\/h3>\n<p>Training \u4f7f\u7528\u7684\u662f\u63d0\u524d\u6536\u96c6\u597d\u7684\u4e13\u5bb6 Dataset\u3002<\/p>\n<p>\u6240\u4ee5\u6570\u636e\u672c\u8eab\u5305\u542b&#xff1a;<\/p>\n<p>\\\\[ (o_t,a_t) \\\\]<\/p>\n<p>\u6a21\u578b\u53ef\u4ee5\u62ff&#xff1a;<\/p>\n<p>\\\\[ a_t \\\\]<\/p>\n<p>\u4f5c\u4e3a\u6b63\u786e\u7b54\u6848\u3002<\/p>\n<p>\u4f46 Rollout \u65f6\u9762\u5bf9\u7684\u662f\u5b9e\u65f6\u73af\u5883&#xff1a;<\/p>\n<p>Environment<br \/>\n\u2193<br \/>\nObservation<br \/>\n\u2193<br \/>\nPolicy<\/p>\n<p>\u6ca1\u6709\u4e13\u5bb6\u5728\u65c1\u8fb9\u5b9e\u65f6\u544a\u8bc9\u6a21\u578b&#xff1a;<\/p>\n<p>\u8fd9\u4e00\u523b\u6b63\u786e\u52a8\u4f5c\u5e94\u8be5\u662f\u4ec0\u4e48\u3002<\/p>\n<p>\u6240\u4ee5\u6a21\u578b\u5fc5\u987b\u81ea\u5df1\u4ea7\u751f&#xff1a;<\/p>\n<p>\\\\[ \\\\hat a_t \\\\]<\/p>\n<p>\u5e76\u771f\u6b63\u6267\u884c\u5b83\u3002<\/p>\n<hr \/>\n<h3>5. \u4e3a\u4ec0\u4e48\u8bad\u7ec3\u548c\u63a8\u7406\u7684 normalization \u8981\u4e00\u81f4&#xff1f;<\/h3>\n<p>\u5047\u8bbe\u8bad\u7ec3\u65f6&#xff1a;<\/p>\n<p>\\\\[ x&#039;&#061; \\\\frac{x-\\\\mu}{\\\\sigma} \\\\]<\/p>\n<p>\u6a21\u578b\u4ece\u6765\u6ca1\u6709\u76f4\u63a5\u770b\u5230\u539f\u59cb \\\\(x\\\\)\u3002<\/p>\n<p>\u5b83\u770b\u5230\u7684\u90fd\u662f&#xff1a;<\/p>\n<p>\\\\[ x&#039; \\\\]<\/p>\n<p>\u5982\u679c\u63a8\u7406\u65f6\u7a81\u7136\u628a\u539f\u59cb\u6570\u636e&#xff1a;<\/p>\n<p>\\\\[ x \\\\]<\/p>\n<p>\u76f4\u63a5\u9001\u8fdb\u53bb&#xff0c;\u90a3\u4e48\u6a21\u578b\u9762\u5bf9\u7684\u6570\u636e\u5c3a\u5ea6\u53d1\u751f\u53d8\u5316\u3002<\/p>\n<p>\u4f8b\u5982\u8bad\u7ec3\u9636\u6bb5\u5b83\u4e60\u60ef&#xff1a;<\/p>\n<p>\\\\[ [-1,1] \\\\]<\/p>\n<p>\u63a8\u7406\u9636\u6bb5\u5374\u7a81\u7136\u8f93\u5165&#xff1a;<\/p>\n<p>\\\\[ [-180,180] \\\\]<\/p>\n<p>\u6a21\u578b\u5f53\u7136\u53ef\u80fd\u8868\u73b0\u5f88\u5dee\u3002<\/p>\n<p>\u6240\u4ee5&#xff1a;<\/p>\n<p>\\\\[ \\\\boxed{ \\\\text{\u8bad\u7ec3\u65f6\u600e\u4e48\u5904\u7406\u8f93\u5165} \\\\approx \\\\text{\u63a8\u7406\u65f6\u600e\u4e48\u5904\u7406\u8f93\u5165} } \\\\]<\/p>\n<hr \/>\n<h3>6. \u4ece\u673a\u5668\u4eba\u793a\u8303\u5230 model(obs) \u7684\u5b8c\u6574\u8fc7\u7a0b<\/h3>\n<p>\u5e94\u8be5\u80fd\u591f\u8bf4\u51fa&#xff1a;<\/p>\n<p>\u4eba\u7c7b\u64cd\u4f5c\u673a\u5668\u4eba<br \/>\n\u2193<br \/>\n\u8bb0\u5f55\u5f88\u591aEpisode<br \/>\n\u2193<br \/>\n\u6bcf\u4e2a\u65f6\u95f4\u70b9\u8bb0\u5f55Observation\u548cExpert Action<br \/>\n\u2193<br \/>\n\u4fdd\u5b58\u5230\u78c1\u76d8<br \/>\n\u2193<br \/>\nDataset\u8bfb\u53d6\u6570\u636e<br \/>\n\u2193<br \/>\n__getitem__\u8fd4\u56de\u4e00\u4e2aSample<br \/>\n\u2193<br \/>\nDataLoader\u6536\u96c6\u591a\u4e2aSample<br \/>\n\u2193<br \/>\n\u7ec4\u6210Batch<br \/>\n\u2193<br \/>\n\u53d6\u51faObservation<br \/>\n\u2193<br \/>\n\u9001\u5165model<\/p>\n<p>\u6240\u4ee5&#xff1a;<\/p>\n<p>pred_action &#061; model(obs)<\/p>\n<p>\u91cc\u7684 obs<\/p>\n<p>\u5176\u5b9e\u5df2\u7ecf\u7ecf\u8fc7\u4e86\u5f88\u957f\u7684\u6570\u636e\u51c6\u5907\u94fe\u3002<\/p>\n<hr \/>\n<h2>\u56db\u3001VLA \u7cfb\u7edf\u5b66\u4e60\u7b2c 4 \u8bfe&#xff1a;\u4e00\u4e2a Batch \u8fdb\u5165\u795e\u7ecf\u7f51\u7edc\u540e&#xff0c;\u6a21\u578b\u5230\u5e95\u662f\u600e\u4e48\u201c\u5b66\u4f1a\u201d\u7684&#xff1f;<\/h2>\n<p>\u73b0\u5728\u6211\u4eec\u5df2\u7ecf\u6210\u529f\u8d70\u5230\u4e86&#xff1a;<\/p>\n<p>for batch in dataloader:    obs &#061; batch[&#034;observation&#034;]    action &#061; batch[&#034;action&#034;]<\/p>\n<p>\u5047\u8bbe&#xff1a;<\/p>\n<p>\\\\[ obs.shape&#061;[32,10] \\\\]\\\\[ action.shape&#061;[32,7] \\\\]<\/p>\n<p>\u73b0\u5728\u51fa\u73b0\u771f\u6b63\u5173\u952e\u7684\u95ee\u9898&#xff1a;<\/p>\n<p>\u8fd9 32 \u4e2a\u8bad\u7ec3\u6837\u672c\u8fdb\u5165\u795e\u7ecf\u7f51\u7edc\u4ee5\u540e&#xff0c;\u6a21\u578b\u4e3a\u4ec0\u4e48\u4f1a\u53d1\u751f\u53d8\u5316&#xff1f;<\/p>\n<p>\u4e5f\u5c31\u662f&#xff1a;<\/p>\n<p>\\\\[ \\\\boxed{ Batch \\\\rightarrow Forward \\\\rightarrow Prediction \\\\rightarrow Loss \\\\rightarrow Backward \\\\rightarrow Optimizer \\\\rightarrow Parameters\\\\ Updated } \\\\]<\/p>\n<p>\u8fd9\u6761\u94fe&#xff0c;\u662f PyTorch \u8bad\u7ec3\u6700\u6838\u5fc3\u7684\u4e00\u6761\u94fe\u3002<\/p>\n<hr \/>\n<h3>1. \u9996\u5148\u641e\u6e05\u695a&#xff1a;\u6a21\u578b\u771f\u6b63\u201c\u5b66\u201d\u7684\u662f\u4ec0\u4e48&#xff1f;<\/h3>\n<p>\u770b\u4e00\u4e2a\u6700\u7b80\u5355\u6a21\u578b&#xff1a;<\/p>\n<p>model &#061; nn.Linear(10, 7)<\/p>\n<p>\u5b83\u8868\u793a&#xff1a;<\/p>\n<p>\\\\[ \\\\mathbb R^{10} \\\\rightarrow \\\\mathbb R^7 \\\\]<\/p>\n<p>\u4e5f\u5c31\u662f&#xff1a;<\/p>\n<p>10\u7ef4Observation<br \/>\n\u2193<br \/>\nLinear<br \/>\n\u2193<br \/>\n7\u7ef4Action<\/p>\n<p>\u6570\u5b66\u4e0a&#xff1a;<\/p>\n<p>\\\\[ \\\\hat a&#061;xW&#043;b \\\\]<\/p>\n<p>\u8fd9\u91cc&#xff1a;<\/p>\n<ul>\n<li>\\\\(x\\\\)&#xff1a;Observation&#xff1b;<\/li>\n<li>\\\\(W\\\\)&#xff1a;\u6743\u91cd&#xff1b;<\/li>\n<li>\\\\(b\\\\)&#xff1a;\u504f\u7f6e&#xff1b;<\/li>\n<li>\\\\(\\\\hat a\\\\)&#xff1a;\u6a21\u578b\u9884\u6d4b\u7684 Action\u3002<\/li>\n<\/ul>\n<p>\u771f\u6b63\u8bad\u7ec3\u8fc7\u7a0b\u4e2d\u88ab\u4fee\u6539\u7684&#xff0c;\u4e0d\u662f&#xff1a;<\/p>\n<p>\\\\[ x \\\\]<\/p>\n<p>\u4e5f\u4e0d\u662f&#xff1a;<\/p>\n<p>\\\\[ a \\\\]<\/p>\n<p>\u800c\u662f&#xff1a;<\/p>\n<p>\\\\[ \\\\boxed{W,b} \\\\]<\/p>\n<p>\u8fd9\u4e9b\u7edf\u79f0&#xff1a;<\/p>\n<p>\\\\[ \\\\theta \\\\]<\/p>\n<p>\u6240\u4ee5&#xff1a;<\/p>\n<p>\\\\[ \\\\pi_\\\\theta \\\\]<\/p>\n<p>\u4e2d\u7684&#xff1a;<\/p>\n<p>\\\\[ \\\\theta \\\\]<\/p>\n<p>\u5c31\u662f\u6a21\u578b\u91cc\u6240\u6709\u53ef\u4ee5\u5b66\u4e60\u7684\u53c2\u6570\u3002<\/p>\n<hr \/>\n<h3>2. \u5148\u770b\u4e00\u4e2a\u53ea\u6709\u4e00\u4e2a\u6570\u5b57\u7684\u6a21\u578b<\/h3>\n<p>\u5148\u4e0d\u76f4\u63a5\u4e0a\u77e9\u9635\u3002<\/p>\n<p>\u5047\u8bbe\u6a21\u578b\u7279\u522b\u7b80\u5355&#xff1a;<\/p>\n<p>\\\\[ \\\\hat y&#061;wx \\\\]<\/p>\n<p>\u53ea\u6709\u4e00\u4e2a\u53c2\u6570&#xff1a;<\/p>\n<p>\\\\[ w \\\\]<\/p>\n<p>\u73b0\u5728\u8bad\u7ec3\u6570\u636e\u544a\u8bc9\u6211\u4eec&#xff1a;<\/p>\n<p>\\\\[ x&#061;2 \\\\]<\/p>\n<p>\u6b63\u786e\u7b54\u6848&#xff1a;<\/p>\n<p>\\\\[ y&#061;6 \\\\]<\/p>\n<p>\u5047\u8bbe\u521d\u59cb&#xff1a;<\/p>\n<p>\\\\[ w&#061;1 \\\\]<\/p>\n<p>\u90a3\u4e48\u6a21\u578b\u7b2c\u4e00\u6b21\u9884\u6d4b&#xff1a;<\/p>\n<p>\\\\[ \\\\hat y&#061;wx \\\\]<\/p>\n<p>\u5f97\u5230&#xff1a;<\/p>\n<p>\\\\[ \\\\hat y&#061;1\\\\times2&#061;2 \\\\]<\/p>\n<p>\u4f46\u662f\u6b63\u786e\u7b54\u6848\u662f&#xff1a;<\/p>\n<p>\\\\[ 6 \\\\]<\/p>\n<p>\u660e\u663e\u9519\u4e86\u3002<\/p>\n<p>\u4e8e\u662f\u6211\u4eec\u9700\u8981\u56de\u7b54&#xff1a;<\/p>\n<p>\u5e94\u8be5\u600e\u4e48\u4fee\u6539 \\\\(w\\\\)&#xff0c;\u624d\u80fd\u8ba9\u4e0b\u4e00\u6b21\u9884\u6d4b\u66f4\u63a5\u8fd1 6&#xff1f;<\/p>\n<p>\u8fd9\u5c31\u662f\u8bad\u7ec3\u95ee\u9898\u7684\u6838\u5fc3\u3002<\/p>\n<hr \/>\n<h3>3. Forward&#xff1a;\u5148\u8ba9\u5f53\u524d\u6a21\u578b\u505a\u4e00\u6b21\u9884\u6d4b<\/h3>\n<p>\u6a21\u578b\u76ee\u524d&#xff1a;<\/p>\n<p>\\\\[ w&#061;1 \\\\]<\/p>\n<p>\u8f93\u5165&#xff1a;<\/p>\n<p>\\\\[ x&#061;2 \\\\]<\/p>\n<p>\u8fd0\u884c&#xff1a;<\/p>\n<p>\\\\[ \\\\hat y&#061;wx \\\\]<\/p>\n<p>\u5f97\u5230&#xff1a;<\/p>\n<p>\\\\[ \\\\hat y&#061;2 \\\\]<\/p>\n<p>\u8fd9\u4e2a\u8fc7\u7a0b\u53eb&#xff1a;<\/p>\n<h2>Forward<\/h2>\n<p>\u4e5f\u5c31\u662f&#xff1a;<\/p>\n<p>\u4ece\u8f93\u5165\u5f00\u59cb&#xff0c;\u6309\u7167\u795e\u7ecf\u7f51\u7edc\u5f53\u524d\u53c2\u6570\u4e00\u8def\u5411\u524d\u8ba1\u7b97&#xff0c;\u6700\u7ec8\u5f97\u5230\u9884\u6d4b\u7ed3\u679c\u3002<\/p>\n<p>\u5728 PyTorch&#xff1a;<\/p>\n<p>pred &#061; model(x)<\/p>\n<p>\u5c31\u662f\u5728\u8fdb\u884c Forward\u3002<\/p>\n<p>\u653e\u56de BC&#xff1a;<\/p>\n<p>\\\\[ \\\\hat A&#061;\\\\pi_\\\\theta(O) \\\\]<\/p>\n<p>\u4ee3\u7801&#xff1a;<\/p>\n<p>pred_action &#061; model(obs)<\/p>\n<p>\u5c31\u662f&#xff1a;<\/p>\n<p>\u7528\u5f53\u524d Policy \u5bf9\u8fd9\u4e00\u6279 Observation \u9884\u6d4b Action\u3002<\/p>\n<hr \/>\n<h3>4. Forward \u4ee5\u540e\u4e3a\u4ec0\u4e48\u8fd8\u4e0d\u80fd\u8bad\u7ec3&#xff1f;<\/h3>\n<p>\u56e0\u4e3a\u73b0\u5728\u53ea\u77e5\u9053&#xff1a;<\/p>\n<p>\\\\[ \\\\hat y&#061;2 \\\\]<\/p>\n<p>\u6a21\u578b\u8fd8\u4e0d\u77e5\u9053&#xff1a;<\/p>\n<p>2 \u5230\u5e95\u597d\u4e0d\u597d&#xff1f;<\/p>\n<p>\u5fc5\u987b\u62ff\u6b63\u786e\u7b54\u6848&#xff1a;<\/p>\n<p>\\\\[ y&#061;6 \\\\]<\/p>\n<p>\u8fdb\u884c\u6bd4\u8f83\u3002<\/p>\n<p>\u4e8e\u662f\u9700\u8981&#xff1a;<\/p>\n<h2>Loss<\/h2>\n<p>\u4f8b\u5982\u4f7f\u7528\u5e73\u65b9\u8bef\u5dee&#xff1a;<\/p>\n<p>\\\\[ L&#061;(\\\\hat y-y)^2 \\\\]<\/p>\n<p>\u4ee3\u5165&#xff1a;<\/p>\n<p>\\\\[ L&#061;(2-6)^2 \\\\]<\/p>\n<p>\u6240\u4ee5&#xff1a;<\/p>\n<p>\\\\[ L&#061;16 \\\\]<\/p>\n<p>\u73b0\u5728\u6211\u4eec\u6709\u4e86\u4e00\u4e2a\u6570\u5b57&#xff1a;<\/p>\n<p>\\\\[ 16 \\\\]<\/p>\n<p>\u5b83\u544a\u8bc9\u6211\u4eec&#xff1a;<\/p>\n<p>\u5f53\u524d\u6a21\u578b\u9884\u6d4b\u5f97\u6709\u591a\u5dee\u3002<\/p>\n<p>\u4f46\u662f\u4ecd\u7136\u6ca1\u6709\u89e3\u51b3&#xff1a;<\/p>\n<p>\\\\(w\\\\) \u5e94\u8be5\u5f80\u54ea\u4e2a\u65b9\u5411\u6539&#xff1f;<\/p>\n<hr \/>\n<h2>5. \u771f\u6b63\u6838\u5fc3\u95ee\u9898&#xff1a;\u600e\u4e48\u77e5\u9053\u53c2\u6570\u5e94\u8be5\u53d8\u5927\u8fd8\u662f\u53d8\u5c0f&#xff1f;<\/h2>\n<p>\u73b0\u5728&#xff1a;<\/p>\n<p>\\\\[ \\\\hat y&#061;wx \\\\]<\/p>\n<p>\u540c\u65f6&#xff1a;<\/p>\n<p>\\\\[ L&#061;(wx-y)^2 \\\\]<\/p>\n<p>\u8fd9\u91cc Loss \u5176\u5b9e\u662f\u53c2\u6570 \\\\(w\\\\) \u7684\u51fd\u6570&#xff1a;<\/p>\n<p>\\\\[ L(w) \\\\]<\/p>\n<p>\u6211\u4eec\u7684\u76ee\u6807\u5c31\u662f&#xff1a;<\/p>\n<p>\\\\[ \\\\boxed{\\\\text{\u8ba9 }L(w)\\\\text{ \u5c3d\u53ef\u80fd\u5c0f}} \\\\]<\/p>\n<p>\u4e8e\u662f\u6211\u4eec\u8981\u95ee&#xff1a;<\/p>\n<p>\u5982\u679c \\\\(w\\\\) \u7a0d\u5fae\u53d8\u5927\u4e00\u70b9&#xff0c;Loss \u4f1a\u53d8\u5927\u8fd8\u662f\u53d8\u5c0f&#xff1f;<\/p>\n<p>\u8fd9\u5c31\u662f&#xff1a;<\/p>\n<p>\u68af\u5ea6 Gradient<\/p>\n<p>\u5f00\u59cb\u51fa\u73b0\u7684\u5730\u65b9\u3002<\/p>\n<hr \/>\n<h2>6. \u5148\u4e0d\u7528\u5fae\u79ef\u5206\u7406\u89e3\u68af\u5ea6<\/h2>\n<p>\u73b0\u5728&#xff1a;<\/p>\n<p>\\\\[ w&#061;1 \\\\]<\/p>\n<p>Loss&#xff1a;<\/p>\n<p>\\\\[ L&#061;16 \\\\]<\/p>\n<p>\u8bd5\u7740\u628a \\\\(w\\\\) \u8c03\u5927\u4e00\u70b9&#xff1a;<\/p>\n<p>\\\\[ w&#061;1.1 \\\\]<\/p>\n<p>\u90a3\u4e48&#xff1a;<\/p>\n<p>\\\\[ \\\\hat y&#061;1.1\\\\times2&#061;2.2 \\\\]<\/p>\n<p>Loss&#xff1a;<\/p>\n<p>\\\\[ L&#061;(2.2-6)^2&#061;14.44 \\\\]<\/p>\n<p>\u53d1\u73b0&#xff1a;<\/p>\n<p>\\\\[ 16\\\\rightarrow14.44 \\\\]<\/p>\n<p>Loss \u4e0b\u964d\u4e86\u3002<\/p>\n<p>\u8bf4\u660e&#xff1a;<\/p>\n<p>\u5f53\u524d\u8fd9\u4e2a\u4f4d\u7f6e&#xff0c;\u628a \\\\(w\\\\) \u5f80\u5927\u7684\u65b9\u5411\u8c03\u6574\u662f\u5bf9\u7684\u3002<\/p>\n<p>\u5982\u679c\u4e00\u76f4\u8c03&#xff1a;<\/p>\n<p>\\\\[ w&#061;3 \\\\]<\/p>\n<p>\u90a3\u4e48&#xff1a;<\/p>\n<p>\\\\[ \\\\hat y&#061;3\\\\times2&#061;6 \\\\]<\/p>\n<p>Loss&#xff1a;<\/p>\n<p>\\\\[ L&#061;0 \\\\]<\/p>\n<p>\u4e8e\u662f\u8bad\u7ec3\u5c31\u627e\u5230\u4e86\u4e00\u4e2a\u975e\u5e38\u597d\u7684\u53c2\u6570\u3002<\/p>\n<p>\u95ee\u9898\u662f&#xff1a;<\/p>\n<p>\u771f\u6b63\u7684\u795e\u7ecf\u7f51\u7edc\u6709\u51e0\u767e\u4e07\u751a\u81f3\u51e0\u5341\u4ebf\u53c2\u6570&#xff0c;\u4e0d\u53ef\u80fd\u4e00\u4e2a\u4e00\u4e2a\u8bd5\u3002<\/p>\n<p>\u6240\u4ee5\u6211\u4eec\u9700\u8981\u4e00\u4e2a\u6570\u5b66\u5de5\u5177\u76f4\u63a5\u544a\u8bc9\u6bcf\u4e2a\u53c2\u6570&#xff1a;<\/p>\n<p>\u4f60\u5e94\u8be5\u589e\u52a0\u8fd8\u662f\u51cf\u5c11&#xff0c;\u4ee5\u53ca\u5927\u6982\u6539\u591a\u5c11\u3002<\/p>\n<p>\u8fd9\u4e2a\u4e1c\u897f\u5c31\u662f&#xff1a;<\/p>\n<p>\\\\[ \\\\frac{\\\\partial L}{\\\\partial w} \\\\]<\/p>\n<p>\u4e5f\u5c31\u662f Loss \u5bf9\u53c2\u6570\u7684&#xff1a;<\/p>\n<h2>Gradient<\/h2>\n<hr \/>\n<h2>7. Gradient \u5230\u5e95\u8868\u8fbe\u4ec0\u4e48&#xff1f;<\/h2>\n<p>\\\\[ \\\\frac{\\\\partial L}{\\\\partial w} \\\\]<\/p>\n<p>\u521d\u5b66\u9636\u6bb5\u53ef\u4ee5\u5148\u8bfb\u6210&#xff1a;<\/p>\n<p>\u5982\u679c \\\\(w\\\\) \u7a0d\u5fae\u53d8\u5316\u4e00\u70b9&#xff0c;Loss \u4f1a\u671d\u54ea\u4e2a\u65b9\u5411\u3001\u53d8\u5316\u591a\u5feb&#xff1f;<\/p>\n<p>\u4f8b\u5982&#xff1a;<\/p>\n<p>\\\\[ \\\\frac{\\\\partial L}{\\\\partial w}&gt;0 \\\\]<\/p>\n<p>\u8bf4\u660e&#xff1a;<\/p>\n<p>\\\\(w\\\\) \u589e\u5927&#xff0c;\u4f1a\u4f7f Loss \u589e\u5927\u3002<\/p>\n<p>\u90a3\u6211\u4eec\u4e3a\u4e86\u8ba9 Loss \u4e0b\u964d&#xff0c;\u5c31\u5e94\u8be5\u8ba9&#xff1a;<\/p>\n<p>\\\\[ w \\\\]<\/p>\n<p>\u51cf\u5c0f\u3002<\/p>\n<p>\u53cd\u8fc7\u6765&#xff1a;<\/p>\n<p>\\\\[ \\\\frac{\\\\partial L}{\\\\partial w}&lt;0 \\\\]<\/p>\n<p>\u8bf4\u660e\u589e\u52a0 \\\\(w\\\\) \u4f1a\u8ba9 Loss \u4e0b\u964d\u3002<\/p>\n<hr \/>\n<h2>8. \u4e3a\u4ec0\u4e48\u66f4\u65b0\u53c2\u6570\u65f6\u6709\u4e00\u4e2a\u8d1f\u53f7&#xff1f;<\/h2>\n<p>\u7ecf\u5178\u68af\u5ea6\u4e0b\u964d&#xff1a;<\/p>\n<p>\\\\[ w_{\\\\text{new}} &#061; w_{\\\\text{old}} &#8211; \\\\eta \\\\frac{\\\\partial L}{\\\\partial w} \\\\]<\/p>\n<p>\u8fd9\u91cc&#xff1a;<\/p>\n<p>\\\\[ \\\\eta \\\\]<\/p>\n<p>\u53eb&#xff1a;<\/p>\n<p>Learning Rate<\/p>\n<p>\u5b66\u4e60\u7387\u3002<\/p>\n<p>\u6838\u5fc3\u5c31\u662f\u90a3\u4e2a\u8d1f\u53f7&#xff1a;<\/p>\n<p>\\\\[ &#8211; \\\\]<\/p>\n<p>\u56e0\u4e3a\u68af\u5ea6\u544a\u8bc9\u4f60&#xff1a;<\/p>\n<p>Loss \u4e0a\u5347\u6700\u5feb\u7684\u65b9\u5411\u3002<\/p>\n<p>\u6211\u4eec\u60f3\u8ba9 Loss \u4e0b\u964d&#xff0c;\u6240\u4ee5\u53cd\u7740\u8d70\u3002<\/p>\n<p>\u56e0\u6b64\u53eb&#xff1a;<\/p>\n<h2>Gradient Descent<\/h2>\n<p>\u68af\u5ea6\u4e0b\u964d\u3002<\/p>\n<hr \/>\n<h2>9. Backward \u5230\u5e95\u5e72\u4ec0\u4e48&#xff1f;<\/h2>\n<p>\u73b0\u5728\u56de\u5230 PyTorch\u3002<\/p>\n<p>\u6211\u4eec\u5df2\u7ecf&#xff1a;<\/p>\n<p>pred_action &#061; model(obs)<\/p>\n<p>\u5f97\u5230\u9884\u6d4b\u3002<\/p>\n<p>\u7136\u540e&#xff1a;<\/p>\n<p>loss &#061; loss_fn(pred_action, action)<\/p>\n<p>\u5f97\u5230 Loss\u3002<\/p>\n<p>\u63a5\u4e0b\u6765&#xff1a;<\/p>\n<p>loss.backward()<\/p>\n<p>\u8fd9\u91cc\u4e0d\u662f&#xff1a;<\/p>\n<p>\u628a\u6570\u636e\u5012\u7740\u8dd1\u4e00\u904d\u3002<\/p>\n<p>\u5b83\u771f\u6b63\u505a\u7684\u662f&#xff1a;<\/p>\n<p>\u5229\u7528\u53cd\u5411\u4f20\u64ad\u7b97\u6cd5&#xff0c;\u8ba1\u7b97 Loss \u5bf9\u6a21\u578b\u4e2d\u6240\u6709\u53ef\u8bad\u7ec3\u53c2\u6570\u7684\u68af\u5ea6\u3002<\/p>\n<p>\u4e5f\u5c31\u662f\u8ba1\u7b97\u5f88\u591a&#xff1a;<\/p>\n<p>\\\\[ \\\\frac{\\\\partial L}{\\\\partial \\\\theta_1}, \\\\frac{\\\\partial L}{\\\\partial \\\\theta_2}, \\\\ldots \\\\]<\/p>\n<p>\u5047\u8bbe\u7f51\u7edc\u91cc\u6709&#xff1a;<\/p>\n<p>1000000 \u4e2a\u53c2\u6570<\/p>\n<p>PyTorch \u4f1a\u5e2e\u4f60\u8ba1\u7b97&#xff1a;<\/p>\n<p>\u7b2c1\u4e2a\u53c2\u6570\u5e94\u8be5\u600e\u4e48\u53d8<br \/>\n\u7b2c2\u4e2a\u53c2\u6570\u5e94\u8be5\u600e\u4e48\u53d8<br \/>\n&#8230;<br \/>\n\u7b2c1000000\u4e2a\u53c2\u6570\u5e94\u8be5\u600e\u4e48\u53d8<\/p>\n<p>\u4e25\u683c\u6765\u8bf4&#xff0c;\u5b83\u8ba1\u7b97\u7684\u662f\u8fd9\u4e9b\u53c2\u6570\u5bf9\u5e94\u7684&#xff1a;<\/p>\n<p>gradient<\/p>\n<p>\u5e76\u628a\u7ed3\u679c\u5b58\u5728\u53c2\u6570\u7684&#xff1a;<\/p>\n<p>parameter.grad<\/p>\n<p>\u91cc\u9762\u3002<\/p>\n<hr \/>\n<h2>10. \u4e00\u4e2a\u975e\u5e38\u5bb9\u6613\u6df7\u6dc6\u7684\u95ee\u9898&#xff1a;backward() \u4f1a\u4fee\u6539\u53c2\u6570\u5417&#xff1f;<\/h2>\n<p>\u4e0d\u4f1a\u3002<\/p>\n<p>\u8fd9\u70b9\u4e00\u5b9a\u8981\u8bb0\u4f4f\u3002<\/p>\n<p>loss.backward()<\/p>\n<p>\u53ea\u662f&#xff1a;<\/p>\n<p>\\\\[ \\\\boxed{\\\\text{\u8ba1\u7b97\u68af\u5ea6}} \\\\]<\/p>\n<p>\u4f8b\u5982\u6a21\u578b\u5f53\u524d\u53c2\u6570&#xff1a;<\/p>\n<p>\\\\[ w&#061;1 \\\\]<\/p>\n<p>\u8c03\u7528&#xff1a;<\/p>\n<p>loss.backward()<\/p>\n<p>\u4ee5\u540e&#xff1a;<\/p>\n<p>\\\\[ w \\\\]<\/p>\n<p>\u672c\u8eab\u4ecd\u7136\u53ef\u80fd\u8fd8\u662f&#xff1a;<\/p>\n<p>\\\\[ 1 \\\\]<\/p>\n<p>\u53ea\u662f\u73b0\u5728\u591a\u5f97\u5230&#xff1a;<\/p>\n<p>\\\\[ w.grad \\\\]<\/p>\n<p>\u544a\u8bc9\u6211\u4eec\u5b83\u5e94\u8be5\u5f80\u54ea\u4e2a\u65b9\u5411\u6539\u3002<\/p>\n<p>\u771f\u6b63\u6539\u53c2\u6570\u7684\u662f\u4e0b\u4e00\u6b65\u3002<\/p>\n<hr \/>\n<h2>11. optimizer.step() \u624d\u771f\u6b63\u4fee\u6539\u53c2\u6570<\/h2>\n<p>\u4f8b\u5982&#xff1a;<\/p>\n<p>optimizer.step()<\/p>\n<p>Optimizer \u4f1a\u8bfb\u53d6&#xff1a;<\/p>\n<p>parameter.grad<\/p>\n<p>\u518d\u6309\u7167\u81ea\u5df1\u7684\u66f4\u65b0\u89c4\u5219\u4fee\u6539\u53c2\u6570\u3002<\/p>\n<p>\u6700\u7b80\u5355\u53ef\u4ee5\u7406\u89e3\u6210&#xff1a;<\/p>\n<p>\\\\[ \\\\theta_{\\\\text{new}} &#061; \\\\theta_{\\\\text{old}} &#8211; \\\\eta\\\\nabla_\\\\theta L \\\\]<\/p>\n<p>\u6240\u4ee5&#xff1a;<\/p>\n<p>backward()<br \/>\n\u2192 \u7b97\u5e94\u8be5\u600e\u4e48\u6539<\/p>\n<p>optimizer.step()<br \/>\n\u2192 \u771f\u7684\u53bb\u6539<\/p>\n<p>\u8fd9\u4e24\u4e2a\u804c\u8d23\u4e00\u5b9a\u8981\u5206\u5f00\u3002<\/p>\n<hr \/>\n<h2>12. \u4e3a\u4ec0\u4e48\u8fd8\u9700\u8981 optimizer.zero_grad()&#xff1f;<\/h2>\n<p>\u73b0\u5728 PyTorch \u7ecf\u5178\u8bad\u7ec3\u4ee3\u7801\u901a\u5e38\u662f&#xff1a;<\/p>\n<p>optimizer.zero_grad()pred_action &#061; model(obs)loss &#061; loss_fn(pred_action, action)loss.backward()optimizer.step()<\/p>\n<p>\u5176\u4e2d\u6700\u5947\u602a\u7684\u53ef\u80fd\u662f&#xff1a;<\/p>\n<p>optimizer.zero_grad()<\/p>\n<p>\u4e3a\u4ec0\u4e48\u8981\u6e05\u96f6&#xff1f;<\/p>\n<p>\u56e0\u4e3a PyTorch \u4e2d\u68af\u5ea6\u9ed8\u8ba4\u4f1a&#xff1a;<\/p>\n<p>\u7d2f\u52a0\u3002<\/p>\n<p>\u5047\u8bbe\u7b2c\u4e00\u6b21&#xff1a;<\/p>\n<p>\\\\[ grad&#061;2 \\\\]<\/p>\n<p>\u4e0b\u4e00\u6b21\u53c8\u7b97\u51fa&#xff1a;<\/p>\n<p>\\\\[ grad&#061;3 \\\\]<\/p>\n<p>\u5982\u679c\u4e0d\u6e05\u7a7a&#xff0c;\u53ef\u80fd\u53d8\u6210&#xff1a;<\/p>\n<p>\\\\[ grad&#061;5 \\\\]<\/p>\n<p>\u4f46\u666e\u901a\u8bad\u7ec3\u901a\u5e38\u5e0c\u671b&#xff1a;<\/p>\n<p>\u5f53\u524d Batch \u53ea\u6839\u636e\u5f53\u524d Batch \u7684\u68af\u5ea6\u66f4\u65b0\u3002<\/p>\n<p>\u6240\u4ee5\u6bcf\u4e00\u8f6e\u5148&#xff1a;<\/p>\n<p>optimizer.zero_grad()<\/p>\n<p>\u628a\u4e0a\u4e00\u4e2a Batch \u7559\u4e0b\u7684\u68af\u5ea6\u6e05\u6389\u3002<\/p>\n<hr \/>\n<h2>13. \u73b0\u5728\u5b8c\u6574\u7406\u89e3\u8fd9\u4e94\u884c<\/h2>\n<p>\u7ec8\u4e8e\u53ef\u4ee5\u5b8c\u6574\u89e3\u91ca&#xff1a;<\/p>\n<p>optimizer.zero_grad()pred_action &#061; model(obs)loss &#061; loss_fn(pred_action, action)loss.backward()optimizer.step()<\/p>\n<p>\u5b83\u4eec\u4e0d\u662f\u4e94\u4e2a\u9700\u8981\u6b7b\u8bb0\u7684\u547d\u4ee4\u3002<\/p>\n<p>\u800c\u662f\u4e00\u6761\u975e\u5e38\u4e25\u5bc6\u7684\u6570\u636e\u94fe&#xff1a;<\/p>\n<h4>\u7b2c\u4e00\u6b65<\/h4>\n<p>optimizer.zero_grad()<\/p>\n<p>\u6e05\u9664\u4e0a\u4e00\u6279\u6570\u636e\u7559\u4e0b\u7684\u68af\u5ea6\u3002<\/p>\n<hr \/>\n<h4>\u7b2c\u4e8c\u6b65<\/h4>\n<p>pred_action &#061; model(obs)<\/p>\n<p>Forward&#xff1a;<\/p>\n<p>\\\\[ O \\\\rightarrow \\\\pi_\\\\theta \\\\rightarrow \\\\hat A \\\\]<\/p>\n<p>\u7528\u5f53\u524d\u53c2\u6570\u8fdb\u884c\u9884\u6d4b\u3002<\/p>\n<hr \/>\n<h4>\u7b2c\u4e09\u6b65<\/h4>\n<p>loss &#061; loss_fn(pred_action, action)<\/p>\n<p>\u6bd4\u8f83&#xff1a;<\/p>\n<p>\\\\[ \\\\hat A \\\\]<\/p>\n<p>\u548c&#xff1a;<\/p>\n<p>\\\\[ A \\\\]<\/p>\n<p>\u5f97\u5230&#xff1a;<\/p>\n<p>\\\\[ L \\\\]<\/p>\n<hr \/>\n<h4>\u7b2c\u56db\u6b65<\/h4>\n<p>loss.backward()<\/p>\n<p>\u8ba1\u7b97&#xff1a;<\/p>\n<p>\\\\[ \\\\nabla_\\\\theta L \\\\]<\/p>\n<p>\u4e5f\u5c31\u662f\u6bcf\u4e2a\u6a21\u578b\u53c2\u6570\u5bf9\u5e94\u7684\u68af\u5ea6\u3002<\/p>\n<hr \/>\n<h4>\u7b2c\u4e94\u6b65<\/h4>\n<p>optimizer.step()<\/p>\n<p>\u5229\u7528\u68af\u5ea6\u771f\u6b63\u66f4\u65b0&#xff1a;<\/p>\n<p>\\\\[ \\\\theta \\\\]<\/p>\n<p>\u4e8e\u662f\u6a21\u578b\u548c\u521a\u624d\u76f8\u6bd4\u5df2\u7ecf\u53d8\u4e86\u4e00\u70b9\u3002<\/p>\n<p>\u4e0b\u4e00\u6279\u6570\u636e\u8fdb\u6765\u7684\u65f6\u5019&#xff1a;<\/p>\n<p>\\\\[ \\\\pi_{\\\\theta_{\\\\text{new}}} \\\\]<\/p>\n<p>\u5df2\u7ecf\u4e0d\u662f\u521a\u624d\u90a3\u4e2a Policy \u4e86\u3002<\/p>\n<hr \/>\n<h2 style=\"background-color:transparent\">14. \u628a\u4e00\u4e2a Batch \u771f\u6b63\u4e32\u8d77\u6765<\/h2>\n<p>\u5047\u8bbe&#xff1a;<\/p>\n<p>\\\\[ obs.shape&#061;[32,10] \\\\]\\\\[ action.shape&#061;[32,7] \\\\]<\/p>\n<p>\u8fdb\u5165&#xff1a;<\/p>\n<p>pred_action &#061; model(obs)<\/p>\n<p>\u5f97\u5230&#xff1a;<\/p>\n<p>\\\\[ pred\\\\_action.shape&#061;[32,7] \\\\]<\/p>\n<p>\u4e5f\u5c31\u662f&#xff1a;<\/p>\n<p>32\u4e2a\u6837\u672c<br \/>\n\u6bcf\u4e2a\u6837\u672c\u9884\u6d4b7\u7ef4Action<\/p>\n<p>\u7136\u540e&#xff1a;<\/p>\n<p>loss &#061; loss_fn(pred_action, action)<\/p>\n<p>\u6bd4\u8f83&#xff1a;<\/p>\n<p>\\\\[ [32,7] \\\\]<\/p>\n<p>\u4e0e&#xff1a;<\/p>\n<p>\\\\[ [32,7] \\\\]<\/p>\n<p>Loss \u51fd\u6570\u628a\u8fd9\u4e00\u6279\u9884\u6d4b\u8bef\u5dee\u7efc\u5408\u8d77\u6765&#xff0c;\u6700\u7ec8\u901a\u5e38\u5f97\u5230\u4e00\u4e2a\u6807\u91cf&#xff1a;<\/p>\n<p>\\\\[ L\\\\in\\\\mathbb R \\\\]<\/p>\n<p>\u4f8b\u5982&#xff1a;<\/p>\n<p>loss &#061; 0.032<\/p>\n<p>\u7136\u540e&#xff1a;<\/p>\n<p>loss.backward()<\/p>\n<p>\u4ece\u8fd9\u4e2a\u6807\u91cf Loss \u4e00\u8def\u53cd\u5411\u8ffd\u8e2a&#xff1a;<\/p>\n<p>Loss<br \/>\n\u2193<br \/>\nPredicted Action<br \/>\n\u2193<br \/>\n\u6700\u540e\u4e00\u5c42<br \/>\n\u2193<br \/>\n\u524d\u9762\u7684\u9690\u85cf\u5c42<br \/>\n\u2193<br \/>\n\u7b2c\u4e00\u5c42<\/p>\n<p>\u8ba1\u7b97\u5404\u5c42\u53c2\u6570\u7684 Gradient\u3002<\/p>\n<p>\u6700\u540e&#xff1a;<\/p>\n<p>optimizer.step()<\/p>\n<p>\u4fee\u6539\u8fd9\u4e9b\u53c2\u6570\u3002<\/p>\n<p>\u8fd9\u5c31\u662f&#xff1a;<\/p>\n<p>\\\\[ \\\\boxed{ [32,10] \\\\rightarrow [32,7] \\\\rightarrow Loss \\\\rightarrow Gradient \\\\rightarrow Parameter Update } \\\\]<\/p>\n<hr \/>\n<h2>15. \u4e3a\u4ec0\u4e48 Loss \u6700\u540e\u901a\u5e38\u662f\u4e00\u4e2a\u6570&#xff1f;<\/h2>\n<p>\u56e0\u4e3a\u6a21\u578b\u53ef\u80fd\u4e00\u6b21\u9884\u6d4b&#xff1a;<\/p>\n<p>\\\\[ 32\\\\times7&#061;224 \\\\]<\/p>\n<p>\u4e2a\u6570\u5b57\u3002<\/p>\n<p>\u6bcf\u4e2a\u6570\u5b57\u90fd\u6709\u8bef\u5dee\u3002<\/p>\n<p>\u5982\u679c\u6bcf\u4e2a\u8bef\u5dee\u90fd\u5355\u72ec\u5b58\u5728&#xff0c;\u6211\u4eec\u5c31\u5f88\u96be\u7528\u4e00\u53e5\u8bdd\u63cf\u8ff0&#xff1a;<\/p>\n<p>\u5f53\u524d\u6a21\u578b\u5230\u5e95\u6709\u591a\u5dee&#xff1f;<\/p>\n<p>\u6240\u4ee5 Loss \u51fd\u6570\u901a\u5e38\u628a\u5f88\u591a\u8bef\u5dee&#xff1a;<\/p>\n<p>\u6837\u672c1\u7684\u8bef\u5dee<br \/>\n\u6837\u672c2\u7684\u8bef\u5dee<br \/>\n&#8230;<br \/>\n\u6240\u6709Action\u7ef4\u5ea6\u8bef\u5dee<\/p>\n<p>\u6c47\u603b\u6210\u4e00\u4e2a\u6807\u91cf&#xff1a;<\/p>\n<p>\\\\[ L \\\\]<\/p>\n<p>\u8fd9\u6837\u624d\u80fd\u660e\u786e\u505a\u4f18\u5316&#xff1a;<\/p>\n<p>\\\\[ \\\\min_\\\\theta L \\\\]<\/p>\n<p>\u4e5f\u5c31\u662f&#xff1a;<\/p>\n<p>\u627e\u5230\u4e00\u7ec4\u6a21\u578b\u53c2\u6570&#xff0c;\u8ba9\u603b\u4f53 Loss \u5c3d\u53ef\u80fd\u5c0f\u3002<\/p>\n<hr \/>\n<h2>16. Epoch \u53c8\u662f\u600e\u4e48\u6765\u7684&#xff1f;<\/h2>\n<p>\u5047\u8bbe Dataset \u4e00\u5171\u6709&#xff1a;<\/p>\n<p>\\\\[ 3200 \\\\]<\/p>\n<p>\u4e2a Sample\u3002<\/p>\n<p>Batch Size&#xff1a;<\/p>\n<p>\\\\[ 32 \\\\]<\/p>\n<p>\u90a3\u4e48\u5927\u7ea6\u6709&#xff1a;<\/p>\n<p>\\\\[ \\\\frac{3200}{32}&#061;100 \\\\]<\/p>\n<p>\u4e2a Batch\u3002<\/p>\n<p>\u7a0b\u5e8f\u6267\u884c&#xff1a;<\/p>\n<p>for batch in dataloader:<\/p>\n<p>\u628a\u8fd9 100 \u4e2a Batch \u90fd\u8bad\u7ec3\u4e00\u904d\u3002<\/p>\n<p>\u8fd9\u53eb&#xff1a;<\/p>\n<h2>1 Epoch<\/h2>\n<p>\u4e5f\u5c31\u662f&#xff1a;<\/p>\n<p>\u6574\u4e2a\u8bad\u7ec3 Dataset \u5927\u4f53\u88ab\u6a21\u578b\u770b\u8fc7\u4e00\u904d\u3002<\/p>\n<p>\u7136\u540e\u7ee7\u7eed\u7b2c\u4e8c\u6b21&#xff1a;<\/p>\n<p>Epoch 2<\/p>\n<p>\u7b2c\u4e09\u6b21&#xff1a;<\/p>\n<p>Epoch 3<\/p>\n<p>\u6a21\u578b\u4e0d\u65ad\u91cd\u590d\u5b66\u4e60\u6570\u636e\u3002<\/p>\n<hr \/>\n<h2>17. Step \u548c Epoch \u4e0d\u8981\u6df7\u6dc6<\/h2>\n<p>\u4f8b\u5982&#xff1a;<\/p>\n<p>Dataset &#061; 3200 samples<br \/>\nBatch Size &#061; 32<\/p>\n<p>\u90a3\u4e48&#xff1a;<\/p>\n<p>\\\\[ 100\\\\text{ batches} \\\\]<\/p>\n<p>\u6bcf\u6267\u884c\u4e00\u6b21&#xff1a;<\/p>\n<p>optimizer.step()<\/p>\n<p>\u901a\u5e38\u79f0\u4e3a\u4e00\u4e2a&#xff1a;<\/p>\n<p>Training Step<\/p>\n<p>\u4e8e\u662f&#xff1a;<\/p>\n<p>\\\\[ 1\\\\text{ Epoch}\\\\approx100\\\\text{ Steps} \\\\]<\/p>\n<p>\u5982\u679c\u8bad\u7ec3&#xff1a;<\/p>\n<p>\\\\[ 10\\\\text{ Epochs} \\\\]<\/p>\n<p>\u5927\u7ea6\u5c31\u662f&#xff1a;<\/p>\n<p>\\\\[ 1000\\\\text{ Steps} \\\\]<\/p>\n<p>\u5f53\u7136\u5b9e\u9645\u60c5\u51b5\u8fd8\u4f1a\u53d7 drop_last\u3001sampler \u7b49\u5f71\u54cd&#xff0c;\u540e\u9762\u518d\u8bb2\u3002<\/p>\n<p>\u73b0\u5728\u7406\u89e3\u57fa\u672c\u5173\u7cfb\u5373\u53ef\u3002<\/p>\n<hr \/>\n<h2>18. \u4e3a\u4ec0\u4e48\u6a21\u578b\u4e0d\u662f\u4e00\u6b21\u5c31\u5b66\u4f1a&#xff1f;<\/h2>\n<p>\u56e0\u4e3a\u521a\u5f00\u59cb&#xff1a;<\/p>\n<p>\\\\[ \\\\theta \\\\]<\/p>\n<p>\u901a\u5e38\u662f\u968f\u673a\u521d\u59cb\u5316&#xff0c;\u6216\u8005\u6765\u81ea\u9884\u8bad\u7ec3\u6a21\u578b\u3002<\/p>\n<p>\u7b2c\u4e00\u6b21\u770b\u5230\u4e00\u4e2a Batch \u540e\u53ea\u8fdb\u884c\u4e00\u6b21\u5c0f\u66f4\u65b0&#xff1a;<\/p>\n<p>\\\\[ \\\\theta_0 \\\\rightarrow \\\\theta_1 \\\\]<\/p>\n<p>\u4e0b\u4e00\u6279&#xff1a;<\/p>\n<p>\\\\[ \\\\theta_1 \\\\rightarrow \\\\theta_2 \\\\]<\/p>\n<p>\u518d\u4e0b\u4e00\u6279&#xff1a;<\/p>\n<p>\\\\[ \\\\theta_2 \\\\rightarrow \\\\theta_3 \\\\]<\/p>\n<p>\u7ecf\u8fc7\u5f88\u591a Step&#xff1a;<\/p>\n<p>\\\\[ \\\\theta_0 \\\\rightarrow \\\\theta_1 \\\\rightarrow \\\\cdots \\\\rightarrow \\\\theta_N \\\\]<\/p>\n<p>\u6a21\u578b\u624d\u9010\u6e10\u5f62\u6210&#xff1a;<\/p>\n<p>\\\\[ Observation\\\\rightarrow Action \\\\]<\/p>\n<p>\u4e4b\u95f4\u7684\u6620\u5c04\u3002<\/p>\n<p>\u6240\u4ee5\u6240\u8c13&#xff1a;<\/p>\n<p>\u201c\u795e\u7ecf\u7f51\u7edc\u5728\u5b66\u4e60\u201d<\/p>\n<p>\u4ece\u6700\u5e95\u5c42\u770b&#xff0c;\u5e76\u4e0d\u795e\u79d8\u3002<\/p>\n<p>\u5b9e\u9645\u4e0a\u5c31\u662f&#xff1a;<\/p>\n<p>\\\\[ \\\\boxed{ \u4e0d\u65ad\u8ba1\u7b97\u8bef\u5dee \\\\rightarrow \u8ba1\u7b97\u68af\u5ea6 \\\\rightarrow \u4e00\u70b9\u4e00\u70b9\u4fee\u6539\u53c2\u6570 } \\\\]<\/p>\n<hr \/>\n<h2>19. \u4e00\u6bb5\u771f\u6b63\u5b8c\u6574\u7684\u6700\u5c0f BC Training Loop<\/h2>\n<p>\u73b0\u5728\u518d\u6765\u770b\u4ee3\u7801&#xff0c;\u5c31\u80fd\u628a\u524d\u56db\u8bfe\u4e32\u8d77\u6765&#xff1a;<\/p>\n<p>for batch in dataloader:    obs &#061; batch[&#034;observation&#034;]    action &#061; batch[&#034;action&#034;]    optimizer.zero_grad()    pred_action &#061; model(obs)    loss &#061; loss_fn(pred_action, action)    loss.backward()    optimizer.step()<\/p>\n<p>\u5b8c\u6574\u8c03\u7528\u903b\u8f91&#xff1a;<\/p>\n<p>Dataset<br \/>\n\u2193<br \/>\n__getitem__()<br \/>\n\u2193<br \/>\nSample<br \/>\n\u2193<br \/>\nDataLoader<br \/>\n\u2193<br \/>\nBatch<br \/>\n\u2193<br \/>\nobs \/ expert action<br \/>\n\u2193<br \/>\nmodel(obs)<br \/>\n\u2193<br \/>\nForward<br \/>\n\u2193<br \/>\npredicted action<br \/>\n\u2193<br \/>\nLoss<br \/>\n\u2193<br \/>\nBackward<br \/>\n\u2193<br \/>\nGradient<br \/>\n\u2193<br \/>\noptimizer.step()<br \/>\n\u2193<br \/>\nModel Parameters Updated<\/p>\n<p>\u8fd9\u5c31\u662f\u76ee\u524d\u4e3a\u6b62\u6211\u4eec\u5efa\u7acb\u8d77\u6765\u7684\u7b2c\u4e00\u6761\u5b8c\u6574 Robot Learning \u8bad\u7ec3\u94fe\u3002<\/p>\n<hr \/>\n<h2>20. \u8bad\u7ec3\u5b8c\u4ee5\u540e\u53d1\u751f\u4e86\u4ec0\u4e48&#xff1f;<\/h2>\n<p>\u8bad\u7ec3\u7ed3\u675f\u4ee5\u540e&#xff0c;\u6a21\u578b\u5185\u90e8\u5df2\u7ecf\u4fdd\u5b58\u4e86\u4e00\u7ec4\u5b66\u5230\u7684\u53c2\u6570&#xff1a;<\/p>\n<p>\\\\[ \\\\theta^\\\\* \\\\]<\/p>\n<p>\u6211\u4eec\u628a\u5b83\u4fdd\u5b58\u4e0b\u6765&#xff1a;<\/p>\n<p>Checkpoint<\/p>\n<p>\u4e4b\u540e\u63a8\u7406\u65f6&#xff1a;<\/p>\n<p>New Observation<br \/>\n\u2193<br \/>\nModel with \u03b8*<br \/>\n\u2193<br \/>\nPredicted Action<\/p>\n<p>\u8fd9\u65f6&#xff1a;<\/p>\n<ul>\n<li>\u4e0d\u9700\u8981 Expert Action&#xff1b;<\/li>\n<li>\u4e0d\u9700\u8981\u8ba1\u7b97 Loss&#xff1b;<\/li>\n<li>\u4e0d\u9700\u8981 backward()&#xff1b;<\/li>\n<li>\u4e0d\u9700\u8981 optimizer.step()\u3002<\/li>\n<\/ul>\n<p>\u56e0\u4e3a\u73b0\u5728\u4e0d\u662f\u8bad\u7ec3&#xff0c;\u800c\u662f\u5728&#xff1a;<\/p>\n<p>Inference \/ Rollout<\/p>\n<p>\u6240\u4ee5&#xff1a;<\/p>\n<p>Training<br \/>\n\u9700\u8981&#xff1a;<br \/>\nForward &#043; Loss &#043; Backward &#043; Update<\/p>\n<p>\u800c&#xff1a;<\/p>\n<p>Inference<br \/>\n\u4e3b\u8981\u9700\u8981&#xff1a;<br \/>\nForward<\/p>\n<p>\u8fd9\u662f\u4e00\u4e2a\u975e\u5e38\u91cd\u8981\u7684\u533a\u522b\u3002<\/p>\n<hr \/>\n<h2 style=\"background-color:transparent\">\u7b2c\u56db\u8bfe\u6574\u7ae0\u94fe\u8def\u56de\u770b<\/h2>\n<p>\u5230\u8fd9\u91cc\u4f60\u5e94\u8be5\u80fd\u591f\u8fde\u7eed\u8bf4\u51fa&#xff1a;<\/p>\n<p>\\\\[ \\\\boxed{ Robot\\\\ Demonstration \\\\rightarrow Dataset \\\\rightarrow DataLoader \\\\rightarrow Batch \\\\rightarrow Forward \\\\rightarrow Predicted\\\\ Action \\\\rightarrow Loss \\\\rightarrow Backward \\\\rightarrow Gradient \\\\rightarrow Optimizer \\\\rightarrow Parameter\\\\ Update } \\\\]<\/p>\n<p>\u5176\u4e2d&#xff1a;<\/p>\n<p>\\\\[ \\\\theta \\\\]<\/p>\n<p>\u662f\u6a21\u578b\u771f\u6b63\u5b66\u4e60\u7684\u53c2\u6570&#xff1b;<\/p>\n<p>\\\\[ \\\\hat A&#061;\\\\pi_\\\\theta(O) \\\\]<\/p>\n<p>\u662f Forward&#xff1b;<\/p>\n<p>\\\\[ L(\\\\hat A,A) \\\\]<\/p>\n<p>\u8861\u91cf\u6a21\u578b\u9884\u6d4b\u548c\u4e13\u5bb6\u52a8\u4f5c\u4e4b\u95f4\u7684\u5dee\u8ddd&#xff1b;<\/p>\n<p>\\\\[ \\\\nabla_\\\\theta L \\\\]<\/p>\n<p>\u544a\u8bc9\u6211\u4eec\u53c2\u6570\u5e94\u8be5\u5982\u4f55\u6539\u53d8&#xff1b;<\/p>\n<p>loss.backward() \u8d1f\u8d23\u8ba1\u7b97\u68af\u5ea6&#xff1b;<\/p>\n<p>optimizer.step() \u624d\u771f\u6b63\u4fee\u6539\u53c2\u6570\u3002<\/p>\n<hr \/>\n<h2>\u7b2c\u56db\u8bfe\u81ea\u6d4b<\/h2>\n<p>1. loss.backward() \u548c optimizer.step() \u7684\u804c\u8d23\u6709\u4ec0\u4e48\u533a\u522b&#xff1f;<\/p>\n<p>2. \u4e3a\u4ec0\u4e48\u6bcf\u4e2a Batch \u524d\u901a\u5e38\u8981\u8c03\u7528 optimizer.zero_grad()&#xff1f;<\/p>\n<p>3. \u6a21\u578b\u771f\u6b63\u201c\u5b66\u5230\u201d\u7684\u4e1c\u897f\u5b58\u5728\u54ea\u91cc&#xff1f;Observation\u3001Loss \u8fd8\u662f\u53c2\u6570 \\\\(\\\\theta\\\\)&#xff1f;<\/p>\n<p>4. \u5982\u679c&#xff1a;<\/p>\n<p>\\\\[ obs:[32,10] \\\\]<\/p>\n<p>\u7ecf\u8fc7 Policy \u8f93\u51fa&#xff1a;<\/p>\n<p>\\\\[ pred\\\\_action:[32,7] \\\\]<\/p>\n<p>Expert Action \u662f&#xff1a;<\/p>\n<p>\\\\[ action:[32,7] \\\\]<\/p>\n<p>\u90a3\u4e48 Loss \u6700\u540e\u901a\u5e38\u662f\u4ec0\u4e48 Shape&#xff1f;<\/p>\n<p>5. \u4e00\u4e2a Dataset \u6709 6400 \u4e2a Sample&#xff0c;Batch Size \u662f 64\u3002\u5ffd\u7565\u7279\u6b8a\u60c5\u51b5&#xff0c;\u4e00\u4e2a Epoch \u5927\u7ea6\u6709\u591a\u5c11\u4e2a Training Step&#xff1f;<\/p>\n<p>6. Training \u548c Inference \u4e3a\u4ec0\u4e48\u90fd\u9700\u8981 Forward&#xff0c;\u4f46\u53ea\u6709 Training \u9700\u8981 Backward&#xff1f;<\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u7b2c\u4e09\u8bfe\u6807\u51c6\u7b54\u6848&#xff1a;Robot Dataset1. \u4e3a\u4ec0\u4e48 100 \u4e2a Episode \u4e0d\u4ee3\u8868\u53ea\u6709 100 \u4e2a\u8bad\u7ec3\u6837\u672c&#xff1f;\u56e0\u4e3a&#xff1a;Episode \u662f\u4e00\u6b21\u5b8c\u6574\u4efb\u52a1&#xff0c;\u800c\u8bad\u7ec3\u6837\u672c\u53ef\u4ee5\u6765\u81ea Episode \u5185\u90e8\u7684\u6bcf\u4e2a\u65f6\u95f4\u70b9\u3002\u4f8b\u5982&#xff1a;\\\\[ 100\\\\text{ episodes} \\\\]\u6bcf\u4e2a Episode \u6709&#xff1a;\\\\[ 100\\\\text{ frames} \\\\]\u90a3\u4e48\u6700\u7b80\u5355\u60c5\u51b5\u4e0b\u5c31\u53ef\u80fd\u6709\u7ea6&#xff1a;\\\\[ 100\\\\ti<\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[587,12546,81,50],"topic":[],"class_list":["post-113644","post","type-post","status-publish","format-standard","hentry","category-server","tag-587","tag-vla","tag-python","tag-50"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v20.3 - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>VLA \u7cfb\u7edf\u5b66\u4e60\u7b2c 4 \u8bfe\uff1a\u4e00\u4e2a Batch \u8fdb\u5165\u795e\u7ecf\u7f51\u7edc\u540e\uff0c\u6a21\u578b\u5230\u5e95\u662f\u600e\u4e48\u201c\u5b66\u4f1a\u201d\u7684\uff1f - \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\/113644.html\" \/>\n<meta property=\"og:locale\" content=\"zh_CN\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"VLA \u7cfb\u7edf\u5b66\u4e60\u7b2c 4 \u8bfe\uff1a\u4e00\u4e2a Batch \u8fdb\u5165\u795e\u7ecf\u7f51\u7edc\u540e\uff0c\u6a21\u578b\u5230\u5e95\u662f\u600e\u4e48\u201c\u5b66\u4f1a\u201d\u7684\uff1f - \u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3\" \/>\n<meta property=\"og:description\" content=\"\u7b2c\u4e09\u8bfe\u6807\u51c6\u7b54\u6848&#xff1a;Robot Dataset1. \u4e3a\u4ec0\u4e48 100 \u4e2a Episode \u4e0d\u4ee3\u8868\u53ea\u6709 100 \u4e2a\u8bad\u7ec3\u6837\u672c&#xff1f;\u56e0\u4e3a&#xff1a;Episode \u662f\u4e00\u6b21\u5b8c\u6574\u4efb\u52a1&#xff0c;\u800c\u8bad\u7ec3\u6837\u672c\u53ef\u4ee5\u6765\u81ea Episode \u5185\u90e8\u7684\u6bcf\u4e2a\u65f6\u95f4\u70b9\u3002\u4f8b\u5982&#xff1a;\\[ 100\\text{ episodes} \\]\u6bcf\u4e2a Episode \u6709&#xff1a;\\[ 100\\text{ frames} \\]\u90a3\u4e48\u6700\u7b80\u5355\u60c5\u51b5\u4e0b\u5c31\u53ef\u80fd\u6709\u7ea6&#xff1a;\\[ 100\\ti\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.wsisp.com\/helps\/113644.html\" \/>\n<meta property=\"og:site_name\" content=\"\u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3\" \/>\n<meta property=\"article:published_time\" content=\"2026-10-06T18:33:10+00:00\" \/>\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=\"7 \u5206\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"WebPage\",\"@id\":\"https:\/\/www.wsisp.com\/helps\/113644.html\",\"url\":\"https:\/\/www.wsisp.com\/helps\/113644.html\",\"name\":\"VLA \u7cfb\u7edf\u5b66\u4e60\u7b2c 4 \u8bfe\uff1a\u4e00\u4e2a Batch \u8fdb\u5165\u795e\u7ecf\u7f51\u7edc\u540e\uff0c\u6a21\u578b\u5230\u5e95\u662f\u600e\u4e48\u201c\u5b66\u4f1a\u201d\u7684\uff1f - \u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3\",\"isPartOf\":{\"@id\":\"https:\/\/www.wsisp.com\/helps\/#website\"},\"datePublished\":\"2026-10-06T18:33:10+00:00\",\"dateModified\":\"2026-10-06T18:33:10+00:00\",\"author\":{\"@id\":\"https:\/\/www.wsisp.com\/helps\/#\/schema\/person\/358e386c577a3ab51c4493330a20ad41\"},\"breadcrumb\":{\"@id\":\"https:\/\/www.wsisp.com\/helps\/113644.html#breadcrumb\"},\"inLanguage\":\"zh-Hans\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/www.wsisp.com\/helps\/113644.html\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/www.wsisp.com\/helps\/113644.html#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"\u9996\u9875\",\"item\":\"https:\/\/www.wsisp.com\/helps\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"VLA \u7cfb\u7edf\u5b66\u4e60\u7b2c 4 \u8bfe\uff1a\u4e00\u4e2a Batch \u8fdb\u5165\u795e\u7ecf\u7f51\u7edc\u540e\uff0c\u6a21\u578b\u5230\u5e95\u662f\u600e\u4e48\u201c\u5b66\u4f1a\u201d\u7684\uff1f\"}]},{\"@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":"VLA \u7cfb\u7edf\u5b66\u4e60\u7b2c 4 \u8bfe\uff1a\u4e00\u4e2a Batch \u8fdb\u5165\u795e\u7ecf\u7f51\u7edc\u540e\uff0c\u6a21\u578b\u5230\u5e95\u662f\u600e\u4e48\u201c\u5b66\u4f1a\u201d\u7684\uff1f - \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\/113644.html","og_locale":"zh_CN","og_type":"article","og_title":"VLA \u7cfb\u7edf\u5b66\u4e60\u7b2c 4 \u8bfe\uff1a\u4e00\u4e2a Batch \u8fdb\u5165\u795e\u7ecf\u7f51\u7edc\u540e\uff0c\u6a21\u578b\u5230\u5e95\u662f\u600e\u4e48\u201c\u5b66\u4f1a\u201d\u7684\uff1f - \u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3","og_description":"\u7b2c\u4e09\u8bfe\u6807\u51c6\u7b54\u6848&#xff1a;Robot Dataset1. \u4e3a\u4ec0\u4e48 100 \u4e2a Episode \u4e0d\u4ee3\u8868\u53ea\u6709 100 \u4e2a\u8bad\u7ec3\u6837\u672c&#xff1f;\u56e0\u4e3a&#xff1a;Episode \u662f\u4e00\u6b21\u5b8c\u6574\u4efb\u52a1&#xff0c;\u800c\u8bad\u7ec3\u6837\u672c\u53ef\u4ee5\u6765\u81ea Episode \u5185\u90e8\u7684\u6bcf\u4e2a\u65f6\u95f4\u70b9\u3002\u4f8b\u5982&#xff1a;\\[ 100\\text{ episodes} \\]\u6bcf\u4e2a Episode \u6709&#xff1a;\\[ 100\\text{ frames} \\]\u90a3\u4e48\u6700\u7b80\u5355\u60c5\u51b5\u4e0b\u5c31\u53ef\u80fd\u6709\u7ea6&#xff1a;\\[ 100\\ti","og_url":"https:\/\/www.wsisp.com\/helps\/113644.html","og_site_name":"\u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3","article_published_time":"2026-10-06T18:33:10+00:00","author":"admin","twitter_card":"summary_large_image","twitter_misc":{"\u4f5c\u8005":"admin","\u9884\u8ba1\u9605\u8bfb\u65f6\u95f4":"7 \u5206"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"WebPage","@id":"https:\/\/www.wsisp.com\/helps\/113644.html","url":"https:\/\/www.wsisp.com\/helps\/113644.html","name":"VLA \u7cfb\u7edf\u5b66\u4e60\u7b2c 4 \u8bfe\uff1a\u4e00\u4e2a Batch \u8fdb\u5165\u795e\u7ecf\u7f51\u7edc\u540e\uff0c\u6a21\u578b\u5230\u5e95\u662f\u600e\u4e48\u201c\u5b66\u4f1a\u201d\u7684\uff1f - \u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3","isPartOf":{"@id":"https:\/\/www.wsisp.com\/helps\/#website"},"datePublished":"2026-10-06T18:33:10+00:00","dateModified":"2026-10-06T18:33:10+00:00","author":{"@id":"https:\/\/www.wsisp.com\/helps\/#\/schema\/person\/358e386c577a3ab51c4493330a20ad41"},"breadcrumb":{"@id":"https:\/\/www.wsisp.com\/helps\/113644.html#breadcrumb"},"inLanguage":"zh-Hans","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.wsisp.com\/helps\/113644.html"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/www.wsisp.com\/helps\/113644.html#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"\u9996\u9875","item":"https:\/\/www.wsisp.com\/helps"},{"@type":"ListItem","position":2,"name":"VLA \u7cfb\u7edf\u5b66\u4e60\u7b2c 4 \u8bfe\uff1a\u4e00\u4e2a Batch \u8fdb\u5165\u795e\u7ecf\u7f51\u7edc\u540e\uff0c\u6a21\u578b\u5230\u5e95\u662f\u600e\u4e48\u201c\u5b66\u4f1a\u201d\u7684\uff1f"}]},{"@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\/113644","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=113644"}],"version-history":[{"count":0,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/posts\/113644\/revisions"}],"wp:attachment":[{"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/media?parent=113644"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/categories?post=113644"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/tags?post=113644"},{"taxonomy":"topic","embeddable":true,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/topic?post=113644"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}