You can not select more than 25 topics Topics must start with a chinese character,a letter or number, can include dashes ('-') and can be up to 35 characters long.

fastnlp_tutorial_e1.ipynb 39 kB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897
  1. {
  2. "cells": [
  3. {
  4. "cell_type": "markdown",
  5. "metadata": {},
  6. "source": [
  7. "# E1. 使用 DistilBert 完成 SST2 分类"
  8. ]
  9. },
  10. {
  11. "cell_type": "code",
  12. "execution_count": 1,
  13. "metadata": {},
  14. "outputs": [
  15. {
  16. "data": {
  17. "text/html": [
  18. "<pre style=\"white-space:pre;overflow-x:auto;line-height:normal;font-family:Menlo,'DejaVu Sans Mono',consolas,'Courier New',monospace\">\n",
  19. "</pre>\n"
  20. ],
  21. "text/plain": [
  22. "\n"
  23. ]
  24. },
  25. "metadata": {},
  26. "output_type": "display_data"
  27. },
  28. {
  29. "name": "stdout",
  30. "output_type": "stream",
  31. "text": [
  32. "4.18.0\n"
  33. ]
  34. }
  35. ],
  36. "source": [
  37. "import torch\n",
  38. "import torch.nn as nn\n",
  39. "from torch.optim import AdamW\n",
  40. "from torch.utils.data import DataLoader, Dataset\n",
  41. "\n",
  42. "import transformers\n",
  43. "from transformers import AutoTokenizer\n",
  44. "from transformers import AutoModelForSequenceClassification\n",
  45. "\n",
  46. "import sys\n",
  47. "sys.path.append('..')\n",
  48. "\n",
  49. "import fastNLP\n",
  50. "from fastNLP import Trainer\n",
  51. "from fastNLP.core.utils.utils import dataclass_to_dict\n",
  52. "from fastNLP.core.metrics import Accuracy\n",
  53. "\n",
  54. "print(transformers.__version__)"
  55. ]
  56. },
  57. {
  58. "cell_type": "code",
  59. "execution_count": 2,
  60. "metadata": {},
  61. "outputs": [],
  62. "source": [
  63. "GLUE_TASKS = [\"cola\", \"mnli\", \"mnli-mm\", \"mrpc\", \"qnli\", \"qqp\", \"rte\", \"sst2\", \"stsb\", \"wnli\"]\n",
  64. "\n",
  65. "task = \"sst2\"\n",
  66. "model_checkpoint = \"distilbert-base-uncased\""
  67. ]
  68. },
  69. {
  70. "cell_type": "code",
  71. "execution_count": 3,
  72. "metadata": {
  73. "scrolled": false
  74. },
  75. "outputs": [
  76. {
  77. "name": "stderr",
  78. "output_type": "stream",
  79. "text": [
  80. "Using the latest cached version of the module from /remote-home/xrliu/.cache/huggingface/modules/datasets_modules/datasets/glue/dacbe3125aa31d7f70367a07a8a9e72a5a0bfeb5fc42e75c9db75b96da6053ad (last modified on Thu May 26 15:30:15 2022) since it couldn't be found locally at glue., or remotely on the Hugging Face Hub.\n",
  81. "Reusing dataset glue (/remote-home/xrliu/.cache/huggingface/datasets/glue/sst2/1.0.0/dacbe3125aa31d7f70367a07a8a9e72a5a0bfeb5fc42e75c9db75b96da6053ad)\n"
  82. ]
  83. },
  84. {
  85. "data": {
  86. "application/vnd.jupyter.widget-view+json": {
  87. "model_id": "253d79d7a67e4dc88338448b5bcb3fb9",
  88. "version_major": 2,
  89. "version_minor": 0
  90. },
  91. "text/plain": [
  92. " 0%| | 0/3 [00:00<?, ?it/s]"
  93. ]
  94. },
  95. "metadata": {},
  96. "output_type": "display_data"
  97. }
  98. ],
  99. "source": [
  100. "from datasets import load_dataset, load_metric\n",
  101. "\n",
  102. "dataset = load_dataset(\"glue\", \"mnli\" if task == \"mnli-mm\" else task)"
  103. ]
  104. },
  105. {
  106. "cell_type": "code",
  107. "execution_count": 4,
  108. "metadata": {},
  109. "outputs": [
  110. {
  111. "name": "stdout",
  112. "output_type": "stream",
  113. "text": [
  114. "{'input_ids': [101, 7592, 1010, 2023, 2028, 6251, 999, 102, 1998, 2023, 6251, 3632, 2007, 2009, 1012, 102], 'attention_mask': [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1]}\n"
  115. ]
  116. }
  117. ],
  118. "source": [
  119. "tokenizer = AutoTokenizer.from_pretrained(model_checkpoint, use_fast=True)\n",
  120. "\n",
  121. "print(tokenizer(\"Hello, this one sentence!\", \"And this sentence goes with it.\"))"
  122. ]
  123. },
  124. {
  125. "cell_type": "code",
  126. "execution_count": 5,
  127. "metadata": {},
  128. "outputs": [],
  129. "source": [
  130. "task_to_keys = {\n",
  131. " \"cola\": (\"sentence\", None),\n",
  132. " \"mnli\": (\"premise\", \"hypothesis\"),\n",
  133. " \"mnli-mm\": (\"premise\", \"hypothesis\"),\n",
  134. " \"mrpc\": (\"sentence1\", \"sentence2\"),\n",
  135. " \"qnli\": (\"question\", \"sentence\"),\n",
  136. " \"qqp\": (\"question1\", \"question2\"),\n",
  137. " \"rte\": (\"sentence1\", \"sentence2\"),\n",
  138. " \"sst2\": (\"sentence\", None),\n",
  139. " \"stsb\": (\"sentence1\", \"sentence2\"),\n",
  140. " \"wnli\": (\"sentence1\", \"sentence2\"),\n",
  141. "}\n",
  142. "\n",
  143. "sentence1_key, sentence2_key = task_to_keys[task]"
  144. ]
  145. },
  146. {
  147. "cell_type": "code",
  148. "execution_count": 6,
  149. "metadata": {},
  150. "outputs": [
  151. {
  152. "name": "stdout",
  153. "output_type": "stream",
  154. "text": [
  155. "Sentence: hide new secretions from the parental units \n"
  156. ]
  157. }
  158. ],
  159. "source": [
  160. "if sentence2_key is None:\n",
  161. " print(f\"Sentence: {dataset['train'][0][sentence1_key]}\")\n",
  162. "else:\n",
  163. " print(f\"Sentence 1: {dataset['train'][0][sentence1_key]}\")\n",
  164. " print(f\"Sentence 2: {dataset['train'][0][sentence2_key]}\")"
  165. ]
  166. },
  167. {
  168. "cell_type": "code",
  169. "execution_count": 7,
  170. "metadata": {},
  171. "outputs": [
  172. {
  173. "name": "stderr",
  174. "output_type": "stream",
  175. "text": [
  176. "Loading cached processed dataset at /remote-home/xrliu/.cache/huggingface/datasets/glue/sst2/1.0.0/dacbe3125aa31d7f70367a07a8a9e72a5a0bfeb5fc42e75c9db75b96da6053ad/cache-ca1fbe5e8eb059f3.arrow\n",
  177. "Loading cached processed dataset at /remote-home/xrliu/.cache/huggingface/datasets/glue/sst2/1.0.0/dacbe3125aa31d7f70367a07a8a9e72a5a0bfeb5fc42e75c9db75b96da6053ad/cache-03661263fbf302f5.arrow\n",
  178. "Loading cached processed dataset at /remote-home/xrliu/.cache/huggingface/datasets/glue/sst2/1.0.0/dacbe3125aa31d7f70367a07a8a9e72a5a0bfeb5fc42e75c9db75b96da6053ad/cache-fbe8e7a4e4f18f45.arrow\n"
  179. ]
  180. }
  181. ],
  182. "source": [
  183. "def preprocess_function(examples):\n",
  184. " if sentence2_key is None:\n",
  185. " return tokenizer(examples[sentence1_key], truncation=True)\n",
  186. " return tokenizer(examples[sentence1_key], examples[sentence2_key], truncation=True)\n",
  187. "\n",
  188. "encoded_dataset = dataset.map(preprocess_function, batched=True)"
  189. ]
  190. },
  191. {
  192. "cell_type": "code",
  193. "execution_count": 8,
  194. "metadata": {},
  195. "outputs": [],
  196. "source": [
  197. "class ClassModel(nn.Module):\n",
  198. " def __init__(self, num_labels, model_checkpoint):\n",
  199. " nn.Module.__init__(self)\n",
  200. " self.num_labels = num_labels\n",
  201. " self.back_bone = AutoModelForSequenceClassification.from_pretrained(model_checkpoint, \n",
  202. " num_labels=num_labels)\n",
  203. " self.loss_fn = nn.CrossEntropyLoss()\n",
  204. "\n",
  205. " def forward(self, input_ids, attention_mask):\n",
  206. " return self.back_bone(input_ids, attention_mask)\n",
  207. "\n",
  208. " def train_step(self, input_ids, attention_mask, labels):\n",
  209. " pred = self(input_ids, attention_mask).logits\n",
  210. " return {\"loss\": self.loss_fn(pred, labels)}\n",
  211. "\n",
  212. " def evaluate_step(self, input_ids, attention_mask, labels):\n",
  213. " pred = self(input_ids, attention_mask).logits\n",
  214. " pred = torch.max(pred, dim=-1)[1]\n",
  215. " return {\"pred\": pred, \"target\": labels}"
  216. ]
  217. },
  218. {
  219. "cell_type": "code",
  220. "execution_count": 9,
  221. "metadata": {},
  222. "outputs": [
  223. {
  224. "name": "stderr",
  225. "output_type": "stream",
  226. "text": [
  227. "Some weights of the model checkpoint at distilbert-base-uncased were not used when initializing DistilBertForSequenceClassification: ['vocab_projector.weight', 'vocab_layer_norm.bias', 'vocab_transform.bias', 'vocab_projector.bias', 'vocab_layer_norm.weight', 'vocab_transform.weight']\n",
  228. "- This IS expected if you are initializing DistilBertForSequenceClassification from the checkpoint of a model trained on another task or with another architecture (e.g. initializing a BertForSequenceClassification model from a BertForPreTraining model).\n",
  229. "- This IS NOT expected if you are initializing DistilBertForSequenceClassification from the checkpoint of a model that you expect to be exactly identical (initializing a BertForSequenceClassification model from a BertForSequenceClassification model).\n",
  230. "Some weights of DistilBertForSequenceClassification were not initialized from the model checkpoint at distilbert-base-uncased and are newly initialized: ['pre_classifier.weight', 'classifier.weight', 'classifier.bias', 'pre_classifier.bias']\n",
  231. "You should probably TRAIN this model on a down-stream task to be able to use it for predictions and inference.\n"
  232. ]
  233. }
  234. ],
  235. "source": [
  236. "num_labels = 3 if task.startswith(\"mnli\") else 1 if task == \"stsb\" else 2\n",
  237. "\n",
  238. "model = ClassModel(num_labels=num_labels, model_checkpoint=model_checkpoint)\n",
  239. "\n",
  240. "optimizers = AdamW(params=model.parameters(), lr=5e-5)"
  241. ]
  242. },
  243. {
  244. "cell_type": "code",
  245. "execution_count": 10,
  246. "metadata": {},
  247. "outputs": [],
  248. "source": [
  249. "class TestDistilBertDataset(Dataset):\n",
  250. " def __init__(self, dataset):\n",
  251. " super(TestDistilBertDataset, self).__init__()\n",
  252. " self.dataset = dataset\n",
  253. "\n",
  254. " def __len__(self):\n",
  255. " return len(self.dataset)\n",
  256. "\n",
  257. " def __getitem__(self, item):\n",
  258. " item = self.dataset[item]\n",
  259. " return item[\"input_ids\"], item[\"attention_mask\"], [item[\"label\"]] "
  260. ]
  261. },
  262. {
  263. "cell_type": "code",
  264. "execution_count": 11,
  265. "metadata": {},
  266. "outputs": [],
  267. "source": [
  268. "def test_bert_collate_fn(batch):\n",
  269. " input_ids, atten_mask, labels = [], [], []\n",
  270. " max_length = [0] * 3\n",
  271. " for each_item in batch:\n",
  272. " input_ids.append(each_item[0])\n",
  273. " max_length[0] = max(max_length[0], len(each_item[0]))\n",
  274. " atten_mask.append(each_item[1])\n",
  275. " max_length[1] = max(max_length[1], len(each_item[1]))\n",
  276. " labels.append(each_item[2])\n",
  277. " max_length[2] = max(max_length[2], len(each_item[2]))\n",
  278. "\n",
  279. " for i in range(3):\n",
  280. " each = (input_ids, atten_mask, labels)[i]\n",
  281. " for item in each:\n",
  282. " item.extend([0] * (max_length[i] - len(item)))\n",
  283. " return {\"input_ids\": torch.cat([torch.tensor([item]) for item in input_ids], dim=0),\n",
  284. " \"attention_mask\": torch.cat([torch.tensor([item]) for item in atten_mask], dim=0),\n",
  285. " \"labels\": torch.cat([torch.tensor(item) for item in labels], dim=0)}"
  286. ]
  287. },
  288. {
  289. "cell_type": "code",
  290. "execution_count": 12,
  291. "metadata": {},
  292. "outputs": [],
  293. "source": [
  294. "dataset_train = TestDistilBertDataset(encoded_dataset[\"train\"])\n",
  295. "dataloader_train = DataLoader(dataset=dataset_train, \n",
  296. " batch_size=32, shuffle=True, collate_fn=test_bert_collate_fn)\n",
  297. "dataset_valid = TestDistilBertDataset(encoded_dataset[\"validation\"])\n",
  298. "dataloader_valid = DataLoader(dataset=dataset_valid, \n",
  299. " batch_size=32, shuffle=False, collate_fn=test_bert_collate_fn)"
  300. ]
  301. },
  302. {
  303. "cell_type": "code",
  304. "execution_count": 13,
  305. "metadata": {},
  306. "outputs": [],
  307. "source": [
  308. "trainer = Trainer(\n",
  309. " model=model,\n",
  310. " driver='torch',\n",
  311. " device='cuda',\n",
  312. " n_epochs=10,\n",
  313. " optimizers=optimizers,\n",
  314. " train_dataloader=dataloader_train,\n",
  315. " evaluate_dataloaders=dataloader_valid,\n",
  316. " metrics={'acc': Accuracy()}\n",
  317. ")"
  318. ]
  319. },
  320. {
  321. "cell_type": "code",
  322. "execution_count": 14,
  323. "metadata": {},
  324. "outputs": [],
  325. "source": [
  326. "# help(model.back_bone.forward)"
  327. ]
  328. },
  329. {
  330. "cell_type": "code",
  331. "execution_count": 15,
  332. "metadata": {},
  333. "outputs": [
  334. {
  335. "data": {
  336. "text/html": [
  337. "<pre style=\"white-space:pre;overflow-x:auto;line-height:normal;font-family:Menlo,'DejaVu Sans Mono',consolas,'Courier New',monospace\"><span style=\"color: #7fbfbf; text-decoration-color: #7fbfbf\">[21:00:11] </span><span style=\"color: #000080; text-decoration-color: #000080\">INFO </span> Running evaluator sanity check for <span style=\"color: #008080; text-decoration-color: #008080; font-weight: bold\">2</span> batches. <a href=\"file://../fastNLP/core/controllers/trainer.py\"><span style=\"color: #7f7f7f; text-decoration-color: #7f7f7f\">trainer.py</span></a><span style=\"color: #7f7f7f; text-decoration-color: #7f7f7f\">:</span><a href=\"file://../fastNLP/core/controllers/trainer.py#592\"><span style=\"color: #7f7f7f; text-decoration-color: #7f7f7f\">592</span></a>\n",
  338. "</pre>\n"
  339. ],
  340. "text/plain": [
  341. "\u001b[2;36m[21:00:11]\u001b[0m\u001b[2;36m \u001b[0m\u001b[34mINFO \u001b[0m Running evaluator sanity check for \u001b[1;36m2\u001b[0m batches. \u001b]8;id=22992;file://../fastNLP/core/controllers/trainer.py\u001b\\\u001b[2mtrainer.py\u001b[0m\u001b]8;;\u001b\\\u001b[2m:\u001b[0m\u001b]8;id=669026;file://../fastNLP/core/controllers/trainer.py#592\u001b\\\u001b[2m592\u001b[0m\u001b]8;;\u001b\\\n"
  342. ]
  343. },
  344. "metadata": {},
  345. "output_type": "display_data"
  346. },
  347. {
  348. "data": {
  349. "application/vnd.jupyter.widget-view+json": {
  350. "model_id": "",
  351. "version_major": 2,
  352. "version_minor": 0
  353. },
  354. "text/plain": [
  355. "Output()"
  356. ]
  357. },
  358. "metadata": {},
  359. "output_type": "display_data"
  360. },
  361. {
  362. "data": {
  363. "text/html": [
  364. "<pre style=\"white-space:pre;overflow-x:auto;line-height:normal;font-family:Menlo,'DejaVu Sans Mono',consolas,'Courier New',monospace\">\n",
  365. "</pre>\n"
  366. ],
  367. "text/plain": [
  368. "\n"
  369. ]
  370. },
  371. "metadata": {},
  372. "output_type": "display_data"
  373. },
  374. {
  375. "data": {
  376. "text/html": [
  377. "<pre style=\"white-space:pre;overflow-x:auto;line-height:normal;font-family:Menlo,'DejaVu Sans Mono',consolas,'Courier New',monospace\">----------------------------- Eval. results on Epoch:<span style=\"color: #008080; text-decoration-color: #008080; font-weight: bold\">1</span>, Batch:<span style=\"color: #008080; text-decoration-color: #008080; font-weight: bold\">0</span> -----------------------------\n",
  378. "</pre>\n"
  379. ],
  380. "text/plain": [
  381. "----------------------------- Eval. results on Epoch:\u001b[1;36m1\u001b[0m, Batch:\u001b[1;36m0\u001b[0m -----------------------------\n"
  382. ]
  383. },
  384. "metadata": {},
  385. "output_type": "display_data"
  386. },
  387. {
  388. "data": {
  389. "text/html": [
  390. "<pre style=\"white-space:pre;overflow-x:auto;line-height:normal;font-family:Menlo,'DejaVu Sans Mono',consolas,'Courier New',monospace\"><span style=\"font-weight: bold\">{</span>\n",
  391. " <span style=\"color: #000080; text-decoration-color: #000080; font-weight: bold\">\"acc#acc\"</span>: <span style=\"color: #008080; text-decoration-color: #008080; font-weight: bold\">0.871875</span>,\n",
  392. " <span style=\"color: #000080; text-decoration-color: #000080; font-weight: bold\">\"total#acc\"</span>: <span style=\"color: #008080; text-decoration-color: #008080; font-weight: bold\">320.0</span>,\n",
  393. " <span style=\"color: #000080; text-decoration-color: #000080; font-weight: bold\">\"correct#acc\"</span>: <span style=\"color: #008080; text-decoration-color: #008080; font-weight: bold\">279.0</span>\n",
  394. "<span style=\"font-weight: bold\">}</span>\n",
  395. "</pre>\n"
  396. ],
  397. "text/plain": [
  398. "\u001b[1m{\u001b[0m\n",
  399. " \u001b[1;34m\"acc#acc\"\u001b[0m: \u001b[1;36m0.871875\u001b[0m,\n",
  400. " \u001b[1;34m\"total#acc\"\u001b[0m: \u001b[1;36m320.0\u001b[0m,\n",
  401. " \u001b[1;34m\"correct#acc\"\u001b[0m: \u001b[1;36m279.0\u001b[0m\n",
  402. "\u001b[1m}\u001b[0m\n"
  403. ]
  404. },
  405. "metadata": {},
  406. "output_type": "display_data"
  407. },
  408. {
  409. "data": {
  410. "text/html": [
  411. "<pre style=\"white-space:pre;overflow-x:auto;line-height:normal;font-family:Menlo,'DejaVu Sans Mono',consolas,'Courier New',monospace\">\n",
  412. "</pre>\n"
  413. ],
  414. "text/plain": [
  415. "\n"
  416. ]
  417. },
  418. "metadata": {},
  419. "output_type": "display_data"
  420. },
  421. {
  422. "data": {
  423. "text/html": [
  424. "<pre style=\"white-space:pre;overflow-x:auto;line-height:normal;font-family:Menlo,'DejaVu Sans Mono',consolas,'Courier New',monospace\">----------------------------- Eval. results on Epoch:<span style=\"color: #008080; text-decoration-color: #008080; font-weight: bold\">2</span>, Batch:<span style=\"color: #008080; text-decoration-color: #008080; font-weight: bold\">0</span> -----------------------------\n",
  425. "</pre>\n"
  426. ],
  427. "text/plain": [
  428. "----------------------------- Eval. results on Epoch:\u001b[1;36m2\u001b[0m, Batch:\u001b[1;36m0\u001b[0m -----------------------------\n"
  429. ]
  430. },
  431. "metadata": {},
  432. "output_type": "display_data"
  433. },
  434. {
  435. "data": {
  436. "text/html": [
  437. "<pre style=\"white-space:pre;overflow-x:auto;line-height:normal;font-family:Menlo,'DejaVu Sans Mono',consolas,'Courier New',monospace\"><span style=\"font-weight: bold\">{</span>\n",
  438. " <span style=\"color: #000080; text-decoration-color: #000080; font-weight: bold\">\"acc#acc\"</span>: <span style=\"color: #008080; text-decoration-color: #008080; font-weight: bold\">0.878125</span>,\n",
  439. " <span style=\"color: #000080; text-decoration-color: #000080; font-weight: bold\">\"total#acc\"</span>: <span style=\"color: #008080; text-decoration-color: #008080; font-weight: bold\">320.0</span>,\n",
  440. " <span style=\"color: #000080; text-decoration-color: #000080; font-weight: bold\">\"correct#acc\"</span>: <span style=\"color: #008080; text-decoration-color: #008080; font-weight: bold\">281.0</span>\n",
  441. "<span style=\"font-weight: bold\">}</span>\n",
  442. "</pre>\n"
  443. ],
  444. "text/plain": [
  445. "\u001b[1m{\u001b[0m\n",
  446. " \u001b[1;34m\"acc#acc\"\u001b[0m: \u001b[1;36m0.878125\u001b[0m,\n",
  447. " \u001b[1;34m\"total#acc\"\u001b[0m: \u001b[1;36m320.0\u001b[0m,\n",
  448. " \u001b[1;34m\"correct#acc\"\u001b[0m: \u001b[1;36m281.0\u001b[0m\n",
  449. "\u001b[1m}\u001b[0m\n"
  450. ]
  451. },
  452. "metadata": {},
  453. "output_type": "display_data"
  454. },
  455. {
  456. "data": {
  457. "text/html": [
  458. "<pre style=\"white-space:pre;overflow-x:auto;line-height:normal;font-family:Menlo,'DejaVu Sans Mono',consolas,'Courier New',monospace\">\n",
  459. "</pre>\n"
  460. ],
  461. "text/plain": [
  462. "\n"
  463. ]
  464. },
  465. "metadata": {},
  466. "output_type": "display_data"
  467. },
  468. {
  469. "data": {
  470. "text/html": [
  471. "<pre style=\"white-space:pre;overflow-x:auto;line-height:normal;font-family:Menlo,'DejaVu Sans Mono',consolas,'Courier New',monospace\">----------------------------- Eval. results on Epoch:<span style=\"color: #008080; text-decoration-color: #008080; font-weight: bold\">3</span>, Batch:<span style=\"color: #008080; text-decoration-color: #008080; font-weight: bold\">0</span> -----------------------------\n",
  472. "</pre>\n"
  473. ],
  474. "text/plain": [
  475. "----------------------------- Eval. results on Epoch:\u001b[1;36m3\u001b[0m, Batch:\u001b[1;36m0\u001b[0m -----------------------------\n"
  476. ]
  477. },
  478. "metadata": {},
  479. "output_type": "display_data"
  480. },
  481. {
  482. "data": {
  483. "text/html": [
  484. "<pre style=\"white-space:pre;overflow-x:auto;line-height:normal;font-family:Menlo,'DejaVu Sans Mono',consolas,'Courier New',monospace\"><span style=\"font-weight: bold\">{</span>\n",
  485. " <span style=\"color: #000080; text-decoration-color: #000080; font-weight: bold\">\"acc#acc\"</span>: <span style=\"color: #008080; text-decoration-color: #008080; font-weight: bold\">0.871875</span>,\n",
  486. " <span style=\"color: #000080; text-decoration-color: #000080; font-weight: bold\">\"total#acc\"</span>: <span style=\"color: #008080; text-decoration-color: #008080; font-weight: bold\">320.0</span>,\n",
  487. " <span style=\"color: #000080; text-decoration-color: #000080; font-weight: bold\">\"correct#acc\"</span>: <span style=\"color: #008080; text-decoration-color: #008080; font-weight: bold\">279.0</span>\n",
  488. "<span style=\"font-weight: bold\">}</span>\n",
  489. "</pre>\n"
  490. ],
  491. "text/plain": [
  492. "\u001b[1m{\u001b[0m\n",
  493. " \u001b[1;34m\"acc#acc\"\u001b[0m: \u001b[1;36m0.871875\u001b[0m,\n",
  494. " \u001b[1;34m\"total#acc\"\u001b[0m: \u001b[1;36m320.0\u001b[0m,\n",
  495. " \u001b[1;34m\"correct#acc\"\u001b[0m: \u001b[1;36m279.0\u001b[0m\n",
  496. "\u001b[1m}\u001b[0m\n"
  497. ]
  498. },
  499. "metadata": {},
  500. "output_type": "display_data"
  501. },
  502. {
  503. "data": {
  504. "text/html": [
  505. "<pre style=\"white-space:pre;overflow-x:auto;line-height:normal;font-family:Menlo,'DejaVu Sans Mono',consolas,'Courier New',monospace\">\n",
  506. "</pre>\n"
  507. ],
  508. "text/plain": [
  509. "\n"
  510. ]
  511. },
  512. "metadata": {},
  513. "output_type": "display_data"
  514. },
  515. {
  516. "data": {
  517. "text/html": [
  518. "<pre style=\"white-space:pre;overflow-x:auto;line-height:normal;font-family:Menlo,'DejaVu Sans Mono',consolas,'Courier New',monospace\">----------------------------- Eval. results on Epoch:<span style=\"color: #008080; text-decoration-color: #008080; font-weight: bold\">4</span>, Batch:<span style=\"color: #008080; text-decoration-color: #008080; font-weight: bold\">0</span> -----------------------------\n",
  519. "</pre>\n"
  520. ],
  521. "text/plain": [
  522. "----------------------------- Eval. results on Epoch:\u001b[1;36m4\u001b[0m, Batch:\u001b[1;36m0\u001b[0m -----------------------------\n"
  523. ]
  524. },
  525. "metadata": {},
  526. "output_type": "display_data"
  527. },
  528. {
  529. "data": {
  530. "text/html": [
  531. "<pre style=\"white-space:pre;overflow-x:auto;line-height:normal;font-family:Menlo,'DejaVu Sans Mono',consolas,'Courier New',monospace\"><span style=\"font-weight: bold\">{</span>\n",
  532. " <span style=\"color: #000080; text-decoration-color: #000080; font-weight: bold\">\"acc#acc\"</span>: <span style=\"color: #008080; text-decoration-color: #008080; font-weight: bold\">0.903125</span>,\n",
  533. " <span style=\"color: #000080; text-decoration-color: #000080; font-weight: bold\">\"total#acc\"</span>: <span style=\"color: #008080; text-decoration-color: #008080; font-weight: bold\">320.0</span>,\n",
  534. " <span style=\"color: #000080; text-decoration-color: #000080; font-weight: bold\">\"correct#acc\"</span>: <span style=\"color: #008080; text-decoration-color: #008080; font-weight: bold\">289.0</span>\n",
  535. "<span style=\"font-weight: bold\">}</span>\n",
  536. "</pre>\n"
  537. ],
  538. "text/plain": [
  539. "\u001b[1m{\u001b[0m\n",
  540. " \u001b[1;34m\"acc#acc\"\u001b[0m: \u001b[1;36m0.903125\u001b[0m,\n",
  541. " \u001b[1;34m\"total#acc\"\u001b[0m: \u001b[1;36m320.0\u001b[0m,\n",
  542. " \u001b[1;34m\"correct#acc\"\u001b[0m: \u001b[1;36m289.0\u001b[0m\n",
  543. "\u001b[1m}\u001b[0m\n"
  544. ]
  545. },
  546. "metadata": {},
  547. "output_type": "display_data"
  548. },
  549. {
  550. "data": {
  551. "text/html": [
  552. "<pre style=\"white-space:pre;overflow-x:auto;line-height:normal;font-family:Menlo,'DejaVu Sans Mono',consolas,'Courier New',monospace\">\n",
  553. "</pre>\n"
  554. ],
  555. "text/plain": [
  556. "\n"
  557. ]
  558. },
  559. "metadata": {},
  560. "output_type": "display_data"
  561. },
  562. {
  563. "data": {
  564. "text/html": [
  565. "<pre style=\"white-space:pre;overflow-x:auto;line-height:normal;font-family:Menlo,'DejaVu Sans Mono',consolas,'Courier New',monospace\">----------------------------- Eval. results on Epoch:<span style=\"color: #008080; text-decoration-color: #008080; font-weight: bold\">5</span>, Batch:<span style=\"color: #008080; text-decoration-color: #008080; font-weight: bold\">0</span> -----------------------------\n",
  566. "</pre>\n"
  567. ],
  568. "text/plain": [
  569. "----------------------------- Eval. results on Epoch:\u001b[1;36m5\u001b[0m, Batch:\u001b[1;36m0\u001b[0m -----------------------------\n"
  570. ]
  571. },
  572. "metadata": {},
  573. "output_type": "display_data"
  574. },
  575. {
  576. "data": {
  577. "text/html": [
  578. "<pre style=\"white-space:pre;overflow-x:auto;line-height:normal;font-family:Menlo,'DejaVu Sans Mono',consolas,'Courier New',monospace\"><span style=\"font-weight: bold\">{</span>\n",
  579. " <span style=\"color: #000080; text-decoration-color: #000080; font-weight: bold\">\"acc#acc\"</span>: <span style=\"color: #008080; text-decoration-color: #008080; font-weight: bold\">0.871875</span>,\n",
  580. " <span style=\"color: #000080; text-decoration-color: #000080; font-weight: bold\">\"total#acc\"</span>: <span style=\"color: #008080; text-decoration-color: #008080; font-weight: bold\">320.0</span>,\n",
  581. " <span style=\"color: #000080; text-decoration-color: #000080; font-weight: bold\">\"correct#acc\"</span>: <span style=\"color: #008080; text-decoration-color: #008080; font-weight: bold\">279.0</span>\n",
  582. "<span style=\"font-weight: bold\">}</span>\n",
  583. "</pre>\n"
  584. ],
  585. "text/plain": [
  586. "\u001b[1m{\u001b[0m\n",
  587. " \u001b[1;34m\"acc#acc\"\u001b[0m: \u001b[1;36m0.871875\u001b[0m,\n",
  588. " \u001b[1;34m\"total#acc\"\u001b[0m: \u001b[1;36m320.0\u001b[0m,\n",
  589. " \u001b[1;34m\"correct#acc\"\u001b[0m: \u001b[1;36m279.0\u001b[0m\n",
  590. "\u001b[1m}\u001b[0m\n"
  591. ]
  592. },
  593. "metadata": {},
  594. "output_type": "display_data"
  595. },
  596. {
  597. "data": {
  598. "text/html": [
  599. "<pre style=\"white-space:pre;overflow-x:auto;line-height:normal;font-family:Menlo,'DejaVu Sans Mono',consolas,'Courier New',monospace\">\n",
  600. "</pre>\n"
  601. ],
  602. "text/plain": [
  603. "\n"
  604. ]
  605. },
  606. "metadata": {},
  607. "output_type": "display_data"
  608. },
  609. {
  610. "data": {
  611. "text/html": [
  612. "<pre style=\"white-space:pre;overflow-x:auto;line-height:normal;font-family:Menlo,'DejaVu Sans Mono',consolas,'Courier New',monospace\">----------------------------- Eval. results on Epoch:<span style=\"color: #008080; text-decoration-color: #008080; font-weight: bold\">6</span>, Batch:<span style=\"color: #008080; text-decoration-color: #008080; font-weight: bold\">0</span> -----------------------------\n",
  613. "</pre>\n"
  614. ],
  615. "text/plain": [
  616. "----------------------------- Eval. results on Epoch:\u001b[1;36m6\u001b[0m, Batch:\u001b[1;36m0\u001b[0m -----------------------------\n"
  617. ]
  618. },
  619. "metadata": {},
  620. "output_type": "display_data"
  621. },
  622. {
  623. "data": {
  624. "text/html": [
  625. "<pre style=\"white-space:pre;overflow-x:auto;line-height:normal;font-family:Menlo,'DejaVu Sans Mono',consolas,'Courier New',monospace\"><span style=\"font-weight: bold\">{</span>\n",
  626. " <span style=\"color: #000080; text-decoration-color: #000080; font-weight: bold\">\"acc#acc\"</span>: <span style=\"color: #008080; text-decoration-color: #008080; font-weight: bold\">0.890625</span>,\n",
  627. " <span style=\"color: #000080; text-decoration-color: #000080; font-weight: bold\">\"total#acc\"</span>: <span style=\"color: #008080; text-decoration-color: #008080; font-weight: bold\">320.0</span>,\n",
  628. " <span style=\"color: #000080; text-decoration-color: #000080; font-weight: bold\">\"correct#acc\"</span>: <span style=\"color: #008080; text-decoration-color: #008080; font-weight: bold\">285.0</span>\n",
  629. "<span style=\"font-weight: bold\">}</span>\n",
  630. "</pre>\n"
  631. ],
  632. "text/plain": [
  633. "\u001b[1m{\u001b[0m\n",
  634. " \u001b[1;34m\"acc#acc\"\u001b[0m: \u001b[1;36m0.890625\u001b[0m,\n",
  635. " \u001b[1;34m\"total#acc\"\u001b[0m: \u001b[1;36m320.0\u001b[0m,\n",
  636. " \u001b[1;34m\"correct#acc\"\u001b[0m: \u001b[1;36m285.0\u001b[0m\n",
  637. "\u001b[1m}\u001b[0m\n"
  638. ]
  639. },
  640. "metadata": {},
  641. "output_type": "display_data"
  642. },
  643. {
  644. "data": {
  645. "text/html": [
  646. "<pre style=\"white-space:pre;overflow-x:auto;line-height:normal;font-family:Menlo,'DejaVu Sans Mono',consolas,'Courier New',monospace\">\n",
  647. "</pre>\n"
  648. ],
  649. "text/plain": [
  650. "\n"
  651. ]
  652. },
  653. "metadata": {},
  654. "output_type": "display_data"
  655. },
  656. {
  657. "data": {
  658. "text/html": [
  659. "<pre style=\"white-space:pre;overflow-x:auto;line-height:normal;font-family:Menlo,'DejaVu Sans Mono',consolas,'Courier New',monospace\">----------------------------- Eval. results on Epoch:<span style=\"color: #008080; text-decoration-color: #008080; font-weight: bold\">7</span>, Batch:<span style=\"color: #008080; text-decoration-color: #008080; font-weight: bold\">0</span> -----------------------------\n",
  660. "</pre>\n"
  661. ],
  662. "text/plain": [
  663. "----------------------------- Eval. results on Epoch:\u001b[1;36m7\u001b[0m, Batch:\u001b[1;36m0\u001b[0m -----------------------------\n"
  664. ]
  665. },
  666. "metadata": {},
  667. "output_type": "display_data"
  668. },
  669. {
  670. "data": {
  671. "text/html": [
  672. "<pre style=\"white-space:pre;overflow-x:auto;line-height:normal;font-family:Menlo,'DejaVu Sans Mono',consolas,'Courier New',monospace\"><span style=\"font-weight: bold\">{</span>\n",
  673. " <span style=\"color: #000080; text-decoration-color: #000080; font-weight: bold\">\"acc#acc\"</span>: <span style=\"color: #008080; text-decoration-color: #008080; font-weight: bold\">0.875</span>,\n",
  674. " <span style=\"color: #000080; text-decoration-color: #000080; font-weight: bold\">\"total#acc\"</span>: <span style=\"color: #008080; text-decoration-color: #008080; font-weight: bold\">320.0</span>,\n",
  675. " <span style=\"color: #000080; text-decoration-color: #000080; font-weight: bold\">\"correct#acc\"</span>: <span style=\"color: #008080; text-decoration-color: #008080; font-weight: bold\">280.0</span>\n",
  676. "<span style=\"font-weight: bold\">}</span>\n",
  677. "</pre>\n"
  678. ],
  679. "text/plain": [
  680. "\u001b[1m{\u001b[0m\n",
  681. " \u001b[1;34m\"acc#acc\"\u001b[0m: \u001b[1;36m0.875\u001b[0m,\n",
  682. " \u001b[1;34m\"total#acc\"\u001b[0m: \u001b[1;36m320.0\u001b[0m,\n",
  683. " \u001b[1;34m\"correct#acc\"\u001b[0m: \u001b[1;36m280.0\u001b[0m\n",
  684. "\u001b[1m}\u001b[0m\n"
  685. ]
  686. },
  687. "metadata": {},
  688. "output_type": "display_data"
  689. },
  690. {
  691. "data": {
  692. "text/html": [
  693. "<pre style=\"white-space:pre;overflow-x:auto;line-height:normal;font-family:Menlo,'DejaVu Sans Mono',consolas,'Courier New',monospace\">\n",
  694. "</pre>\n"
  695. ],
  696. "text/plain": [
  697. "\n"
  698. ]
  699. },
  700. "metadata": {},
  701. "output_type": "display_data"
  702. },
  703. {
  704. "data": {
  705. "text/html": [
  706. "<pre style=\"white-space:pre;overflow-x:auto;line-height:normal;font-family:Menlo,'DejaVu Sans Mono',consolas,'Courier New',monospace\">----------------------------- Eval. results on Epoch:<span style=\"color: #008080; text-decoration-color: #008080; font-weight: bold\">8</span>, Batch:<span style=\"color: #008080; text-decoration-color: #008080; font-weight: bold\">0</span> -----------------------------\n",
  707. "</pre>\n"
  708. ],
  709. "text/plain": [
  710. "----------------------------- Eval. results on Epoch:\u001b[1;36m8\u001b[0m, Batch:\u001b[1;36m0\u001b[0m -----------------------------\n"
  711. ]
  712. },
  713. "metadata": {},
  714. "output_type": "display_data"
  715. },
  716. {
  717. "data": {
  718. "text/html": [
  719. "<pre style=\"white-space:pre;overflow-x:auto;line-height:normal;font-family:Menlo,'DejaVu Sans Mono',consolas,'Courier New',monospace\"><span style=\"font-weight: bold\">{</span>\n",
  720. " <span style=\"color: #000080; text-decoration-color: #000080; font-weight: bold\">\"acc#acc\"</span>: <span style=\"color: #008080; text-decoration-color: #008080; font-weight: bold\">0.8875</span>,\n",
  721. " <span style=\"color: #000080; text-decoration-color: #000080; font-weight: bold\">\"total#acc\"</span>: <span style=\"color: #008080; text-decoration-color: #008080; font-weight: bold\">320.0</span>,\n",
  722. " <span style=\"color: #000080; text-decoration-color: #000080; font-weight: bold\">\"correct#acc\"</span>: <span style=\"color: #008080; text-decoration-color: #008080; font-weight: bold\">284.0</span>\n",
  723. "<span style=\"font-weight: bold\">}</span>\n",
  724. "</pre>\n"
  725. ],
  726. "text/plain": [
  727. "\u001b[1m{\u001b[0m\n",
  728. " \u001b[1;34m\"acc#acc\"\u001b[0m: \u001b[1;36m0.8875\u001b[0m,\n",
  729. " \u001b[1;34m\"total#acc\"\u001b[0m: \u001b[1;36m320.0\u001b[0m,\n",
  730. " \u001b[1;34m\"correct#acc\"\u001b[0m: \u001b[1;36m284.0\u001b[0m\n",
  731. "\u001b[1m}\u001b[0m\n"
  732. ]
  733. },
  734. "metadata": {},
  735. "output_type": "display_data"
  736. },
  737. {
  738. "data": {
  739. "text/html": [
  740. "<pre style=\"white-space:pre;overflow-x:auto;line-height:normal;font-family:Menlo,'DejaVu Sans Mono',consolas,'Courier New',monospace\">\n",
  741. "</pre>\n"
  742. ],
  743. "text/plain": [
  744. "\n"
  745. ]
  746. },
  747. "metadata": {},
  748. "output_type": "display_data"
  749. },
  750. {
  751. "data": {
  752. "text/html": [
  753. "<pre style=\"white-space:pre;overflow-x:auto;line-height:normal;font-family:Menlo,'DejaVu Sans Mono',consolas,'Courier New',monospace\">----------------------------- Eval. results on Epoch:<span style=\"color: #008080; text-decoration-color: #008080; font-weight: bold\">9</span>, Batch:<span style=\"color: #008080; text-decoration-color: #008080; font-weight: bold\">0</span> -----------------------------\n",
  754. "</pre>\n"
  755. ],
  756. "text/plain": [
  757. "----------------------------- Eval. results on Epoch:\u001b[1;36m9\u001b[0m, Batch:\u001b[1;36m0\u001b[0m -----------------------------\n"
  758. ]
  759. },
  760. "metadata": {},
  761. "output_type": "display_data"
  762. },
  763. {
  764. "data": {
  765. "text/html": [
  766. "<pre style=\"white-space:pre;overflow-x:auto;line-height:normal;font-family:Menlo,'DejaVu Sans Mono',consolas,'Courier New',monospace\"><span style=\"font-weight: bold\">{</span>\n",
  767. " <span style=\"color: #000080; text-decoration-color: #000080; font-weight: bold\">\"acc#acc\"</span>: <span style=\"color: #008080; text-decoration-color: #008080; font-weight: bold\">0.8875</span>,\n",
  768. " <span style=\"color: #000080; text-decoration-color: #000080; font-weight: bold\">\"total#acc\"</span>: <span style=\"color: #008080; text-decoration-color: #008080; font-weight: bold\">320.0</span>,\n",
  769. " <span style=\"color: #000080; text-decoration-color: #000080; font-weight: bold\">\"correct#acc\"</span>: <span style=\"color: #008080; text-decoration-color: #008080; font-weight: bold\">284.0</span>\n",
  770. "<span style=\"font-weight: bold\">}</span>\n",
  771. "</pre>\n"
  772. ],
  773. "text/plain": [
  774. "\u001b[1m{\u001b[0m\n",
  775. " \u001b[1;34m\"acc#acc\"\u001b[0m: \u001b[1;36m0.8875\u001b[0m,\n",
  776. " \u001b[1;34m\"total#acc\"\u001b[0m: \u001b[1;36m320.0\u001b[0m,\n",
  777. " \u001b[1;34m\"correct#acc\"\u001b[0m: \u001b[1;36m284.0\u001b[0m\n",
  778. "\u001b[1m}\u001b[0m\n"
  779. ]
  780. },
  781. "metadata": {},
  782. "output_type": "display_data"
  783. },
  784. {
  785. "data": {
  786. "text/html": [
  787. "<pre style=\"white-space:pre;overflow-x:auto;line-height:normal;font-family:Menlo,'DejaVu Sans Mono',consolas,'Courier New',monospace\">\n",
  788. "</pre>\n"
  789. ],
  790. "text/plain": [
  791. "\n"
  792. ]
  793. },
  794. "metadata": {},
  795. "output_type": "display_data"
  796. },
  797. {
  798. "data": {
  799. "text/html": [
  800. "<pre style=\"white-space:pre;overflow-x:auto;line-height:normal;font-family:Menlo,'DejaVu Sans Mono',consolas,'Courier New',monospace\">---------------------------- Eval. results on Epoch:<span style=\"color: #008080; text-decoration-color: #008080; font-weight: bold\">10</span>, Batch:<span style=\"color: #008080; text-decoration-color: #008080; font-weight: bold\">0</span> -----------------------------\n",
  801. "</pre>\n"
  802. ],
  803. "text/plain": [
  804. "---------------------------- Eval. results on Epoch:\u001b[1;36m10\u001b[0m, Batch:\u001b[1;36m0\u001b[0m -----------------------------\n"
  805. ]
  806. },
  807. "metadata": {},
  808. "output_type": "display_data"
  809. },
  810. {
  811. "data": {
  812. "text/html": [
  813. "<pre style=\"white-space:pre;overflow-x:auto;line-height:normal;font-family:Menlo,'DejaVu Sans Mono',consolas,'Courier New',monospace\"><span style=\"font-weight: bold\">{</span>\n",
  814. " <span style=\"color: #000080; text-decoration-color: #000080; font-weight: bold\">\"acc#acc\"</span>: <span style=\"color: #008080; text-decoration-color: #008080; font-weight: bold\">0.890625</span>,\n",
  815. " <span style=\"color: #000080; text-decoration-color: #000080; font-weight: bold\">\"total#acc\"</span>: <span style=\"color: #008080; text-decoration-color: #008080; font-weight: bold\">320.0</span>,\n",
  816. " <span style=\"color: #000080; text-decoration-color: #000080; font-weight: bold\">\"correct#acc\"</span>: <span style=\"color: #008080; text-decoration-color: #008080; font-weight: bold\">285.0</span>\n",
  817. "<span style=\"font-weight: bold\">}</span>\n",
  818. "</pre>\n"
  819. ],
  820. "text/plain": [
  821. "\u001b[1m{\u001b[0m\n",
  822. " \u001b[1;34m\"acc#acc\"\u001b[0m: \u001b[1;36m0.890625\u001b[0m,\n",
  823. " \u001b[1;34m\"total#acc\"\u001b[0m: \u001b[1;36m320.0\u001b[0m,\n",
  824. " \u001b[1;34m\"correct#acc\"\u001b[0m: \u001b[1;36m285.0\u001b[0m\n",
  825. "\u001b[1m}\u001b[0m\n"
  826. ]
  827. },
  828. "metadata": {},
  829. "output_type": "display_data"
  830. },
  831. {
  832. "data": {
  833. "text/html": [
  834. "<pre style=\"white-space:pre;overflow-x:auto;line-height:normal;font-family:Menlo,'DejaVu Sans Mono',consolas,'Courier New',monospace\"></pre>\n"
  835. ],
  836. "text/plain": []
  837. },
  838. "metadata": {},
  839. "output_type": "display_data"
  840. },
  841. {
  842. "data": {
  843. "text/html": [
  844. "<pre style=\"white-space:pre;overflow-x:auto;line-height:normal;font-family:Menlo,'DejaVu Sans Mono',consolas,'Courier New',monospace\">\n",
  845. "</pre>\n"
  846. ],
  847. "text/plain": [
  848. "\n"
  849. ]
  850. },
  851. "metadata": {},
  852. "output_type": "display_data"
  853. }
  854. ],
  855. "source": [
  856. "trainer.run(num_eval_batch_per_dl=10)"
  857. ]
  858. },
  859. {
  860. "cell_type": "code",
  861. "execution_count": null,
  862. "metadata": {},
  863. "outputs": [],
  864. "source": []
  865. }
  866. ],
  867. "metadata": {
  868. "kernelspec": {
  869. "display_name": "Python 3 (ipykernel)",
  870. "language": "python",
  871. "name": "python3"
  872. },
  873. "language_info": {
  874. "codemirror_mode": {
  875. "name": "ipython",
  876. "version": 3
  877. },
  878. "file_extension": ".py",
  879. "mimetype": "text/x-python",
  880. "name": "python",
  881. "nbconvert_exporter": "python",
  882. "pygments_lexer": "ipython3",
  883. "version": "3.7.13"
  884. },
  885. "pycharm": {
  886. "stem_cell": {
  887. "cell_type": "raw",
  888. "metadata": {
  889. "collapsed": false
  890. },
  891. "source": []
  892. }
  893. }
  894. },
  895. "nbformat": 4,
  896. "nbformat_minor": 1
  897. }