Skip to content

Commit dee4fdc

Browse files
Update
1 parent 90abf82 commit dee4fdc

22 files changed

+4581
-51
lines changed

book/datasets/overview.html

Lines changed: 261 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,261 @@
1+
<!DOCTYPE HTML>
2+
<html lang="en" class="light sidebar-visible" dir="ltr">
3+
<head>
4+
<!-- Book generated using mdBook -->
5+
<meta charset="UTF-8">
6+
<title>Datasets - DD-Ranking Benchmark</title>
7+
8+
9+
<!-- Custom HTML head -->
10+
11+
<meta name="description" content="">
12+
<meta name="viewport" content="width=device-width, initial-scale=1">
13+
<meta name="theme-color" content="#ffffff">
14+
15+
<link rel="icon" href="../favicon.svg">
16+
<link rel="shortcut icon" href="../favicon.png">
17+
<link rel="stylesheet" href="../css/variables.css">
18+
<link rel="stylesheet" href="../css/general.css">
19+
<link rel="stylesheet" href="../css/chrome.css">
20+
<link rel="stylesheet" href="../css/print.css" media="print">
21+
22+
<!-- Fonts -->
23+
<link rel="stylesheet" href="../FontAwesome/css/font-awesome.css">
24+
<link rel="stylesheet" href="../fonts/fonts.css">
25+
26+
<!-- Highlight.js Stylesheets -->
27+
<link rel="stylesheet" href="../highlight.css">
28+
<link rel="stylesheet" href="../tomorrow-night.css">
29+
<link rel="stylesheet" href="../ayu-highlight.css">
30+
31+
<!-- Custom theme stylesheets -->
32+
33+
34+
<!-- Provide site root to javascript -->
35+
<script>
36+
var path_to_root = "../";
37+
var default_theme = window.matchMedia("(prefers-color-scheme: dark)").matches ? "navy" : "light";
38+
</script>
39+
<!-- Start loading toc.js asap -->
40+
<script src="../toc.js"></script>
41+
</head>
42+
<body>
43+
<div id="body-container">
44+
<!-- Work around some values being stored in localStorage wrapped in quotes -->
45+
<script>
46+
try {
47+
var theme = localStorage.getItem('mdbook-theme');
48+
var sidebar = localStorage.getItem('mdbook-sidebar');
49+
50+
if (theme.startsWith('"') && theme.endsWith('"')) {
51+
localStorage.setItem('mdbook-theme', theme.slice(1, theme.length - 1));
52+
}
53+
54+
if (sidebar.startsWith('"') && sidebar.endsWith('"')) {
55+
localStorage.setItem('mdbook-sidebar', sidebar.slice(1, sidebar.length - 1));
56+
}
57+
} catch (e) { }
58+
</script>
59+
60+
<!-- Set the theme before any content is loaded, prevents flash -->
61+
<script>
62+
var theme;
63+
try { theme = localStorage.getItem('mdbook-theme'); } catch(e) { }
64+
if (theme === null || theme === undefined) { theme = default_theme; }
65+
const html = document.documentElement;
66+
html.classList.remove('light')
67+
html.classList.add(theme);
68+
html.classList.add("js");
69+
</script>
70+
71+
<input type="checkbox" id="sidebar-toggle-anchor" class="hidden">
72+
73+
<!-- Hide / unhide sidebar before it is displayed -->
74+
<script>
75+
var sidebar = null;
76+
var sidebar_toggle = document.getElementById("sidebar-toggle-anchor");
77+
if (document.body.clientWidth >= 1080) {
78+
try { sidebar = localStorage.getItem('mdbook-sidebar'); } catch(e) { }
79+
sidebar = sidebar || 'visible';
80+
} else {
81+
sidebar = 'hidden';
82+
}
83+
sidebar_toggle.checked = sidebar === 'visible';
84+
html.classList.remove('sidebar-visible');
85+
html.classList.add("sidebar-" + sidebar);
86+
</script>
87+
88+
<nav id="sidebar" class="sidebar" aria-label="Table of contents">
89+
<!-- populated by js -->
90+
<mdbook-sidebar-scrollbox class="sidebar-scrollbox"></mdbook-sidebar-scrollbox>
91+
<noscript>
92+
<iframe class="sidebar-iframe-outer" src="../toc.html"></iframe>
93+
</noscript>
94+
<div id="sidebar-resize-handle" class="sidebar-resize-handle">
95+
<div class="sidebar-resize-indicator"></div>
96+
</div>
97+
</nav>
98+
99+
<div id="page-wrapper" class="page-wrapper">
100+
101+
<div class="page">
102+
<div id="menu-bar-hover-placeholder"></div>
103+
<div id="menu-bar" class="menu-bar sticky">
104+
<div class="left-buttons">
105+
<label id="sidebar-toggle" class="icon-button" for="sidebar-toggle-anchor" title="Toggle Table of Contents" aria-label="Toggle Table of Contents" aria-controls="sidebar">
106+
<i class="fa fa-bars"></i>
107+
</label>
108+
<button id="theme-toggle" class="icon-button" type="button" title="Change theme" aria-label="Change theme" aria-haspopup="true" aria-expanded="false" aria-controls="theme-list">
109+
<i class="fa fa-paint-brush"></i>
110+
</button>
111+
<ul id="theme-list" class="theme-popup" aria-label="Themes" role="menu">
112+
<li role="none"><button role="menuitem" class="theme" id="light">Light</button></li>
113+
<li role="none"><button role="menuitem" class="theme" id="rust">Rust</button></li>
114+
<li role="none"><button role="menuitem" class="theme" id="coal">Coal</button></li>
115+
<li role="none"><button role="menuitem" class="theme" id="navy">Navy</button></li>
116+
<li role="none"><button role="menuitem" class="theme" id="ayu">Ayu</button></li>
117+
</ul>
118+
<button id="search-toggle" class="icon-button" type="button" title="Search. (Shortkey: s)" aria-label="Toggle Searchbar" aria-expanded="false" aria-keyshortcuts="S" aria-controls="searchbar">
119+
<i class="fa fa-search"></i>
120+
</button>
121+
</div>
122+
123+
<h1 class="menu-title">DD-Ranking Benchmark</h1>
124+
125+
<div class="right-buttons">
126+
<a href="../print.html" title="Print this book" aria-label="Print this book">
127+
<i id="print-button" class="fa fa-print"></i>
128+
</a>
129+
130+
</div>
131+
</div>
132+
133+
<div id="search-wrapper" class="hidden">
134+
<form id="searchbar-outer" class="searchbar-outer">
135+
<input type="search" id="searchbar" name="searchbar" placeholder="Search this book ..." aria-controls="searchresults-outer" aria-describedby="searchresults-header">
136+
</form>
137+
<div id="searchresults-outer" class="searchresults-outer hidden">
138+
<div id="searchresults-header" class="searchresults-header"></div>
139+
<ul id="searchresults">
140+
</ul>
141+
</div>
142+
</div>
143+
144+
<!-- Apply ARIA attributes after the sidebar and the sidebar toggle button are added to the DOM -->
145+
<script>
146+
document.getElementById('sidebar-toggle').setAttribute('aria-expanded', sidebar === 'visible');
147+
document.getElementById('sidebar').setAttribute('aria-hidden', sidebar !== 'visible');
148+
Array.from(document.querySelectorAll('#sidebar a')).forEach(function(link) {
149+
link.setAttribute('tabIndex', sidebar === 'visible' ? 0 : -1);
150+
});
151+
</script>
152+
153+
<div id="content" class="content">
154+
<main>
155+
<h1 id="datasets"><a class="header" href="#datasets">Datasets</a></h1>
156+
<p>DD-Ranking provides a set of commonly used datasets in existing dataset distillation methods. Users can flexibly use these datasets for evaluation. The interface to load datasets is as follows:</p>
157+
<div style="background-color:#F7F7F7; padding:15px; border:1px solid #E0E0E0; border-top:3px solid #FF0000; font-family:monospace; font-size:14px;">
158+
<p>dd_ranking.utils.get_dataset(dataset: str, data_path: str, im_size: tuple, use_zca: bool, custom_val_trans: Optional[Callable], device: str)
159+
<a href="https://github.com/NUS-HPC-AI-Lab/DD-Ranking/blob/main/dd_ranking/utils/data.py"><strong>[SOURCE]</strong></a></p>
160+
</div>
161+
<h3 id="parameters"><a class="header" href="#parameters">Parameters</a></h3>
162+
<ul>
163+
<li><strong>dataset</strong>(<span style="color:#FF6B00;">str</span>): Name of the dataset.</li>
164+
<li><strong>data_path</strong>(<span style="color:#FF6B00;">str</span>): Path to the dataset.</li>
165+
<li><strong>im_size</strong>(<span style="color:#FF6B00;">tuple</span>): Image size.</li>
166+
<li><strong>use_zca</strong>(<span style="color:#FF6B00;">bool</span>): Whether to use ZCA whitening. When set to True, the dataset will <strong>not be</strong> normalized using the mean and standard deviation of the training set.</li>
167+
<li><strong>custom_val_trans</strong>(<span style="color:#FF6B00;">Optional[Callable]</span>): Custom transformation on the validation set.</li>
168+
<li><strong>device</strong>(<span style="color:#FF6B00;">str</span>): Device for performing ZCA whitening.</li>
169+
</ul>
170+
<p>Currently, we support the following datasets with default settings. We will keep updating this section with more datasets.</p>
171+
<ul>
172+
<li><strong>CIFAR10</strong>
173+
<ul>
174+
<li><strong>channels</strong>: <code>3</code></li>
175+
<li><strong>im_size</strong>: <code>(32, 32)</code></li>
176+
<li><strong>num_classes</strong>: <code>10</code></li>
177+
<li><strong>mean</strong>: <code>[0.4914, 0.4822, 0.4465]</code></li>
178+
<li><strong>std</strong>: <code>[0.2023, 0.1994, 0.2010]</code></li>
179+
</ul>
180+
</li>
181+
<li><strong>CIFAR100</strong>
182+
<ul>
183+
<li><strong>channels</strong>: <code>3</code></li>
184+
<li><strong>im_size</strong>: <code>(32, 32)</code></li>
185+
<li><strong>num_classes</strong>: <code>100</code></li>
186+
<li><strong>mean</strong>: <code>[0.4914, 0.4822, 0.4465]</code></li>
187+
<li><strong>std</strong>: <code>[0.2023, 0.1994, 0.2010]</code></li>
188+
</ul>
189+
</li>
190+
<li><strong>TinyImageNet</strong>
191+
<ul>
192+
<li><strong>channels</strong>: <code>3</code></li>
193+
<li><strong>im_size</strong>: <code>(64, 64)</code></li>
194+
<li><strong>num_classes</strong>: <code>200</code></li>
195+
<li><strong>mean</strong>: <code>[0.485, 0.456, 0.406]</code></li>
196+
<li><strong>std</strong>: <code>[0.229, 0.224, 0.225]</code></li>
197+
</ul>
198+
</li>
199+
</ul>
200+
201+
</main>
202+
203+
<nav class="nav-wrapper" aria-label="Page navigation">
204+
<!-- Mobile navigation buttons -->
205+
<a rel="prev" href="../models/mlp.html" class="mobile-nav-chapters previous" title="Previous chapter" aria-label="Previous chapter" aria-keyshortcuts="Left">
206+
<i class="fa fa-angle-left"></i>
207+
</a>
208+
209+
210+
<div style="clear: both"></div>
211+
</nav>
212+
</div>
213+
</div>
214+
215+
<nav class="nav-wide-wrapper" aria-label="Page navigation">
216+
<a rel="prev" href="../models/mlp.html" class="nav-chapters previous" title="Previous chapter" aria-label="Previous chapter" aria-keyshortcuts="Left">
217+
<i class="fa fa-angle-left"></i>
218+
</a>
219+
220+
</nav>
221+
222+
</div>
223+
224+
<!-- Livereload script (if served using the cli tool) -->
225+
<script>
226+
const wsProtocol = location.protocol === 'https:' ? 'wss:' : 'ws:';
227+
const wsAddress = wsProtocol + "//" + location.host + "/" + "__livereload";
228+
const socket = new WebSocket(wsAddress);
229+
socket.onmessage = function (event) {
230+
if (event.data === "reload") {
231+
socket.close();
232+
location.reload();
233+
}
234+
};
235+
236+
window.onbeforeunload = function() {
237+
socket.close();
238+
}
239+
</script>
240+
241+
242+
243+
<script>
244+
window.playground_copyable = true;
245+
</script>
246+
247+
248+
<script src="../elasticlunr.min.js"></script>
249+
<script src="../mark.min.js"></script>
250+
<script src="../searcher.js"></script>
251+
252+
<script src="../clipboard.min.js"></script>
253+
<script src="../highlight.js"></script>
254+
<script src="../book.js"></script>
255+
256+
<!-- Custom JS scripts -->
257+
258+
259+
</div>
260+
</body>
261+
</html>
Lines changed: 37 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
<head>
44
<!-- Book generated using mdBook -->
55
<meta charset="UTF-8">
6-
<title>Get Started - DD-Ranking Benchmark</title>
6+
<title>Installation - DD-Ranking Benchmark</title>
77

