Path: blob/master/translate_cache/diffusion/ddpm/experiment.zh.json
4932 views
{1"<h1><a href=\"index.html\">Denoising Diffusion Probabilistic Models (DDPM)</a> training</h1>\n<p><a href=\"https://colab.research.google.com/github/labmlai/annotated_deep_learning_paper_implementations/blob/master/labml_nn/diffusion/ddpm/experiment.ipynb\"><span translate=no>_^_0_^_</span></a></p>\n<p>This trains a DDPM based model on CelebA HQ dataset. You can find the download instruction in this <a href=\"https://forums.fast.ai/t/download-celeba-hq-dataset/45873/3\">discussion on fast.ai</a>. Save the images inside <a href=\"#dataset_path\"><span translate=no>_^_1_^_</span> folder</a>.</p>\n<p>The paper had used a exponential moving average of the model with a decay of <span translate=no>_^_2_^_</span>. We have skipped this for simplicity.</p>\n": "<h1><a href=\"index.html\">\u964d\u566a\u6269\u6563\u6982\u7387\u6a21\u578b (DDPM)</a> \u8bad\u7ec3</h1>\n<p><a href=\"https://colab.research.google.com/github/labmlai/annotated_deep_learning_paper_implementations/blob/master/labml_nn/diffusion/ddpm/experiment.ipynb\"><span translate=no>_^_0_^_</span></a></p>\n<p>\u8fd9\u5c06\u57fa\u4e8e CeleBA HQ \u6570\u636e\u96c6\u8bad\u7ec3\u57fa\u4e8e DDPM \u7684\u6a21\u578b\u3002\u4f60\u53ef\u4ee5\u5728 <a href=\"https://forums.fast.ai/t/download-celeba-hq-dataset/45873/3\">fast.ai \u7684\u8ba8\u8bba</a>\u4e2d\u627e\u5230\u4e0b\u8f7d\u8bf4\u660e\u3002\u5c06\u56fe\u50cf\u4fdd\u5b58\u5728<a href=\"#dataset_path\"><span translate=no>_^_1_^_</span>\u6587\u4ef6\u5939\u4e2d</a>\u3002</p>\n<p>\u8be5\u8bba\u6587\u4f7f\u7528\u4e86\u8be5\u6a21\u578b\u7684\u6307\u6570\u79fb\u52a8\u5e73\u5747\u7ebf\uff0c\u5176\u8870\u51cf\u91cf\u4e3a<span translate=no>_^_2_^_</span>\u3002\u4e3a\u7b80\u5355\u8d77\u89c1\uff0c\u6211\u4eec\u8df3\u8fc7\u4e86\u8fd9\u4e2a\u3002</p>\n",2"<h2>Configurations</h2>\n": "<h2>\u914d\u7f6e</h2>\n",3"<h3>CelebA HQ dataset</h3>\n": "<h3>CeleBA HQ \u6570\u636e\u96c6</h3>\n",4"<h3>MNIST dataset</h3>\n": "<h3>MNIST \u6570\u636e\u96c6</h3>\n",5"<h3>Sample images</h3>\n": "<h3>\u6837\u672c\u56fe\u7247</h3>\n",6"<h3>Train</h3>\n": "<h3>\u706b\u8f66</h3>\n",7"<h3>Training loop</h3>\n": "<h3>\u8bad\u7ec3\u5faa\u73af</h3>\n",8"<p> </p>\n": "<p></p>\n",9"<p> Create CelebA dataset</p>\n": "<p>\u521b\u5efa CeleBA \u6570\u636e\u96c6</p>\n",10"<p> Create MNIST dataset</p>\n": "<p>\u521b\u5efa MNIST \u6570\u636e\u96c6</p>\n",11"<p> Get an image</p>\n": "<p>\u83b7\u53d6\u4e00\u5f20\u56fe\u7247</p>\n",12"<p> Size of the dataset</p>\n": "<p>\u6570\u636e\u96c6\u7684\u5927\u5c0f</p>\n",13"<p><a href=\"index.html\">DDPM algorithm</a> </p>\n": "<p><a href=\"index.html\">DDPM \u7b97\u6cd5</a></p>\n",14"<p><span translate=no>_^_0_^_</span> </p>\n": "<p><span translate=no>_^_0_^_</span></p>\n",15"<p>Adam optimizer </p>\n": "<p>Adam \u4f18\u5316\u5668</p>\n",16"<p>Batch size </p>\n": "<p>\u6279\u91cf\u5927\u5c0f</p>\n",17"<p>Calculate loss </p>\n": "<p>\u8ba1\u7b97\u635f\u5931</p>\n",18"<p>CelebA images folder </p>\n": "<p>CeleBA \u56fe\u7247\u6587\u4ef6\u5939</p>\n",19"<p>Compute gradients </p>\n": "<p>\u8ba1\u7b97\u68af\u5ea6</p>\n",20"<p>Create <a href=\"index.html\">DDPM class</a> </p>\n": "<p>\u521b\u5efa <a href=\"index.html\">DDPM \u7c7b</a></p>\n",21"<p>Create <span translate=no>_^_0_^_</span> model </p>\n": "<p>\u521b\u5efa<span translate=no>_^_0_^_</span>\u6a21\u578b</p>\n",22"<p>Create configurations </p>\n": "<p>\u521b\u5efa\u914d\u7f6e</p>\n",23"<p>Create dataloader </p>\n": "<p>\u521b\u5efa\u6570\u636e\u52a0\u8f7d\u5668</p>\n",24"<p>Create experiment </p>\n": "<p>\u521b\u5efa\u5b9e\u9a8c</p>\n",25"<p>Create optimizer </p>\n": "<p>\u521b\u5efa\u4f18\u5316\u5668</p>\n",26"<p>Dataloader </p>\n": "<p>\u6570\u636e\u52a0\u8f7d\u5668</p>\n",27"<p>Dataset </p>\n": "<p>\u6570\u636e\u96c6</p>\n",28"<p>Device to train the model on. <a href=\"https://docs.labml.ai/api/helpers.html#labml_helpers.device.DeviceConfigs\"><span translate=no>_^_0_^_</span></a> picks up an available CUDA device or defaults to CPU. </p>\n": "<p>\u7528\u4e8e\u8bad\u7ec3\u6a21\u578b\u7684\u8bbe\u5907\u3002<a href=\"https://docs.labml.ai/api/helpers.html#labml_helpers.device.DeviceConfigs\"><span translate=no>_^_0_^_</span></a>\u9009\u62e9\u53ef\u7528\u7684 CUDA \u8bbe\u5907\u6216\u9ed8\u8ba4\u4e3a CPU\u3002</p>\n",29"<p>Image logging </p>\n": "<p>\u56fe\u50cf\u65e5\u5fd7\u8bb0\u5f55</p>\n",30"<p>Image size </p>\n": "<p>\u56fe\u50cf\u5927\u5c0f</p>\n",31"<p>Increment global step </p>\n": "<p>\u9012\u589e\u5168\u5c40\u6b65\u957f</p>\n",32"<p>Initialize </p>\n": "<p>\u521d\u59cb\u5316</p>\n",33"<p>Iterate through the dataset </p>\n": "<p>\u904d\u5386\u6570\u636e\u96c6</p>\n",34"<p>Learning rate </p>\n": "<p>\u5b66\u4e60\u7387</p>\n",35"<p>List of files </p>\n": "<p>\u6587\u4ef6\u6e05\u5355</p>\n",36"<p>Log samples </p>\n": "<p>\u65e5\u5fd7\u6837\u672c</p>\n",37"<p>Make the gradients zero </p>\n": "<p>\u5c06\u6e10\u53d8\u8bbe\u4e3a\u96f6</p>\n",38"<p>Move data to device </p>\n": "<p>\u5c06\u6570\u636e\u79fb\u52a8\u5230\u8bbe\u5907</p>\n",39"<p>New line in the console </p>\n": "<p>\u63a7\u5236\u53f0\u4e2d\u7684\u65b0\u884c</p>\n",40"<p>Number of channels in the image. <span translate=no>_^_0_^_</span> for RGB. </p>\n": "<p>\u56fe\u50cf\u4e2d\u7684\u901a\u9053\u6570\u3002<span translate=no>_^_0_^_</span>\u5bf9\u4e8e RGB\u3002</p>\n",41"<p>Number of channels in the initial feature map </p>\n": "<p>\u521d\u59cb\u7279\u5f81\u56fe\u4e2d\u7684\u9891\u9053\u6570\u91cf</p>\n",42"<p>Number of samples to generate </p>\n": "<p>\u8981\u751f\u6210\u7684\u6837\u672c\u6570</p>\n",43"<p>Number of time steps <span translate=no>_^_0_^_</span> </p>\n": "<p>\u65f6\u95f4\u6b65\u6570<span translate=no>_^_0_^_</span></p>\n",44"<p>Number of training epochs </p>\n": "<p>\u8bad\u7ec3\u5468\u671f\u7684\u6570\u91cf</p>\n",45"<p>Remove noise for <span translate=no>_^_0_^_</span> steps </p>\n": "<p>\u6d88\u9664<span translate=no>_^_0_^_</span>\u53f0\u9636\u566a\u97f3</p>\n",46"<p>Sample from <span translate=no>_^_0_^_</span> </p>\n": "<p>\u6837\u672c\u6765\u81ea<span translate=no>_^_0_^_</span></p>\n",47"<p>Sample some images </p>\n": "<p>\u5bf9\u4e00\u4e9b\u56fe\u50cf\u8fdb\u884c\u91c7\u6837</p>\n",48"<p>Save the model </p>\n": "<p>\u4fdd\u5b58\u6a21\u578b</p>\n",49"<p>Set configurations. You can override the defaults by passing the values in the dictionary. </p>\n": "<p>\u8bbe\u7f6e\u914d\u7f6e\u3002\u60a8\u53ef\u4ee5\u901a\u8fc7\u5728\u5b57\u5178\u4e2d\u4f20\u9012\u503c\u6765\u8986\u76d6\u9ed8\u8ba4\u503c\u3002</p>\n",50"<p>Set models for saving and loading </p>\n": "<p>\u8bbe\u7f6e\u7528\u4e8e\u4fdd\u5b58\u548c\u52a0\u8f7d\u7684\u6a21\u578b</p>\n",51"<p>Start and run the training loop </p>\n": "<p>\u542f\u52a8\u5e76\u8fd0\u884c\u8bad\u7ec3\u5faa\u73af</p>\n",52"<p>Take an optimization step </p>\n": "<p>\u91c7\u53d6\u4f18\u5316\u6b65\u9aa4</p>\n",53"<p>The list of booleans that indicate whether to use attention at each resolution </p>\n": "<p>\u6307\u793a\u662f\u5426\u5728\u6bcf\u4e2a\u5206\u8fa8\u7387\u4e0b\u4f7f\u7528\u6ce8\u610f\u529b\u7684\u5e03\u5c14\u503c\u5217\u8868</p>\n",54"<p>The list of channel numbers at each resolution. The number of channels is <span translate=no>_^_0_^_</span> </p>\n": "<p>\u6bcf\u79cd\u5206\u8fa8\u7387\u4e0b\u7684\u901a\u9053\u7f16\u53f7\u5217\u8868\u3002\u9891\u9053\u7684\u6570\u91cf\u662f<span translate=no>_^_0_^_</span></p>\n",55"<p>Track the loss </p>\n": "<p>\u8ffd\u8e2a\u635f\u5931</p>\n",56"<p>Train the model </p>\n": "<p>\u8bad\u7ec3\u6a21\u578b</p>\n",57"<p>Transformations to resize the image and convert to tensor </p>\n": "<p>\u7528\u4e8e\u8c03\u6574\u56fe\u50cf\u5927\u5c0f\u5e76\u8f6c\u6362\u4e3a\u5f20\u91cf\u7684\u8f6c\u6362</p>\n",58"<p>U-Net model for <span translate=no>_^_0_^_</span> </p>\n": "<p>U-Net \u6a21\u578b\u7528\u4e8e<span translate=no>_^_0_^_</span></p>\n",59"Denoising Diffusion Probabilistic Models (DDPM) training": "\u53bb\u566a\u6269\u6563\u6982\u7387\u6a21\u578b (DDPM) \u8bad\u7ec3",60"Training code for Denoising Diffusion Probabilistic Model.": "\u964d\u566a\u6269\u6563\u6982\u7387\u6a21\u578b\u7684\u8bad\u7ec3\u4ee3\u7801\u3002"61}6263