PageSourceSearch

https://danling.org/index.zh/

html danling.org collected 2026-09-25 21:50:17 UTC 33,098 bytes, 1,448 lines download raw bytes

1<!-- Google Tag Manager -->
2<script>
vendor: 415 bytes, lines 2-12
2
3  (function (w, d, s, l, i) {
4    w[l] = w[l] || [];
5    w[l].push({ "gtm.start": new Date().getTime(), event: "gtm.js" });
6    var f = d.getElementsByTagName(s)[0],
7      j = d.createElement(s),
8      dl = l != "dataLayer" ? "&l=" + l : "";
9    j.async = true;
10    j.src = "https://www.googletagmanager.com/gtm.js?id=" + i + dl;
11    f.parentNode.insertBefore(j, f);
12  })(window, document, "script", "dataLayer", "
12GTM-KV83JWN
vendor: 4 bytes, line 12
12");
13</script>
13
14<!-- End Google Tag Manager -->
15
16
17<!doctype html>
18<html lang="en" class="no-js">
19  <head>
20    
21      <meta charset="utf-8">
22      <meta name="viewport" content="width=device-width,initial-scale=1">
23      
24        <meta name="description" content="Scaffold for experienced Machine Learning Researchers">
25      
26      
27        <meta name="author" content="DanLing Team">
28      
29      
30        <link rel="canonical" href="https://danling.org/index.zh/">
31      
32      
33        <link rel="prev" href="../about/privacy/">
34      
35      
36        <link rel="next" href="../about/index.zh/">
37      
38      
39        
40          <link rel="alternate" href="/" hreflang="en">
41        
42          <link rel="alternate" href="/index.zh/" hreflang="zh">
43        
44      
45      
46      <link rel="icon" href="../assets/images/logo.ico">
47      <meta name="generator" content="mkdocs-1.6.1, mkdocs-material-9.7.7">
48    
49    
50      
51        <title>中文首页 - DanLing</title>
52      
53    
54    
55      <link rel="stylesheet" href="../assets/stylesheets/main.ec1eaa64.min.css">
56      
57        
58        <link rel="stylesheet" href="../assets/stylesheets/palette.ab4e12ef.min.css">
59      
60      
61
62
63    
64    
65      
66    
67    
68      
69    
70    
71      <link rel="stylesheet" href="../assets/_mkdocstrings.css">
72    
73      <link rel="stylesheet" href="../assets/css/fonts.css">
74    
75      <link rel="stylesheet" href="../assets/css/extra.css">
76    
77    
77<script>__md_scope=new URL("..",location),__md_hash=e=>[...e].reduce(((e,_)=>(e<<5)-e+_.charCodeAt(0)),0),__md_get=(e,_=localStorage,t=__md_scope)=>JSON.parse(_.getItem(t.pathname+"."+e)),__md_set=(e,_,t=localStorage,a=__md_scope)=>{try{t.setItem(a.pathname+"."+e,JSON.stringify(_))}catch(e){}}</script>
77
78    
79      
80  
81
82
83  
84  
85
86<script id="__analytics">function __md_analytics(){function e(){dataLayer.push(arguments)}window.dataLayer=window.dataLayer||[],e("js",new Date),e("config","G-RE7EKZ9T8D"),document.addEventListener("DOMContentLoaded",(function(){document.forms.search&&document.forms.search.query.addEventListener("blur",(function(){this.value&&e("event","search",{search_term:this.value})}));document$.subscribe((function(){var t=document.forms.feedback;if(void 0!==t)for(var a of t.querySelectorAll("[type=submit]"))a.addEventListener("click",(function(a){a.preventDefault();var n=document.location.pathname,d=this.getAttribute("data-md-value");e("event","feedback",{page:n,data:d}),t.firstElementChild.disabled=!0;var r=t.querySelector(".md-feedback__note [data-md-value='"+d+"']");r&&(r.hidden=!1)})),t.hidden=!1})),location$.subscribe((function(t){e("config","G-RE7EKZ9T8D",{page_path:t.pathname})}))}));var t=document.createElement("script");t.async=!0,t.src="https://www.googletagmanager.com/gtag/js?id=G-RE7EKZ9T8D",document.getElementById("__analytics").insertAdjacentElement("afterEnd",t)}</script>
86
87  
88    
88<script>if("undefined"!=typeof __md_analytics){var consent=__md_get("__consent");consent&&consent.analytics&&__md_analytics()}</script>
88
89  
90
91    
92    
93  </head>
94  
95  
96    
97    
98      
99    
100    
101    
102    
103    <body dir="ltr" data-md-color-scheme="slate" data-md-color-primary="blue-grey" data-md-color-accent="teal">
104  
105    
106    <input class="md-toggle" data-md-toggle="drawer" type="checkbox" id="__drawer" autocomplete="off">
107    <input class="md-toggle" data-md-toggle="search" type="checkbox" id="__search" autocomplete="off">
108    <label class="md-overlay" for="__drawer"></label>
109    <div data-md-component="skip">
110      
111        
112        <a href="#danling" class="md-skip">
113          Skip to content
114        </a>
115      
116    </div>
117    <div data-md-component="announce">
118      
119    </div>
120    
121    
122      
123
124  
125
126<header class="md-header md-header--shadow md-header--lifted" data-md-component="header">
127  <nav class="md-header__inner md-grid" aria-label="Header">
128    <a href=".." title="DanLing" class="md-header__button md-logo" aria-label="DanLing" data-md-component="logo">
129      
130  <img src="../assets/images/logo.png" alt="logo">
131
132    </a>
133    <label class="md-header__button md-icon" for="__drawer">
134      
135      <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M3 6h18v2H3zm0 5h18v2H3zm0 5h18v2H3z"/></svg>
136    </label>
137    <div class="md-header__title" data-md-component="header-title">
138      <div class="md-header__ellipsis">
139        <div class="md-header__topic">
140          <span class="md-ellipsis">
141            DanLing
142          </span>
143        </div>
144        <div class="md-header__topic" data-md-component="header-topic">
145          <span class="md-ellipsis">
146            
147              中文首页
148            
149          </span>
150        </div>
151      </div>
152    </div>
153    
154      
155        <form class="md-header__option" data-md-component="palette">
156  
157    
158    
159    
160    <input class="md-option" data-md-color-media="(prefers-color-scheme: dark)" data-md-color-scheme="slate" data-md-color-primary="blue-grey" data-md-color-accent="teal"  aria-label="Switch to light mode"  type="radio" name="__palette" id="__palette_0">
161    
162      <label class="md-header__button md-icon" title="Switch to light mode" for="__palette_1" hidden>
163        <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M12 18c-.89 0-1.74-.2-2.5-.55C11.56 16.5 13 14.42 13 12s-1.44-4.5-3.5-5.45C10.26 6.2 11.11 6 12 6a6 6 0 0 1 6 6 6 6 0 0 1-6 6m8-9.31V4h-4.69L12 .69 8.69 4H4v4.69L.69 12 4 15.31V20h4.69L12 23.31 15.31 20H20v-4.69L23.31 12z"/></svg>
164      </label>
165    
166  
167    
168    
169    
170    <input class="md-option" data-md-color-media="(prefers-color-scheme: light)" data-md-color-scheme="default" data-md-color-primary="blue-grey" data-md-color-accent="teal"  aria-label="Switch to dark mode"  type="radio" name="__palette" id="__palette_1">
171    
172      <label class="md-header__button md-icon" title="Switch to dark mode" for="__palette_0" hidden>
173        <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M12 8a4 4 0 0 0-4 4 4 4 0 0 0 4 4 4 4 0 0 0 4-4 4 4 0 0 0-4-4m0 10a6 6 0 0 1-6-6 6 6 0 0 1 6-6 6 6 0 0 1 6 6 6 6 0 0 1-6 6m8-9.31V4h-4.69L12 .69 8.69 4H4v4.69L.69 12 4 15.31V20h4.69L12 23.31 15.31 20H20v-4.69L23.31 12z"/></svg>
174      </label>
175    
176  
177</form>
178      
179    
180    
181      
181<script>var palette=__md_get("__palette");if(palette&&palette.color){if("(prefers-color-scheme)"===palette.color.media){var media=matchMedia("(prefers-color-scheme: light)"),input=document.querySelector(media.matches?"[data-md-color-media='(prefers-color-scheme: light)']":"[data-md-color-media='(prefers-color-scheme: dark)']");palette.color.media=input.getAttribute("data-md-color-media"),palette.color.scheme=input.getAttribute("data-md-color-scheme"),palette.color.primary=input.getAttribute("data-md-color-primary"),palette.color.accent=input.getAttribute("data-md-color-accent")}for(var[key,value]of Object.entries(palette.color))document.body.setAttribute("data-md-color-"+key,value)}</script>
181
182    
183    
184      <div class="md-header__option">
185  <div class="md-select">
186    
187    <button class="md-header__button md-icon" aria-label="Select language">
188      <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="m12.87 15.07-2.54-2.51.03-.03A17.5 17.5 0 0 0 14.07 6H17V4h-7V2H8v2H1v2h11.17C11.5 7.92 10.44 9.75 9 11.35 8.07 10.32 7.3 9.19 6.69 8h-2c.73 1.63 1.73 3.17 2.98 4.56l-5.09 5.02L4 19l5-5 3.11 3.11zM18.5 10h-2L12 22h2l1.12-3h4.75L21 22h2zm-2.62 7 1.62-4.33L19.12 17z"/></svg>
189    </button>
190    <div class="md-select__inner">
191      <ul class="md-select__list">
192        
193          <li class="md-select__item">
194            <a href="/" hreflang="en" class="md-select__link">
195              English
196            </a>
197          </li>
198        
199          <li class="md-select__item">
200            <a href="/index.zh/" hreflang="zh" class="md-select__link">
201              汉语
202            </a>
203          </li>
204        
205      </ul>
206    </div>
207  </div>
208</div>
209    
210    
211      
212      
213        <label class="md-header__button md-icon" for="__search">
214          
215          <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M9.5 3A6.5 6.5 0 0 1 16 9.5c0 1.61-.59 3.09-1.56 4.23l.27.27h.79l5 5-1.5 1.5-5-5v-.79l-.27-.27A6.52 6.52 0 0 1 9.5 16 6.5 6.5 0 0 1 3 9.5 6.5 6.5 0 0 1 9.5 3m0 2C7 5 5 7 5 9.5S7 14 9.5 14 14 12 14 9.5 12 5 9.5 5"/></svg>
216        </label>
217        <div class="md-search" data-md-component="search" role="dialog">
218  <label class="md-search__overlay" for="__search"></label>
219  <div class="md-search__inner" role="search">
220    <form class="md-search__form" name="search">
221      <input type="text" class="md-search__input" name="query" aria-label="Search" placeholder="Search" autocapitalize="off" autocorrect="off" autocomplete="off" spellcheck="false" data-md-component="search-query" required>
222      <label class="md-search__icon md-icon" for="__search">
223        
224        <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M9.5 3A6.5 6.5 0 0 1 16 9.5c0 1.61-.59 3.09-1.56 4.23l.27.27h.79l5 5-1.5 1.5-5-5v-.79l-.27-.27A6.52 6.52 0 0 1 9.5 16 6.5 6.5 0 0 1 3 9.5 6.5 6.5 0 0 1 9.5 3m0 2C7 5 5 7 5 9.5S7 14 9.5 14 14 12 14 9.5 12 5 9.5 5"/></svg>
225        
226        <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M20 11v2H8l5.5 5.5-1.42 1.42L4.16 12l7.92-7.92L13.5 5.5 8 11z"/></svg>
227      </label>
228      <nav class="md-search__options" aria-label="Search">
229        
230          <a href="javascript:void(0)" class="md-search__icon md-icon" title="Share" aria-label="Share" data-clipboard data-clipboard-text="" data-md-component="search-share" tabindex="-1">
231            
232            <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M18 16.08c-.76 0-1.44.3-1.96.77L8.91 12.7c.05-.23.09-.46.09-.7s-.04-.47-.09-.7l7.05-4.11c.54.5 1.25.81 2.04.81a3 3 0 0 0 3-3 3 3 0 0 0-3-3 3 3 0 0 0-3 3c0 .24.04.47.09.7L8.04 9.81C7.5 9.31 6.79 9 6 9a3 3 0 0 0-3 3 3 3 0 0 0 3 3c.79 0 1.5-.31 2.04-.81l7.12 4.15c-.05.21-.08.43-.08.66 0 1.61 1.31 2.91 2.92 2.91s2.92-1.3 2.92-2.91A2.92 2.92 0 0 0 18 16.08"/></svg>
233          </a>
234        
235        <button type="reset" class="md-search__icon md-icon" title="Clear" aria-label="Clear" tabindex="-1">
236          
237          <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M19 6.41 17.59 5 12 10.59 6.41 5 5 6.41 10.59 12 5 17.59 6.41 19 12 13.41 17.59 19 19 17.59 13.41 12z"/></svg>
238        </button>
239      </nav>
240      
241        <div class="md-search__suggest" data-md-component="search-suggest"></div>
242      
243    </form>
244    <div class="md-search__output">
245      <div class="md-search__scrollwrap" tabindex="0" data-md-scrollfix>
246        <div class="md-search-result" data-md-component="search-result">
247          <div class="md-search-result__meta">
248            Initializing search
249          </div>
250          <ol class="md-search-result__list" role="presentation"></ol>
251        </div>
252      </div>
253    </div>
254  </div>
255</div>
256      
257    
258    
259      <div class="md-header__source">
260        <a href="https://github.com/ZhiyuanChen/DanLing" title="Go to repository" class="md-source" data-md-component="source">
261  <div class="md-source__icon md-icon">
262    
263    <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 448 512"><!--! Font Awesome Free 7.1.0 by @fontawesome - https://fontawesome.com License - https://fontawesome.com/license/free (Icons: CC BY 4.0, Fonts: SIL OFL 1.1, Code: MIT License) Copyright 2025 Fonticons, Inc.--><path d="M439.6 236.1 244 40.5c-5.4-5.5-12.8-8.5-20.4-8.5s-15 3-20.4 8.4L162.5 81l51.5 51.5c27.1-9.1 52.7 16.8 43.4 43.7l49.7 49.7c34.2-11.8 61.2 31 35.5 56.7-26.5 26.5-70.2-2.9-56-37.3L240.3 199v121.9c25.3 12.5 22.3 41.8 9.1 55-6.4 6.4-15.2 10.1-24.3 10.1s-17.8-3.6-24.3-10.1c-17.6-17.6-11.1-46.9 11.2-56v-123c-20.8-8.5-24.6-30.7-18.6-45L142.6 101 8.5 235.1C3 240.6 0 247.9 0 255.5s3 15 8.5 20.4l195.6 195.7c5.4 5.4 12.7 8.4 20.4 8.4s15-3 20.4-8.4l194.7-194.7c5.4-5.4 8.4-12.8 8.4-20.4s-3-15-8.4-20.4"/></svg>
264  </div>
265  <div class="md-source__repository">
266    DanLing
267  </div>
268</a>
269      </div>
270    
271  </nav>
272  
273    
274      
275<nav class="md-tabs" aria-label="Tabs" data-md-component="tabs">
276  <div class="md-grid">
277    <ul class="md-tabs__list">
278      
279        
280  
281  
282  
283  
284    <li class="md-tabs__item">
285      <a href=".." class="md-tabs__link">
286        
287  
288  
289    
290  
291  DanLing
292
293      </a>
294    </li>
295  
296
297      
298        
299  
300  
301  
302  
303    <li class="md-tabs__item">
304      <a href="../runners/" class="md-tabs__link">
305        
306  
307  
308    
309  
310  Runners
311
312      </a>
313    </li>
314  
315
316      
317        
318  
319  
320  
321  
322    <li class="md-tabs__item">
323      <a href="../tensors/" class="md-tabs__link">
324        
325  
326  
327    
328  
329  Tensors
330
331      </a>
332    </li>
333  
334
335      
336        
337  
338  
339  
340  
341    
342    
343      <li class="md-tabs__item">
344        <a href="../optim/lr_scheduler/" class="md-tabs__link">
345          
346  
347  
348    
349  
350  Optim
351
352        </a>
353      </li>
354    
355  
356
357      
358        
359  
360  
361  
362  
363    <li class="md-tabs__item">
364      <a href="../metrics/" class="md-tabs__link">
365        
366  
367  
368    
369  
370  Metrics
371
372      </a>
373    </li>
374  
375
376      
377        
378  
379  
380  
381  
382    
383    
384      <li class="md-tabs__item">
385        <a href="../utils/decorators/" class="md-tabs__link">
386          
387  
388  
389    
390  
391  Utils
392
393        </a>
394      </li>
395    
396  
397
398      
399        
400  
401  
402  
403  
404    <li class="md-tabs__item">
405      <a href="../package/" class="md-tabs__link">
406        
407  
408  
409    
410  
411  package
412
413      </a>
414    </li>
415  
416
417      
418        
419  
420  
421  
422  
423    
424    
425      <li class="md-tabs__item">
426        <a href="../about/" class="md-tabs__link">
427          
428  
429  
430    
431  
432  About
433
434        </a>
435      </li>
436    
437  
438
439      
440        
441  
442  
443  
444    
445  
446  
447    
448    
449      <li class="md-tabs__item md-tabs__item--active">
450        <a href="./" class="md-tabs__link">
451          
452  
453  
454    
455  
456  中文
457
458        </a>
459      </li>
460    
461  
462
463      
464    </ul>
465  </div>
466</nav>
467    
468  
469</header>
470    
471    <div class="md-container" data-md-component="container">
472      
473      
474        
475      
476      <main class="md-main" data-md-component="main">
477        <div class="md-main__inner md-grid">
478          
479            
480              
481              <div class="md-sidebar md-sidebar--primary" data-md-component="sidebar" data-md-type="navigation" >
482                <div class="md-sidebar__scrollwrap">
483                  <div class="md-sidebar__inner">
484                    
485
486
487  
488
489
490<nav class="md-nav md-nav--primary md-nav--lifted" aria-label="Navigation" data-md-level="0">
491  <label class="md-nav__title" for="__drawer">
492    <a href=".." title="DanLing" class="md-nav__button md-logo" aria-label="DanLing" data-md-component="logo">
493      
494  <img src="../assets/images/logo.png" alt="logo">
495
496    </a>
497    DanLing
498  </label>
499  
500    <div class="md-nav__source">
501      <a href="https://github.com/ZhiyuanChen/DanLing" title="Go to repository" class="md-source" data-md-component="source">
502  <div class="md-source__icon md-icon">
503    
504    <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 448 512"><!--! Font Awesome Free 7.1.0 by @fontawesome - https://fontawesome.com License - https://fontawesome.com/license/free (Icons: CC BY 4.0, Fonts: SIL OFL 1.1, Code: MIT License) Copyright 2025 Fonticons, Inc.--><path d="M439.6 236.1 244 40.5c-5.4-5.5-12.8-8.5-20.4-8.5s-15 3-20.4 8.4L162.5 81l51.5 51.5c27.1-9.1 52.7 16.8 43.4 43.7l49.7 49.7c34.2-11.8 61.2 31 35.5 56.7-26.5 26.5-70.2-2.9-56-37.3L240.3 199v121.9c25.3 12.5 22.3 41.8 9.1 55-6.4 6.4-15.2 10.1-24.3 10.1s-17.8-3.6-24.3-10.1c-17.6-17.6-11.1-46.9 11.2-56v-123c-20.8-8.5-24.6-30.7-18.6-45L142.6 101 8.5 235.1C3 240.6 0 247.9 0 255.5s3 15 8.5 20.4l195.6 195.7c5.4 5.4 12.7 8.4 20.4 8.4s15-3 20.4-8.4l194.7-194.7c5.4-5.4 8.4-12.8 8.4-20.4s-3-15-8.4-20.4"/></svg>
505  </div>
506  <div class="md-source__repository">
507    DanLing
508  </div>
509</a>
510    </div>
511  
512  <ul class="md-nav__list" data-md-scrollfix>
513    
514      
515      
516  
517  
518  
519  
520    <li class="md-nav__item">
521      <a href=".." class="md-nav__link">
522        
523  
524  
525  <span class="md-ellipsis">
526    
527  
528    DanLing
529  
530
531    
532  </span>
533  
534  
535
536      </a>
537    </li>
538  
539
540    
541      
542      
543  
544  
545  
546  
547    
548    
549      
550        
551      
552        
553      
554        
555      
556        
557      
558        
559      
560    
561    
562    
563      
564      
565        
566      
567    
568    
569      
570        
571        
572      
573    
574    <li class="md-nav__item md-nav__item--pruned md-nav__item--nested">
575      
576        
577  
578  
579  
580    <a href="../runners/config/" class="md-nav__link">
581      
582  
583  
584  <span class="md-ellipsis">
585    
586  
587    Runners
588  
589
590    
591  </span>
592  
593  
594
595      
596        <span class="md-nav__icon md-icon"></span>
597      
598    </a>
599  
600
601      
602    </li>
603  
604
605    
606      
607      
608  
609  
610  
611  
612    
613    
614      
615        
616      
617        
618      
619        
620      
621    
622    
623    
624      
625      
626        
627      
628    
629    
630      
631        
632        
633      
634    
635    <li class="md-nav__item md-nav__item--pruned md-nav__item--nested">
636      
637        
638  
639  
640  
641    <a href="../tensors/nested_tensor/" class="md-nav__link">
642      
643  
644  
645  <span class="md-ellipsis">
646    
647  
648    Tensors
649  
650
651    
652  </span>
653  
654  
655
656      
657        <span class="md-nav__icon md-icon"></span>
658      
659    </a>
660  
661
662      
663    </li>
664  
665
666    
667      
668      
669  
670  
671  
672  
673    
674    
675      
676        
677      
678    
679    
680    
681      
682      
683        
684      
685    
686    
687      
688        
689        
690      
691    
692    <li class="md-nav__item md-nav__item--pruned md-nav__item--nested">
693      
694        
695  
696  
697  
698    <a href="../optim/lr_scheduler/" class="md-nav__link">
699      
700  
701  
702  <span class="md-ellipsis">
703    
704  
705    Optim
706  
707
708    
709  </span>
710  
711  
712
713      
714        <span class="md-nav__icon md-icon"></span>
715      
716    </a>
717  
718
719      
720    </li>
721  
722
723    
724      
725      
726  
727  
728  
729  
730    
731    
732      
733        
734      
735        
736      
737        
738      
739        
740      
741        
742      
743        
744      
745    
746    
747    
748      
749      
750        
751      
752    
753    
754      
755        
756        
757      
758    
759    <li class="md-nav__item md-nav__item--pruned md-nav__item--nested">
760      
761        
762  
763  
764  
765    <a href="../metrics/metrics/" class="md-nav__link">
766      
767  
768  
769  <span class="md-ellipsis">
770    
771  
772    Metrics
773  
774
775    
776  </span>
777  
778  
779
780      
781        <span class="md-nav__icon md-icon"></span>
782      
783    </a>
784  
785
786      
787    </li>
788  
789
790    
791      
792      
793  
794  
795  
796  
797    
798    
799      
800        
801      
802        
803      
804        
805      
806        
807      
808    
809    
810    
811      
812      
813        
814      
815    
816    
817      
818        
819        
820      
821    
822    <li class="md-nav__item md-nav__item--pruned md-nav__item--nested">
823      
824        
825  
826  
827  
828    <a href="../utils/decorators/" class="md-nav__link">
829      
830  
831  
832  <span class="md-ellipsis">
833    
834  
835    Utils
836  
837
838    
839  </span>
840  
841  
842
843      
844        <span class="md-nav__icon md-icon"></span>
845      
846    </a>
847  
848
849      
850    </li>
851  
852
853    
854      
855      
856  
857  
858  
859  
860    <li class="md-nav__item">
861      <a href="../package/" class="md-nav__link">
862        
863  
864  
865  <span class="md-ellipsis">
866    
867  
868    package
869  
870
871    
872  </span>
873  
874  
875
876      </a>
877    </li>
878  
879
880    
881      
882      
883  
884  
885  
886  
887    
888    
889      
890        
891          
892        
893      
894        
895      
896        
897      
898    
899    
900    
901      
902      
903        
904      
905    
906    
907      
908        
909        
910      
911    
912    <li class="md-nav__item md-nav__item--pruned md-nav__item--nested">
913      
914        
915  
916  
917  
918    <a href="../about/" class="md-nav__link">
919      
920  
921  
922  <span class="md-ellipsis">
923    
924  
925    About
926  
927
928    
929  </span>
930  
931  
932
933      
934        <span class="md-nav__icon md-icon"></span>
935      
936    </a>
937  
938
939      
940    </li>
941  
942
943    
944      
945      
946  
947  
948    
949  
950  
951  
952    
953    
954      
955        
956      
957        
958      
959        
960      
961        
962      
963    
964    
965    
966      
967        
968        
969      
970      
971        
972      
973    
974    
975      
976    
977    <li class="md-nav__item md-nav__item--active md-nav__item--section md-nav__item--nested">
978      
979        
980        
981        <input class="md-nav__toggle md-toggle " type="checkbox" id="__nav_9" checked>
982        
983          
984          <label class="md-nav__link" for="__nav_9" id="__nav_9_label" tabindex="">
985            
986  
987  
988  <span class="md-ellipsis">
989    
990  
991    中文
992  
993
994    
995  </span>
996  
997  
998
999            <span class="md-nav__icon md-icon"></span>
1000          </label>
1001        
1002        <nav class="md-nav" data-md-level="1" aria-labelledby="__nav_9_label" aria-expanded="true">
1003          <label class="md-nav__title" for="__nav_9">
1004            <span class="md-nav__icon md-icon"></span>
1005            
1006  
1007    中文
1008  
1009
1010          </label>
1011          <ul class="md-nav__list" data-md-scrollfix>
1012            
1013              
1014                
1015  
1016  
1017    
1018  
1019  
1020  
1021    <li class="md-nav__item md-nav__item--active">
1022      
1023      <input class="md-nav__toggle md-toggle" type="checkbox" id="__toc">
1024      
1025      
1026        
1027      
1028      
1029      <a href="./" class="md-nav__link md-nav__link--active">
1030        
1031  
1032  
1033  <span class="md-ellipsis">
1034    
1035  
1036    中文首页
1037  
1038
1039    
1040  </span>
1041  
1042  
1043
1044      </a>
1045      
1046    </li>
1047  
1048
1049              
1050            
1051              
1052                
1053  
1054  
1055  
1056  
1057    <li class="md-nav__item">
1058      <a href="../about/index.zh/" class="md-nav__link">
1059        
1060  
1061  
1062  <span class="md-ellipsis">
1063    
1064  
1065    关于 DanLing
1066  
1067
1068    
1069  </span>
1070  
1071  
1072
1073      </a>
1074    </li>
1075  
1076
1077              
1078            
1079              
1080                
1081  
1082  
1083  
1084  
1085    <li class="md-nav__item">
1086      <a href="../about/license.zh/" class="md-nav__link">
1087        
1088  
1089  
1090  <span class="md-ellipsis">
1091    
1092  
1093    许可协议
1094  
1095
1096    
1097  </span>
1098  
1099  
1100
1101      </a>
1102    </li>
1103  
1104
1105              
1106            
1107              
1108                
1109  
1110  
1111  
1112  
1113    <li class="md-nav__item">
1114      <a href="../about/privacy.zh/" class="md-nav__link">
1115        
1116  
1117  
1118  <span class="md-ellipsis">
1119    
1120  
1121    隐私声明
1122  
1123
1124    
1125  </span>
1126  
1127  
1128
1129      </a>
1130    </li>
1131  
1132
1133              
1134            
1135          </ul>
1136        </nav>
1137      
1138    </li>
1139  
1140
1141    
1142  </ul>
1143</nav>
1144                  </div>
1145                </div>
1146              </div>
1147            
1148            
1149              
1150              <div class="md-sidebar md-sidebar--secondary" data-md-component="sidebar" data-md-type="toc" >
1151                <div class="md-sidebar__scrollwrap">
1152                  <div class="md-sidebar__inner">
1153                    
1154
1155<nav class="md-nav md-nav--secondary" aria-label="Table of contents">
1156  
1157  
1158  
1159    
1160  
1161  
1162</nav>
1163                  </div>
1164                </div>
1165              </div>
1166            
1167          
1168          
1169            <div class="md-content" data-md-component="content">
1170              
1171              <article class="md-content__inner md-typeset">
1172                 
1173                  
1174
1175
1176  
1177  
1178
1179
1180<h1 id="danling">DanLing<a class="headerlink" href="#danling" title="Permanent link">&para;</a></h1>
1181<p>DanLing 为机器学习研究提供训练运行器、变长张量、指标和常用工具。</p>
1182<p>API 参考使用英文,包含当前接口的参数、行为说明和示例:</p>
1183<ul>
1184<li><a href="https://danling.org/package/">公共接口目录</a></li>
1185<li><a href="https://danling.org/runners/">Runners:训练、评估与推理</a></li>
1186<li><a href="https://danling.org/tensors/">Tensors:变长张量与 PyTorch 集成</a></li>
1187<li><a href="https://danling.org/optim/lr_scheduler/">Optim:学习率调度</a></li>
1188<li><a href="https://danling.org/metrics/">Metrics:数据集指标与流式指标</a></li>
1189<li><a href="https://danling.org/utils/io/">Utils:序列化与文件读取</a></li>
1190</ul>
1191<p>中文说明:<a href="../about/index.zh/">关于 DanLing</a>、<a href="../about/license.zh/">许可协议</a>、<a href="../about/privacy.zh/">隐私声明</a>。</p>
1192
1193
1194
1195
1196
1197
1198
1199  
1200    
1201  
1202  
1203
1204
1205  <aside class="md-source-file">
1206    
1207      
1208  <span class="md-source-file__fact">
1209    <span class="md-icon" title="Last update">
1210      <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M21 13.1c-.1 0-.3.1-.4.2l-1 1 2.1 2.1 1-1c.2-.2.2-.6 0-.8l-1.3-1.3c-.1-.1-.2-.2-.4-.2m-1.9 1.8-6.1 6V23h2.1l6.1-6.1zM12.5 7v5.2l4 2.4-1 1L11 13V7zM11 21.9c-5.1-.5-9-4.8-9-9.9C2 6.5 6.5 2 12 2c5.3 0 9.6 4.1 10 9.3-.3-.1-.6-.2-1-.2s-.7.1-1 .2C19.6 7.2 16.2 4 12 4c-4.4 0-8 3.6-8 8 0 4.1 3.1 7.5 7.1 7.9l-.1.2z"/></svg>
1211    </span>
1212    <span class="git-revision-date-localized-plugin git-revision-date-localized-plugin-iso_datetime" title="September 9, 2026 09:46:02 UTC">2026-09-09 09:46:02</span>
1213  </span>
1214
1215    
1216    
1217    
1218    
1219  </aside>
1220
1221
1222  
1223
1224
1225
1226
1227                
1228
1229<!-- Giscus -->
1230<script
1231  src="https://giscus.app/client.js"
1232  data-repo="ZhiyuanChen/DanLing"
1233  data-repo-id="R_kgDOGv-RWA"
1234  data-category="General"
1235  data-category-id="DIC_kwDOGv-RWM4CTx_d"
1236  data-mapping="pathname"
1237  data-strict="0"
1238  data-reactions-enabled="1"
1239  data-emit-metadata="1"
1240  data-input-position="top"
1241  data-theme="preferred_color_scheme"
1242  data-lang="en"
1243  data-loading="lazy"
1244  crossorigin="anonymous"
1245  async
1246></script>
1246
1247
1248<!-- Reload on palette change -->
1249<script>
1250  var palette = __md_get("__palette");
1251  if (palette && typeof palette.color === "object")
1252    if (palette.color.scheme === "slate") {
1253      var giscus = document.querySelector("script[src*=giscus]");
1254      giscus.setAttribute("data-theme", "dark");
1255    }
1256
1257  /* Register event handlers after documented loaded */
1258  document.addEventListener("DOMContentLoaded", function () {
1259    var ref = document.querySelector("[data-md-component=palette]");
1260    ref.addEventListener("change", function () {
1261      var palette = __md_get("__palette");
1262      if (palette && typeof palette.color === "object") {
1263        var theme = palette.color.scheme === "slate" ? "dark" : "light";
1264
1265        /* Instruct Giscus to change theme */
1266        var frame = document.querySelector(".giscus-frame");
1267        frame.contentWindow.postMessage(
1268          { giscus: { setConfig: { theme } } },
1269          "https://giscus.app",
1270        );
1271      }
1272    });
1273  });
1274</script>
1274
1275
1276              </article>
1277            </div>
1278          
1279          
1280  
1280<script>var tabs=__md_get("__tabs");if(Array.isArray(tabs))e:for(var set of document.querySelectorAll(".tabbed-set")){var labels=set.querySelector(".tabbed-labels");for(var tab of tabs)for(var label of labels.getElementsByTagName("label"))if(label.innerText.trim()===tab){var input=document.getElementById(label.htmlFor);input.checked=!0;continue e}}</script>
1280
1281
1282<script>var target=document.getElementById(location.hash.slice(1));target&&target.name&&(target.checked=target.name.startsWith("__tabbed_"))</script>
1282
1283        </div>
1284        
1285          <button type="button" class="md-top md-icon" data-md-component="top" hidden>
1286  
1287  <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M13 20h-2V8l-5.5 5.5-1.42-1.42L12 4.16l7.92 7.92-1.42 1.42L13 8z"/></svg>
1288  Back to top
1289</button>
1290        
1291      </main>
1292      
1293        <footer class="md-footer">
1294  
1295    
1296      
1297      <nav class="md-footer__inner md-grid" aria-label="Footer" >
1298        
1299          
1300          <a href="../about/privacy/" class="md-footer__link md-footer__link--prev" aria-label="Previous: Privacy Notice">
1301            <div class="md-footer__button md-icon">
1302              
1303              <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M20 11v2H8l5.5 5.5-1.42 1.42L4.16 12l7.92-7.92L13.5 5.5 8 11z"/></svg>
1304            </div>
1305            <div class="md-footer__title">
1306              <span class="md-footer__direction">
1307                Previous
1308              </span>
1309              <div class="md-ellipsis">
1310                Privacy Notice
1311              </div>
1312            </div>
1313          </a>
1314        
1315        
1316          
1317          <a href="../about/index.zh/" class="md-footer__link md-footer__link--next" aria-label="Next: 关于 DanLing">
1318            <div class="md-footer__title">
1319              <span class="md-footer__direction">
1320                Next
1321              </span>
1322              <div class="md-ellipsis">
1323                关于 DanLing
1324              </div>
1325            </div>
1326            <div class="md-footer__button md-icon">
1327              
1328              <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M4 11v2h12l-5.5 5.5 1.42 1.42L19.84 12l-7.92-7.92L10.5 5.5 16 11z"/></svg>
1329            </div>
1330          </a>
1331        
1332      </nav>
1333    
1334  
1335  <div class="md-footer-meta md-typeset">
1336    <div class="md-footer-meta__inner md-grid">
1337      <div class="md-copyright">
1338  
1339    <div class="md-copyright__highlight">
1340      All rights reserved &copy; 2021-Present, DanLing Team
1341    </div>
1342  
1343  
1344</div>
1345      
1346    </div>
1347  </div>
1348</footer>
1349      
1350    </div>
1351    <div class="md-dialog" data-md-component="dialog">
1352      <div class="md-dialog__inner md-typeset"></div>
1353    </div>
1354    
1355    
1356      <div class="md-consent" data-md-component="consent" id="__consent" hidden>
1357        <div class="md-consent__overlay"></div>
1358        <aside class="md-consent__inner">
1359          <form class="md-consent__form md-grid md-typeset" name="consent">
1360            
1361
1362
1363  
1364
1365
1366<h4>Cookie Consent</h4>
1367<p>We use cookies to recognize your repeated visits and preferences, as well as to measure the effectiveness of our documentation and whether users find what they're searching for. With your consent, you're helping us to make our documentation better. Please check out our <a href="https://danling.org/about/privacy">Privacy Notice</a> for more information.</p>
1368<input class="md-toggle" type="checkbox" id="__settings" >
1369<div class="md-consent__settings">
1370  <ul class="task-list">
1371    
1372    
1373      
1374        
1375  
1376  
1377    
1378    
1379  
1380  <li class="task-list-item">
1381    <label class="task-list-control">
1382      <input type="checkbox" name="analytics" checked>
1383      <span class="task-list-indicator"></span>
1384      Google Analytics
1385    </label>
1386  </li>
1387
1388      
1389    
1390    
1391      
1392        
1393  
1394  
1395    
1396    
1397  
1398  <li class="task-list-item">
1399    <label class="task-list-control">
1400      <input type="checkbox" name="github" checked>
1401      <span class="task-list-indicator"></span>
1402      GitHub
1403    </label>
1404  </li>
1405
1406      
1407    
1408    
1409  </ul>
1410</div>
1411<div class="md-consent__controls">
1412  
1413    
1414      <button class="md-button md-button--primary">Accept</button>
1415    
1416    
1417    
1418  
1419    
1420    
1421    
1422      <label class="md-button" for="__settings">Manage settings</label>
1423    
1424  
1425</div>
1426          </form>
1427        </aside>
1428      </div>
1429      
1429<script>var consent=__md_get("__consent");if(consent)for(var input of document.forms.consent.elements)input.name&&(input.checked=consent[input.name]||!1);else"file:"!==location.protocol&&setTimeout((function(){document.querySelector("[data-md-component=consent]").hidden=!1}),250);var form=document.forms.consent;for(var action of["submit","reset"])form.addEventListener(action,(function(e){if(e.preventDefault(),"reset"===e.type)for(var n of document.forms.consent.elements)n.name&&(n.checked=!1);__md_set("__consent",Object.fromEntries(Array.from(new FormData(form).keys()).map((function(e){return[e,!0]})))),location.hash="",location.reload()}))</script>
1429
1430    
1431    
1432      
1433      
1434      
1434<script id="__config" type="application/json">{"annotate": null, "base": "..", "features": ["announce.dismiss", "content.code.annotate", "content.code.copy", "content.code.select", "content.tabs.link", "content.tooltips", "header.autohide", "navigation.expand", "navigation.footer", "navigation.indexes", "navigation.prune", "navigation.sections", "navigation.tabs", "navigation.tabs.sticky", "navigation.top", "navigation.tracking", "search.highlight", "search.share", "search.suggest", "toc.follow"], "search": "../assets/javascripts/workers/search.2c215733.min.js", "tags": null, "translations": {"clipboard.copied": "Copied to clipboard", "clipboard.copy": "Copy to clipboard", "search.result.more.one": "1 more on this page", "search.result.more.other": "# more on this page", "search.result.none": "No matching documents", "search.result.one": "1 matching document", "search.result.other": "# matching documents", "search.result.placeholder": "Type to start searching", "search.result.term.missing": "Missing", "select.version": "Select version"}, "version": null}</script>
1434
1435    
1436    
1437      
1437<script src="../assets/javascripts/bundle.d7400e89.min.js"></script>
1437
1438      
1439        
1439<script src="../javascripts/mathjax.js"></script>
1439
1440      
1441        
1441<script src="https://cdn.jsdelivr.net/npm/mathjax@3/es5/tex-mml-chtml.js"></script>
1441
1442      
1443        
1443<script src="../javascripts/shortcuts.js"></script>
1443
1444      
1445    
1446  
1446<script type="module" src="https://static.cloudflareinsights.com/beacon.min.js/v31edd6df95cf4e85bb4c19e7a9bdbcba1788362987495" integrity="sha512-iIg7k2xntmwu6/uSb5tpc/hySgZc4eoL31yB29W6tJFo2akwjPWcEqnCEdJvGexCL0KEQwVYv5BlowfhVz26hg==" data-cf-beacon='{"version":"2024.11.0","token":"9c892eda43914cc59e37016c23ab0870","r":1,"spa":2}' crossorigin="anonymous"></script>
1446
1447</body>
1448</html>

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.