88

99
<!-- Custom HTML head -->
@@ -12,32 +12,32 @@
1212
<meta name="viewport" content="width=device-width, initial-scale=1">
1313
<meta name="theme-color" content="#ffffff">
1414

15-
<link rel="icon" href="favicon.svg">
16-
<link rel="shortcut icon" href="favicon.png">
17-
<link rel="stylesheet" href="css/variables.css">
18-
<link rel="stylesheet" href="css/general.css">
19-
<link rel="stylesheet" href="css/chrome.css">
20-
<link rel="stylesheet" href="css/print.css" media="print">
15+
<link rel="icon" href="../favicon.svg">
16+
<link rel="shortcut icon" href="../favicon.png">
17+
<link rel="stylesheet" href="../css/variables.css">
18+
<link rel="stylesheet" href="../css/general.css">
19+
<link rel="stylesheet" href="../css/chrome.css">
20+
<link rel="stylesheet" href="../css/print.css" media="print">
2121

2222
<!-- Fonts -->
23-
<link rel="stylesheet" href="FontAwesome/css/font-awesome.css">
24-
<link rel="stylesheet" href="fonts/fonts.css">
23+
<link rel="stylesheet" href="../FontAwesome/css/font-awesome.css">
24+
<link rel="stylesheet" href="../fonts/fonts.css">
2525

