Xsmos commited on
Commit
7447107
·
verified ·
1 Parent(s): 7a9defa
Files changed (1) hide show
  1. diffusion.ipynb +34 -13
diffusion.ipynb CHANGED
@@ -399,6 +399,7 @@
399
  " ## training loop ##\n",
400
  " ###################\n",
401
  " # plot_unet = True\n",
 
402
  " self.load()\n",
403
  " self.accelerator = Accelerator(\n",
404
  " mixed_precision=self.config.mixed_precision,\n",
@@ -406,6 +407,7 @@
406
  " log_with=\"tensorboard\",\n",
407
  " project_dir=os.path.join(self.config.output_dir, \"logs\"),\n",
408
  " )\n",
 
409
  " if self.accelerator.is_main_process:\n",
410
  " if self.config.output_dir is not None:\n",
411
  " os.makedirs(self.config.output_dir, exist_ok=True)\n",
@@ -566,7 +568,7 @@
566
  "text": [
567
  "Number of parameters for nn_model: 160234497\n",
568
  "---------------- num_image = 100 -----------------\n",
569
- "run_name = 0709-1331\n",
570
  "dataset content: <KeysViewHDF5 ['brightness_temp', 'density', 'kwargs', 'params', 'redshifts_distances', 'seeds', 'xH_box']>\n",
571
  "51200 images can be loaded\n",
572
  "field.shape = (64, 64, 514)\n",
@@ -587,14 +589,15 @@
587
  "output_type": "stream",
588
  "text": [
589
  "params loaded: (100, 2)\n",
590
- "images rescaled to [-1.0, 1.1254141330718994]\n",
591
- "params rescaled to [0.0022036265313531977, 0.9978807793709957]\n"
 
592
  ]
593
  },
