{
"cells": [
{
"cell_type": "markdown",
"id": "8c28a85d",
"metadata": {
"slideshow": {
"slide_type": "-"
}
},
"source": [
"# 实战Kaggle比赛:狗的品种识别(ImageNet Dogs)\n",
"\n",
"比赛网址是https://www.kaggle.com/c/dog-breed-identification"
]
},
{
"cell_type": "code",
"execution_count": 1,
"id": "b6e1a2a2",
"metadata": {
"execution": {
"iopub.execute_input": "2023-08-18T06:58:14.555794Z",
"iopub.status.busy": "2023-08-18T06:58:14.555246Z",
"iopub.status.idle": "2023-08-18T06:58:16.563976Z",
"shell.execute_reply": "2023-08-18T06:58:16.563095Z"
},
"origin_pos": 2,
"tab": [
"pytorch"
]
},
"outputs": [],
"source": [
"import os\n",
"import torch\n",
"import torchvision\n",
"from torch import nn\n",
"from d2l import torch as d2l"
]
},
{
"cell_type": "markdown",
"id": "19c4ff5d",
"metadata": {
"slideshow": {
"slide_type": "slide"
}
},
"source": [
"我们提供完整数据集的小规模样本"
]
},
{
"cell_type": "code",
"execution_count": 2,
"id": "9ecb1309",
"metadata": {
"execution": {
"iopub.execute_input": "2023-08-18T06:58:16.567802Z",
"iopub.status.busy": "2023-08-18T06:58:16.567412Z",
"iopub.status.idle": "2023-08-18T06:58:17.348683Z",
"shell.execute_reply": "2023-08-18T06:58:17.347865Z"
},
"origin_pos": 5,
"tab": [
"pytorch"
]
},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"Downloading ../data/kaggle_dog_tiny.zip from http://d2l-data.s3-accelerate.amazonaws.com/kaggle_dog_tiny.zip...\n"
]
}
],
"source": [
"d2l.DATA_HUB['dog_tiny'] = (d2l.DATA_URL + 'kaggle_dog_tiny.zip',\n",
" '0cb91d09b814ecdc07b50f31f8dcad3e81d6a86d')\n",
"\n",
"demo = True\n",
"if demo:\n",
" data_dir = d2l.download_extract('dog_tiny')\n",
"else:\n",
" data_dir = os.path.join('..', 'data', 'dog-breed-identification')"
]
},
{
"cell_type": "markdown",
"id": "5dc5441a",
"metadata": {
"slideshow": {
"slide_type": "slide"
}
},
"source": [
"整理数据集"
]
},
{
"cell_type": "code",
"execution_count": 3,
"id": "3b420853",
"metadata": {
"execution": {
"iopub.execute_input": "2023-08-18T06:58:17.352573Z",
"iopub.status.busy": "2023-08-18T06:58:17.352101Z",
"iopub.status.idle": "2023-08-18T06:58:17.685237Z",
"shell.execute_reply": "2023-08-18T06:58:17.683473Z"
},
"origin_pos": 7,
"tab": [
"pytorch"
]
},
"outputs": [],
"source": [
"def reorg_dog_data(data_dir, valid_ratio):\n",
" labels = d2l.read_csv_labels(os.path.join(data_dir, 'labels.csv'))\n",
" d2l.reorg_train_valid(data_dir, labels, valid_ratio)\n",
" d2l.reorg_test(data_dir)\n",
"\n",
"\n",
"batch_size = 32 if demo else 128\n",
"valid_ratio = 0.1\n",
"reorg_dog_data(data_dir, valid_ratio)"
]
},
{
"cell_type": "markdown",
"id": "4b2671b6",
"metadata": {
"slideshow": {
"slide_type": "slide"
}
},
"source": [
"图像增广"
]
},