2626
<!-- Highlight.js Stylesheets -->
27-
<link rel="stylesheet" href="highlight.css">
28-
<link rel="stylesheet" href="tomorrow-night.css">
29-
<link rel="stylesheet" href="ayu-highlight.css">
27+
<link rel="stylesheet" href="../highlight.css">
28+
<link rel="stylesheet" href="../tomorrow-night.css">
29+
<link rel="stylesheet" href="../ayu-highlight.css">
3030

3131
<!-- Custom theme stylesheets -->
3232

3333

3434
<!-- Provide site root to javascript -->
3535
<script>
36-
var path_to_root = "";
36+
var path_to_root = "../";
3737
var default_theme = window.matchMedia("(prefers-color-scheme: dark)").matches ? "navy" : "light";
3838
</script>
3939
<!-- Start loading toc.js asap -->
40-
<script src="toc.js"></script>
40+
<script src="../toc.js"></script>
4141
</head>
4242
<body>
4343
<div id="body-container">
@@ -89,7 +89,7 @@
8989
<!-- populated by js -->
9090
<mdbook-sidebar-scrollbox class="sidebar-scrollbox"></mdbook-sidebar-scrollbox>
9191
<noscript>
92-
<iframe class="sidebar-iframe-outer" src="toc.html"></iframe>
92+
<iframe class="sidebar-iframe-outer" src="../toc.html"></iframe>
9393
</noscript>
9494
<div id="sidebar-resize-handle" class="sidebar-resize-handle">
9595
<div class="sidebar-resize-indicator"></div>
@@ -123,7 +123,7 @@
123123
<h1 class="menu-title">DD-Ranking Benchmark</h1>
124124