594
  {
595
  "data": {
596
  "application/vnd.jupyter.widget-view+json": {
597
- "model_id": "ae9f12def1154f6cb1eb0fc8d1e1871c",
598
  "version_major": 2,
599
  "version_minor": 0
600
  },
@@ -608,7 +611,7 @@
608
  {
609
  "data": {
610
  "application/vnd.jupyter.widget-view+json": {
611
- "model_id": "cae19ac5ef7a4c34b6b57a6478dc159d",
612
  "version_major": 2,
613
  "version_minor": 0
614
  },
@@ -622,7 +625,7 @@
622
  {
623
  "data": {
624
  "application/vnd.jupyter.widget-view+json": {
625
- "model_id": "b448b32948894b3c8e8780f1b6e6bf58",
626
  "version_major": 2,
627
  "version_minor": 0
628
  },
@@ -636,7 +639,7 @@
636
  {
637
  "data": {
638
  "application/vnd.jupyter.widget-view+json": {
639
- "model_id": "0271ab7c081a43ebb830dcfd3db145c1",
640
  "version_major": 2,
641
  "version_minor": 0
642
  },
@@ -650,7 +653,7 @@
650
  {
651
  "data": {
652
  "application/vnd.jupyter.widget-view+json": {
653
- "model_id": "1bdf4c28272840f496288545bfdbdb96",
654
  "version_major": 2,
655
  "version_minor": 0
656
  },
@@ -664,7 +667,7 @@
664
  {
665
  "data": {
666
  "application/vnd.jupyter.widget-view+json": {
667
- "model_id": "01b50340758b4b05891e51a616660eb8",
668
  "version_major": 2,
669
  "version_minor": 0
670
  },
@@ -678,7 +681,7 @@
678
  {
679
  "data": {
680
  "application/vnd.jupyter.widget-view+json": {
681
- "model_id": "20ba64496e5e4467b97428cf6dcdbeb5",
682
  "version_major": 2,
683
  "version_minor": 0
684
  },
@@ -692,7 +695,7 @@
692
  {
693
  "data": {
694
  "application/vnd.jupyter.widget-view+json": {
695
- "model_id": "8023e0bde0c3438fb218126c58fee954",
696
  "version_major": 2,
697
  "version_minor": 0
698
  },
@@ -706,7 +709,7 @@
706
  {
707
  "data": {
708
  "application/vnd.jupyter.widget-view+json": {
709
- "model_id": "22881fbe8aff4ac1a3bde8735ab4fd24",
710
  "version_major": 2,
711
  "version_minor": 0
712
  },
@@ -720,7 +723,7 @@
720
  {
721
  "data": {
722
  "application/vnd.jupyter.widget-view+json": {
723
- "model_id": "3bf15c9ba5144fa69fdddae271c7dbee",
724
  "version_major": 2,
725
  "version_minor": 0
726
  },
@@ -849,6 +852,24 @@
849
  "# # plt.imshow(images[0,0])\n",
850
  "# # plt.show()"
851
  ]
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
852
  }
853
  ],
854
  "metadata": {
 
399
  " ## training loop ##\n",
400
  " ###################\n",
401
  " # plot_unet = True\n",
402
+ " \n",
403
  " self.load()\n",
404
  " self.accelerator = Accelerator(\n",
405
  " mixed_precision=self.config.mixed_precision,\n",
 
407
  " log_with=\"tensorboard\",\n",
408
  " project_dir=os.path.join(self.config.output_dir, \"logs\"),\n",
409
  " )\n",
410
+ " print(\"self.accelerator.is_main_process:\", self.accelerator.is_main_process)\n",
411
  " if self.accelerator.is_main_process:\n",
412
  " if self.config.output_dir is not None:\n",
413
  " os.makedirs(self.config.output_dir, exist_ok=True)\n",
 
568
  "text": [
569
  "Number of parameters for nn_model: 160234497\n",
570
  "---------------- num_image = 100 -----------------\n",
571
+ "run_name = 0709-1355\n",
572
  "dataset content: <KeysViewHDF5 ['brightness_temp', 'density', 'kwargs', 'params', 'redshifts_distances', 'seeds', 'xH_box']>\n",
573
  "51200 images can be loaded\n",
574
  "field.shape = (64, 64, 514)\n",
 
589
  "output_type": "stream",
590
  "text": [
591
  "params loaded: (100, 2)\n",
592
+ "images rescaled to [-1.0, 1.1527893543243408]\n",
593
+ "params rescaled to [0.01349925332487425, 0.9922290052754472]\n",
594
+ "self.accelerator.is_main_process: True\n"
595
  ]
596
  },
597
  {
598
  "data": {
599
  "application/vnd.jupyter.widget-view+json": {
600
+ "model_id": "00624ec4da1045659dcdab30773ac988",
601
  "version_major": 2,
602
  "version_minor": 0
603
  },
 
611
  {
612
  "data": {
613
  "application/vnd.jupyter.widget-view+json": {
614
+ "model_id": "817bb9f1a9534a6d9aeb353178cbada7",
615
  "version_major": 2,
616
  "version_minor": 0
617
  },
 
625
  {
626
  "data": {
627
  "application/vnd.jupyter.widget-view+json": {
628
+ "model_id": "076537a3f8ae45a888d6c57f71cad35c",
629
  "version_major": 2,
630
  "version_minor": 0
631
  },
 
639
  {
640
  "data": {
641
  "application/vnd.jupyter.widget-view+json": {
642
+ "model_id": "4fdf9b37d0f049538be616bea1c1ee15",
643
  "version_major": 2,
644
  "version_minor": 0
645
  },
 
653
  {
654
  "data": {
655
  "application/vnd.jupyter.widget-view+json": {
656
+ "model_id": "92922681843d42b2a0d56f67eaa32506",
657
  "version_major": 2,
658
  "version_minor": 0
659
  },
 
667
  {
668
  "data": {
669
  "application/vnd.jupyter.widget-view+json": {
670
+ "model_id": "8bf7c44087e244da85573e2146f18c74",
671
  "version_major": 2,
672
  "version_minor": 0
673
  },
 
681
  {
682
  "data": {
683
  "application/vnd.jupyter.widget-view+json": {
684
+ "model_id": "bbeb4c2aa6f742e8bda3176f53f1b0d8",
685
  "version_major": 2,
686
  "version_minor": 0
687
  },
 
695
  {
696
  "data": {
697
  "application/vnd.jupyter.widget-view+json": {
698
+ "model_id": "6d5b5b24015247c48544e995dfa917ec",
699
  "version_major": 2,
700
  "version_minor": 0
701
  },
 
709
  {
710
  "data": {
711
  "application/vnd.jupyter.widget-view+json": {
712
+ "model_id": "d0e3399ca4a54a9bae5e63c11bbd361f",
713
  "version_major": 2,
714
  "version_minor": 0
715
  },
 
723
  {
724
  "data": {
725
  "application/vnd.jupyter.widget-view+json": {
726
+ "model_id": "a9939b9288c84fd99091702efe3a2e8a",
727
  "version_major": 2,
728
  "version_minor": 0
729
  },
 
852
  "# # plt.imshow(images[0,0])\n",
853
  "# # plt.show()"
854
  ]
855
+ },
856
+ {
857
+ "cell_type": "code",
858
+ "execution_count": 1,
859
+ "metadata": {},
860
+ "outputs": [
861
+ {
862
+ "name": "stdout",
863
+ "output_type": "stream",
864
+ "text": [
865
+ "1.12.0\n"
866
+ ]
867
+ }
868
+ ],
869
+ "source": [
870
+ "import torch\n",
871
+ "print(torch.__version__)"
872
+ ]
873
  }
874
  ],
875
  "metadata": {