
{
"cell_type": "code",
"execution_count": 5,
"id": "0b467084",
"metadata": {
"execution": {
"iopub.execute_input": "2023-08-18T06:58:17.704258Z",
"iopub.status.busy": "2023-08-18T06:58:17.703547Z",
"iopub.status.idle": "2023-08-18T06:58:17.710398Z",
"shell.execute_reply": "2023-08-18T06:58:17.709360Z"
},
"origin_pos": 14,
"tab": [
"pytorch"
]
},
"outputs": [],
"source": [
"transform_train = torchvision.transforms.Compose([\n",
" torchvision.transforms.RandomResizedCrop(224, scale=(0.08, 1.0),\n",
" ratio=(3.0/4.0, 4.0/3.0)),\n",
" torchvision.transforms.RandomHorizontalFlip(),\n",
" torchvision.transforms.ColorJitter(brightness=0.4,\n",
" contrast=0.4,\n",
" saturation=0.4),\n",
" torchvision.transforms.ToTensor(),\n",
" torchvision.transforms.Normalize([0.485, 0.456, 0.406],\n",
" [0.229, 0.224, 0.225])])\n",
"\n",
"transform_test = torchvision.transforms.Compose([\n",
" torchvision.transforms.Resize(256),\n",
" torchvision.transforms.CenterCrop(224),\n",
" torchvision.transforms.ToTensor(),\n",
" torchvision.transforms.Normalize([0.485, 0.456, 0.406],\n",
" [0.229, 0.224, 0.225])])"
]
},
{
"cell_type": "markdown",
"id": "9a8f744d",
"metadata": {
"slideshow": {
"slide_type": "slide"
}
},
"source": [
"读取数据集"
]
},
{
"cell_type": "code",
"execution_count": 7,
"id": "8ef84d02",
"metadata": {
"execution": {
"iopub.execute_input": "2023-08-18T06:58:17.756485Z",
"iopub.status.busy": "2023-08-18T06:58:17.755671Z",
"iopub.status.idle": "2023-08-18T06:58:17.764122Z",
"shell.execute_reply": "2023-08-18T06:58:17.762916Z"
},
"origin_pos": 22,
"tab": [
"pytorch"
]
},
"outputs": [],
"source": [
"train_ds, train_valid_ds = [torchvision.datasets.ImageFolder(\n",
" os.path.join(data_dir, 'train_valid_test', folder),\n",
" transform=transform_train) for folder in ['train', 'train_valid']]\n",
"\n",
"valid_ds, test_ds = [torchvision.datasets.ImageFolder(\n",
" os.path.join(data_dir, 'train_valid_test', folder),\n",
" transform=transform_test) for folder in ['valid', 'test']]\n",
"\n",
"train_iter, train_valid_iter = [torch.utils.data.DataLoader(\n",
" dataset, batch_size, shuffle=True, drop_last=True)\n",
" for dataset in (train_ds, train_valid_ds)]\n",
"\n",
"valid_iter = torch.utils.data.DataLoader(valid_ds, batch_size, shuffle=False,\n",
" drop_last=True)\n",
"\n",
"test_iter = torch.utils.data.DataLoader(test_ds, batch_size, shuffle=False,\n",
" drop_last=False)"
]
},
{
"cell_type": "markdown",
"id": "b773e0c9",
"metadata": {
"slideshow": {
"slide_type": "slide"
}
},
"source": [
"微调预训练模型"
]
},
{
"cell_type": "code",
"execution_count": 8,
"id": "1fd0cd74",
"metadata": {
"execution": {
"iopub.execute_input": "2023-08-18T06:58:17.769780Z",
"iopub.status.busy": "2023-08-18T06:58:17.768697Z",
"iopub.status.idle": "2023-08-18T06:58:17.777622Z",
"shell.execute_reply": "2023-08-18T06:58:17.776303Z"
},
"origin_pos": 26,
"tab": [
"pytorch"
]
},
"outputs": [],
"source": [
"def get_net(devices):\n",
" finetune_net = nn.Sequential()\n",
" finetune_net.features = torchvision.models.resnet34(pretrained=True)\n",
" finetune_net.output_new = nn.Sequential(nn.Linear(1000, 256),\n",
" nn.ReLU(),\n",
" nn.Linear(256, 120))\n",
" finetune_net = finetune_net.to(devices[0])\n",
" for param in finetune_net.features.parameters():\n",
" param.requires_grad = False\n",
" return finetune_net"
]
},
{
"cell_type": "markdown",
"id": "8e5c7a5f",
"metadata": {
"slideshow": {
"slide_type": "slide"
}
},
"source": [
"计算损失"
]
},
{
"cell_type": "code",
"execution_count": 9,
"id": "d6936a15",
"metadata": {
"execution": {
"iopub.execute_input": "2023-08-18T06:58:17.783286Z",
"iopub.status.busy": "2023-08-18T06:58:17.782296Z",
"iopub.status.idle": "2023-08-18T06:58:17.791061Z",
"shell.execute_reply": "2023-08-18T06:58:17.789830Z"
},
"origin_pos": 30,
"tab": [
"pytorch"
]
},
"outputs": [],
"source": [
"loss = nn.CrossEntropyLoss(reduction='none')\n",
"\n",
"def evaluate_loss(data_iter, net, devices):\n",
" l_sum, n = 0.0, 0\n",
" for features, labels in data_iter:\n",
" features, labels = features.to(devices[0]), labels.to(devices[0])\n",
" outputs = net(features)\n",
" l = loss(outputs, labels)\n",
" l_sum += l.sum()\n",
" n += labels.numel()\n",
" return (l_sum / n).to('cpu')"
]
},
{
"cell_type": "markdown",
"id": "e391dd8f",
"metadata": {
"slideshow": {
"slide_type": "slide"
}
},
"source": [
"训练函数"
]
},
{
"cell_type": "code",
"execution_count": 10,
"id": "4a196c68",
"metadata": {
"execution": {
"iopub.execute_input": "2023-08-18T06:58:17.796668Z",
"iopub.status.busy": "2023-08-18T06:58:17.795696Z",
"iopub.status.idle": "2023-08-18T06:58:17.813822Z",
"shell.execute_reply": "2023-08-18T06:58:17.812372Z"
},
"origin_pos": 34,
"tab": [
"pytorch"
]
},
"outputs": [],
"source": [
"def train(net, train_iter, valid_iter, num_epochs, lr, wd, devices, lr_period,\n",
" lr_decay):\n",
" net = nn.DataParallel(net, device_ids=devices).to(devices[0])\n",
" trainer = torch.optim.SGD((param for param in net.parameters()\n",
" if param.requires_grad), lr=lr,\n",
" momentum=0.9, weight_decay=wd)\n",
" scheduler = torch.optim.lr_scheduler.StepLR(trainer, lr_period, lr_decay)\n",
" num_batches, timer = len(train_iter), d2l.Timer()\n",
" legend = ['train loss']\n",
" if valid_iter is not None:\n",
" legend.append('valid loss')\n",
" animator = d2l.Animator(xlabel='epoch', xlim=[1, num_epochs],\n",
" legend=legend)\n",
" for epoch in range(num_epochs):\n",
" metric = d2l.Accumulator(2)\n",
" for i, (features, labels) in enumerate(train_iter):\n",
" timer.start()\n",
" features, labels = features.to(devices[0]), labels.to(devices[0])\n",
" trainer.zero_grad()\n",
" output = net(features)\n",
" l = loss(output, labels).sum()\n",
" l.backward()\n",
" trainer.step()\n",
" metric.add(l, labels.shape[0])\n",
" timer.stop()\n",
" if (i + 1) % (num_batches // 5) == 0 or i == num_batches - 1:\n",
" animator.add(epoch + (i + 1) / num_batches,\n",
" (metric[0] / metric[1], None))\n",
" measures = f'train loss {metric[0] / metric[1]:.3f}'\n",
" if valid_iter is not None:\n",
" valid_loss = evaluate_loss(valid_iter, net, devices)\n",
" animator.add(epoch + 1, (None, valid_loss.detach().cpu()))\n",
" scheduler.step()\n",
" if valid_iter is not None:\n",
" measures += f', valid loss {valid_loss:.3f}'\n",
" print(measures + f'\\n{metric[1] * num_epochs / timer.sum():.1f}'\n",
" f' examples/sec on {str(devices)}')"
]
},
{
"cell_type": "markdown",
"id": "befc0634",
"metadata": {
"slideshow": {
"slide_type": "slide"
}
},
"source": [
"训练和验证模型"
]
},
{
"cell_type": "code",
"execution_count": 11,
"id": "d407d036",
"metadata": {
"execution": {
"iopub.execute_input": "2023-08-18T06:58:17.819464Z",
"iopub.status.busy": "2023-08-18T06:58:17.818676Z",
"iopub.status.idle": "2023-08-18T07:00:28.078597Z",
"shell.execute_reply": "2023-08-18T07:00:28.077772Z"
},
"origin_pos": 38,
"tab": [
"pytorch"
]
},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"train loss 1.237, valid loss 1.503\n",
"442.6 examples/sec on [device(type='cuda', index=0), device(type='cuda', index=1)]\n"
]
},
{
"data": {
"image/svg+xml": [
"\n",
"\n",
"\n"
],
"text/plain": [
""
]
},
"metadata": {
"needs_background": "light"
},
"output_type": "display_data"
}
],
"source": [
"devices, num_epochs, lr, wd = d2l.try_all_gpus(), 10, 1e-4, 1e-4\n",
"lr_period, lr_decay, net = 2, 0.9, get_net(devices)\n",
"train(net, train_iter, valid_iter, num_epochs, lr, wd, devices, lr_period,\n",
" lr_decay)"
]
},