125125
<div class="right-buttons">
126-
<a href="print.html" title="Print this book" aria-label="Print this book">
126+
<a href="../print.html" title="Print this book" aria-label="Print this book">
127127
<i id="print-button" class="fa fa-print"></i>
128128
</a>
129129

@@ -152,27 +152,39 @@ <h1 class="menu-title">DD-Ranking Benchmark</h1>
152152

153153
<div id="content" class="content">
154154
<main>
155-
<h1 id="get-started"><a class="header" href="#get-started">Get Started</a></h1>
155+
<h2 id="installation"><a class="header" href="#installation">Installation</a></h2>
156+
<p>From pip</p>
157+
<pre><code class="language-bash">pip install dd_ranking
158+
</code></pre>
159+
<p>From source</p>
160+
<pre><code class="language-bash">python setup.py install
161+
</code></pre>
156162

157163
</main>
158164

159165
<nav class="nav-wrapper" aria-label="Page navigation">
160166
<!-- Mobile navigation buttons -->
161-
<a rel="prev" href="../index.html" class="mobile-nav-chapters previous" title="Previous chapter" aria-label="Previous chapter" aria-keyshortcuts="Left">
167+
<a rel="prev" href="../introduction.html" class="mobile-nav-chapters previous" title="Previous chapter" aria-label="Previous chapter" aria-keyshortcuts="Left">
162168
<i class="fa fa-angle-left"></i>
163169
</a>
164170

171+
<a rel="next prefetch" href="../getting-started/quick-start.html" class="mobile-nav-chapters next" title="Next chapter" aria-label="Next chapter" aria-keyshortcuts="Right">
172+
<i class="fa fa-angle-right"></i>
173+
</a>
165174

166175
<div style="clear: both"></div>
167176
</nav>
168177
</div>
169178
</div>
170179

171180
<nav class="nav-wide-wrapper" aria-label="Page navigation">
172-
<a rel="prev" href="../index.html" class="nav-chapters previous" title="Previous chapter" aria-label="Previous chapter" aria-keyshortcuts="Left">
181+
<a rel="prev" href="../introduction.html" class="nav-chapters previous" title="Previous chapter" aria-label="Previous chapter" aria-keyshortcuts="Left">
173182
<i class="fa fa-angle-left"></i>
174183
</a>
175184

185+
<a rel="next prefetch" href="../getting-started/quick-start.html" class="nav-chapters next" title="Next chapter" aria-label="Next chapter" aria-keyshortcuts="Right">
186+
<i class="fa fa-angle-right"></i>
187+
</a>
176188
</nav>
177189

178190
</div>
@@ -201,13 +213,13 @@ <h1 id="get-started"><a class="header" href="#get-started">Get Started</a></h1>
201213
</script>
202214

203215

204-
<script src="elasticlunr.min.js"></script>
205-
<script src="mark.min.js"></script>
206-
<script src="searcher.js"></script>
216+
<script src="../elasticlunr.min.js"></script>
217+
<script src="../mark.min.js"></script>
218+
<script src="../searcher.js"></script>
207219

208-
<script src="clipboard.min.js"></script>
209-
<script src="highlight.js"></script>
210-
<script src="book.js"></script>
220+
<script src="../clipboard.min.js"></script>
221+
<script src="../highlight.js"></script>
222+
<script src="../book.js"></script>
211223

212224
<!-- Custom JS scripts -->
213225

0 commit comments

Comments
 (0)