
{
"cell_type": "markdown",
"id": "c96fe52c",
"metadata": {
"slideshow": {
"slide_type": "slide"
}
},
"source": [
"对测试集分类"
]
},
{
"cell_type": "code",
"execution_count": 12,
"id": "747e6641",
"metadata": {
"execution": {
"iopub.execute_input": "2023-08-18T07:00:28.083877Z",
"iopub.status.busy": "2023-08-18T07:00:28.083216Z",
"iopub.status.idle": "2023-08-18T07:02:07.445306Z",
"shell.execute_reply": "2023-08-18T07:02:07.444197Z"
},
"origin_pos": 42,
"tab": [
"pytorch"
]
},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"train loss 1.273\n",
"710.0 examples/sec on [device(type='cuda', index=0), device(type='cuda', index=1)]\n"
]
},
{
"data": {
"image/svg+xml": [
"\n",
"\n",
"\n"
],
"text/plain": [
""
]
},
"metadata": {
"needs_background": "light"
},
"output_type": "display_data"
}
],
"source": [
"net = get_net(devices)\n",
"train(net, train_valid_iter, None, num_epochs, lr, wd, devices, lr_period,\n",
" lr_decay)\n",
"\n",
"preds = []\n",
"for data, label in test_iter:\n",
" output = torch.nn.functional.softmax(net(data.to(devices[0])), dim=1)\n",
" preds.extend(output.cpu().detach().numpy())\n",
"ids = sorted(os.listdir(\n",
" os.path.join(data_dir, 'train_valid_test', 'test', 'unknown')))\n",
"with open('submission.csv', 'w') as f:\n",
" f.write('id,' + ','.join(train_valid_ds.classes) + '\\n')\n",
" for i, output in zip(ids, preds):\n",
" f.write(i.split('.')[0] + ',' + ','.join(\n",
" [str(num) for num in output]) + '\\n')"
]
}
],
"metadata": {
"celltoolbar": "Slideshow",
"language_info": {
"name": "python"
},
"required_libs": [],
"rise": {
"autolaunch": true,
"enable_chalkboard": true,
"overlay": "",
"scroll": true
},
"widgets": {
"application/vnd.jupyter.widget-state+json": {
"state": {
"05d481bdab484ccfb68104e67a56f0da": {
"model_module": "@jupyter-widgets/controls",
"model_module_version": "2.0.0",
"model_name": "HTMLStyleModel",
"state": {
"_model_module": "@jupyter-widgets/controls",
"_model_module_version": "2.0.0",
"_model_name": "HTMLStyleModel",
"_view_count": null,
"_view_module": "@jupyter-widgets/base",
"_view_module_version": "2.0.0",
"_view_name": "StyleView",
"background": null,
"description_width": "",
"font_size": null,
"text_color": null
}
},
"07e8ce70ebdd4559861a53d673e2ab0c": {
"model_module": "@jupyter-widgets/controls",
"model_module_version": "2.0.0",
"model_name": "HTMLModel",
"state": {
"_dom_classes": [],
"_model_module": "@jupyter-widgets/controls",
"_model_module_version": "2.0.0",
"_model_name": "HTMLModel",
"_view_count": null,
"_view_module": "@jupyter-widgets/controls",
"_view_module_version": "2.0.0",
"_view_name": "HTMLView",
"description": "",
"description_allow_html": false,
"layout": "IPY_MODEL_426e00de12584ffaa3d44a3e93eea652",
"placeholder": "",
"style": "IPY_MODEL_0fc52730af0b4d46981292e17b21881b",
"tabbable": null,
"tooltip": null,
"value": " 83.3M/83.3M [00:00<00:00, 178MB/s]"
}
},
"0fc52730af0b4d46981292e17b21881b": {
"model_module": "@jupyter-widgets/controls",
"model_module_version": "2.0.0",
"model_name": "HTMLStyleModel",
"state": {
"_model_module": "@jupyter-widgets/controls",
"_model_module_version": "2.0.0",
"_model_name": "HTMLStyleModel",
"_view_count": null,
"_view_module": "@jupyter-widgets/base",
"_view_module_version": "2.0.0",
"_view_name": "StyleView",
"background": null,
"description_width": "",
"font_size": null,
"text_color": null
}
},
"426e00de12584ffaa3d44a3e93eea652": {
"model_module": "@jupyter-widgets/base",
"model_module_version": "2.0.0",
"model_name": "LayoutModel",
"state": {
"_model_module": "@jupyter-widgets/base",
"_model_module_version": "2.0.0",
"_model_name": "LayoutModel",
"_view_count": null,
"_view_module": "@jupyter-widgets/base",
"_view_module_version": "2.0.0",
"_view_name": "LayoutView",
"align_content": null,
"align_items": null,
"align_self": null,
"border_bottom": null,
"border_left": null,
"border_right": null,
"border_top": null,
"bottom": null,
"display": null,
"flex": null,
"flex_flow": null,
"grid_area": null,
"grid_auto_columns": null,
"grid_auto_flow": null,
"grid_auto_rows": null,
"grid_column": null,
"grid_gap": null,
"grid_row": null,
"grid_template_areas": null,
"grid_template_columns": null,
"grid_template_rows": null,
"height": null,
"justify_content": null,
"justify_items": null,
"left": null,
"margin": null,
"max_height": null,
"max_width": null,
"min_height": null,
"min_width": null,
"object_fit": null,
"object_position": null,
"order": null,
"overflow": null,
"padding": null,
"right": null,
"top": null,
"visibility": null,
"width": null
}
},
"62f56dcf4a5143feb9096688694380bd": {
"model_module": "@jupyter-widgets/controls",
"model_module_version": "2.0.0",
"model_name": "HBoxModel",
"state": {
"_dom_classes": [],
"_model_module": "@jupyter-widgets/controls",
"_model_module_version": "2.0.0",
"_model_name": "HBoxModel",
"_view_count": null,
"_view_module": "@jupyter-widgets/controls",
"_view_module_version": "2.0.0",
"_view_name": "HBoxView",
"box_style": "",
"children": [
"IPY_MODEL_c71d6d9028d74e1ab55487a6028970a5",
"IPY_MODEL_6aa8082311944890a8b240d3a40133d6",
"IPY_MODEL_07e8ce70ebdd4559861a53d673e2ab0c"
],
"layout": "IPY_MODEL_9b1361574f2b4f1dae8ae76858d73d89",
"tabbable": null,
"tooltip": null
}
},
"6aa8082311944890a8b240d3a40133d6": {
"model_module": "@jupyter-widgets/controls",
"model_module_version": "2.0.0",
"model_name": "FloatProgressModel",
"state": {
"_dom_classes": [],
"_model_module": "@jupyter-widgets/controls",
"_model_module_version": "2.0.0",
"_model_name": "FloatProgressModel",
"_view_count": null,
"_view_module": "@jupyter-widgets/controls",
"_view_module_version": "2.0.0",
"_view_name": "ProgressView",
"bar_style": "success",
"description": "",
"description_allow_html": false,
"layout": "IPY_MODEL_955d26cae5294b2ea621e20082681646",
"max": 87319819.0,
"min": 0.0,
"orientation": "horizontal",
"style": "IPY_MODEL_7bfcb307c3fd4d4c9a3c70d7eeca097d",
"tabbable": null,
"tooltip": null,
"value": 87319819.0
}
},
"7bfcb307c3fd4d4c9a3c70d7eeca097d": {
"model_module": "@jupyter-widgets/controls",
"model_module_version": "2.0.0",
"model_name": "ProgressStyleModel",
"state": {
"_model_module": "@jupyter-widgets/controls",
"_model_module_version": "2.0.0",
"_model_name": "ProgressStyleModel",
"_view_count": null,
"_view_module": "@jupyter-widgets/base",
"_view_module_version": "2.0.0",
"_view_name": "StyleView",
"bar_color": null,
"description_width": ""
}
},
"955d26cae5294b2ea621e20082681646": {
"model_module": "@jupyter-widgets/base",
"model_module_version": "2.0.0",
"model_name": "LayoutModel",
"state": {
"_model_module": "@jupyter-widgets/base",
"_model_module_version": "2.0.0",
"_model_name": "LayoutModel",
"_view_count": null,
"_view_module": "@jupyter-widgets/base",
"_view_module_version": "2.0.0",
"_view_name": "LayoutView",
"align_content": null,
"align_items": null,
"align_self": null,
"border_bottom": null,
"border_left": null,
"border_right": null,
"border_top": null,
"bottom": null,
"display": null,
"flex": null,
"flex_flow": null,
"grid_area": null,
"grid_auto_columns": null,
"grid_auto_flow": null,
"grid_auto_rows": null,
"grid_column": null,
"grid_gap": null,
"grid_row": null,
"grid_template_areas": null,
"grid_template_columns": null,
"grid_template_rows": null,
"height": null,
"justify_content": null,
"justify_items": null,
"left": null,
"margin": null,
"max_height": null,
"max_width": null,
"min_height": null,
"min_width": null,
"object_fit": null,
"object_position": null,
"order": null,
"overflow": null,
"padding": null,
"right": null,
"top": null,
"visibility": null,
"width": null
}
},
"9b1361574f2b4f1dae8ae76858d73d89": {
"model_module": "@jupyter-widgets/base",
"model_module_version": "2.0.0",
"model_name": "LayoutModel",
"state": {
"_model_module": "@jupyter-widgets/base",
"_model_module_version": "2.0.0",
"_model_name": "LayoutModel",
"_view_count": null,
"_view_module": "@jupyter-widgets/base",
"_view_module_version": "2.0.0",
"_view_name": "LayoutView",
"align_content": null,
"align_items": null,
"align_self": null,
"border_bottom": null,
"border_left": null,
"border_right": null,
"border_top": null,
"bottom": null,
"display": null,
"flex": null,
"flex_flow": null,
"grid_area": null,
"grid_auto_columns": null,
"grid_auto_flow": null,
"grid_auto_rows": null,
"grid_column": null,
"grid_gap": null,
"grid_row": null,
"grid_template_areas": null,
"grid_template_columns": null,
"grid_template_rows": null,
"height": null,
"justify_content": null,
"justify_items": null,
"left": null,
"margin": null,
"max_height": null,
"max_width": null,
"min_height": null,
"min_width": null,
"object_fit": null,
"object_position": null,
"order": null,
"overflow": null,
"padding": null,
"right": null,
"top": null,
"visibility": null,
"width": null
}
},
"c71d6d9028d74e1ab55487a6028970a5": {
"model_module": "@jupyter-widgets/controls",
"model_module_version": "2.0.0",
"model_name": "HTMLModel",
"state": {
"_dom_classes": [],
"_model_module": "@jupyter-widgets/controls",
"_model_module_version": "2.0.0",
"_model_name": "HTMLModel",
"_view_count": null,
"_view_module": "@jupyter-widgets/controls",
"_view_module_version": "2.0.0",
"_view_name": "HTMLView",
"description": "",
"description_allow_html": false,
"layout": "IPY_MODEL_feb254b14115426a87721b8d7c742bd2",
"placeholder": "",
"style": "IPY_MODEL_05d481bdab484ccfb68104e67a56f0da",
"tabbable": null,
"tooltip": null,
"value": "100%"
}
},
"feb254b14115426a87721b8d7c742bd2": {
"model_module": "@jupyter-widgets/base",
"model_module_version": "2.0.0",
"model_name": "LayoutModel",
"state": {
"_model_module": "@jupyter-widgets/base",
"_model_module_version": "2.0.0",
"_model_name": "LayoutModel",
"_view_count": null,
"_view_module": "@jupyter-widgets/base",
"_view_module_version": "2.0.0",
"_view_name": "LayoutView",
"align_content": null,
"align_items": null,
"align_self": null,
"border_bottom": null,
"border_left": null,
"border_right": null,
"border_top": null,
"bottom": null,
"display": null,
"flex": null,
"flex_flow": null,
"grid_area": null,
"grid_auto_columns": null,
"grid_auto_flow": null,
"grid_auto_rows": null,
"grid_column": null,
"grid_gap": null,
"grid_row": null,
"grid_template_areas": null,
"grid_template_columns": null,
"grid_template_rows": null,
"height": null,
"justify_content": null,
"justify_items": null,
"left": null,
"margin": null,
"max_height": null,
"max_width": null,
"min_height": null,
"min_width": null,
"object_fit": null,
"object_position": null,
"order": null,
"overflow": null,
"padding": null,
"right": null,
"top": null,
"visibility": null,
"width": null
}
}
},
"version_major": 2,
"version_minor": 0
}
}
},
"nbformat": 4,
"nbformat_minor": 5
}