Xsmos commited on
Commit
57bf426
·
verified ·
1 Parent(s): 4ef91db
Files changed (1) hide show
  1. diffusion.ipynb +32 -32
diffusion.ipynb CHANGED
@@ -225,7 +225,7 @@
225
  },
226
  {
227
  "cell_type": "code",
228
- "execution_count": 4,
229
  "metadata": {},
230
  "outputs": [],
231
  "source": [
@@ -243,7 +243,7 @@
243
  " # dim = 2\n",
244
  " dim = 2\n",
245
  " stride = (2,2) if dim == 2 else (2,2,4)\n",
246
- " num_image = 40#2400\n",
247
  " HII_DIM = 64\n",
248
  " num_redshift = 512#256#256#64#512#128\n",
249
  " channel = 1\n",
@@ -291,7 +291,7 @@
291
  },
292
  {
293
  "cell_type": "code",
294
- "execution_count": 5,
295
  "metadata": {},
296
  "outputs": [
297
  {
@@ -444,7 +444,7 @@
444
  " repo_id = self.repo_id,\n",
445
  " folder_path = \".\",#config.output_dir,\n",
446
  " commit_message = f\"{self.config.date}\",\n",
447
- " ignore_patterns = [\"step_*\", \"epoch_*\", \"*.npy\"],\n",
448
  " )\n",
449
  " if self.config.save_model:\n",
450
  " model_state = {\n",
@@ -502,13 +502,13 @@
502
  },
503
  {
504
  "cell_type": "code",
505
- "execution_count": 6,
506
  "metadata": {},
507
  "outputs": [
508
  {
509
  "data": {
510
  "application/vnd.jupyter.widget-view+json": {
511
- "model_id": "d488e670a37b408399687972aa7fef8a",
512
  "version_major": 2,
513
  "version_minor": 0
514
  },
@@ -528,8 +528,8 @@
528
  "51200 images can be loaded\n",
529
  "field.shape = (64, 64, 514)\n",
530
  "params keys = [b'ION_Tvir_MIN', b'HII_EFF_FACTOR']\n",
531
- "loading 40 images randomly\n",
532
- "images loaded: (40, 1, 64, 512)\n"
533
  ]
534
  },
535
  {
@@ -543,20 +543,20 @@
543
  "name": "stdout",
544
  "output_type": "stream",
545
  "text": [
546
- "params loaded: (40, 2)\n",
547
- "images rescaled to [-1.0, 1.1514630317687988]\n",
548
- "params rescaled to [0.0, 0.9958124549229699]\n"
549
  ]
550
  },
551
  {
552
  "data": {
553
  "application/vnd.jupyter.widget-view+json": {
554
- "model_id": "09696eb258f94136b32dec3290034ce2",
555
  "version_major": 2,
556
  "version_minor": 0
557
  },
558
  "text/plain": [
559
- " 0%| | 0/4 [00:00<?, ?it/s]"
560
  ]
561
  },
562
  "metadata": {},
@@ -565,12 +565,12 @@
565
  {
566
  "data": {
567
  "application/vnd.jupyter.widget-view+json": {
568
- "model_id": "77a8a7ad49d84bdcbfc522069118b222",
569
  "version_major": 2,
570
  "version_minor": 0
571
  },
572
  "text/plain": [
573
- " 0%| | 0/4 [00:00<?, ?it/s]"
574
  ]
575
  },
576
  "metadata": {},
@@ -579,12 +579,12 @@
579
  {
580
  "data": {
581
  "application/vnd.jupyter.widget-view+json": {
582
- "model_id": "28a00d5f8fdc472eae5b252888410421",
583
  "version_major": 2,
584
  "version_minor": 0
585
  },
586
  "text/plain": [
587
- " 0%| | 0/4 [00:00<?, ?it/s]"
588
  ]
589
  },
590
  "metadata": {},
@@ -593,12 +593,12 @@
593
  {
594
  "data": {
595
  "application/vnd.jupyter.widget-view+json": {
596
- "model_id": "f145f20dab944419a730632a9d5081fc",
597
  "version_major": 2,
598
  "version_minor": 0
599
  },
600
  "text/plain": [
601
- " 0%| | 0/4 [00:00<?, ?it/s]"
602
  ]
603
  },
604
  "metadata": {},
@@ -607,12 +607,12 @@
607
  {
608
  "data": {
609
  "application/vnd.jupyter.widget-view+json": {
610
- "model_id": "de801afbf6aa428b9d21bf6a76a28ee8",
611
  "version_major": 2,
612
  "version_minor": 0
613
  },
614
  "text/plain": [
615
- " 0%| | 0/4 [00:00<?, ?it/s]"
616
  ]
617
  },
618
  "metadata": {},
@@ -621,12 +621,12 @@
621
  {
622
  "data": {
623
  "application/vnd.jupyter.widget-view+json": {
624
- "model_id": "1e2c7ec7c4df438c93f21b420e93aaf3",
625
  "version_major": 2,
626
  "version_minor": 0
627
  },
628
  "text/plain": [
629
- " 0%| | 0/4 [00:00<?, ?it/s]"
630
  ]
631
  },
632
  "metadata": {},
@@ -635,12 +635,12 @@
635
  {
636
  "data": {
637
  "application/vnd.jupyter.widget-view+json": {
638
- "model_id": "e963fcaf27ae401e926053f9f9c146f4",
639
  "version_major": 2,
640
  "version_minor": 0
641
  },
642
  "text/plain": [
643
- " 0%| | 0/4 [00:00<?, ?it/s]"
644
  ]
645
  },
646
  "metadata": {},
@@ -649,12 +649,12 @@
649
  {
650
  "data": {
651
  "application/vnd.jupyter.widget-view+json": {
652
- "model_id": "d6fb1a76c93b45e59fa7d253ef344bda",
653
  "version_major": 2,
654
  "version_minor": 0
655
  },
656
  "text/plain": [
657
- " 0%| | 0/4 [00:00<?, ?it/s]"
658
  ]
659
  },
660
  "metadata": {},
@@ -663,12 +663,12 @@
663
  {
664
  "data": {
665
  "application/vnd.jupyter.widget-view+json": {
666
- "model_id": "f0d88179dc7d42a793a820f4d1a08da3",
667
  "version_major": 2,
668
  "version_minor": 0
669
  },
670
  "text/plain": [
671
- " 0%| | 0/4 [00:00<?, ?it/s]"
672
  ]
673
  },
674
  "metadata": {},
@@ -677,12 +677,12 @@
677
  {
678
  "data": {
679
  "application/vnd.jupyter.widget-view+json": {
680
- "model_id": "c8caffa8edc6457e97c2d315252a5adf",
681
  "version_major": 2,
682
  "version_minor": 0
683
  },
684
  "text/plain": [
685
- " 0%| | 0/4 [00:00<?, ?it/s]"
686
  ]
687
  },
688
  "metadata": {},
@@ -698,7 +698,7 @@
698
  },
699
  {
700
  "cell_type": "code",
701
- "execution_count": 15,
702
  "metadata": {},
703
  "outputs": [
704
  {
 
225
  },
226
  {
227
  "cell_type": "code",
228
+ "execution_count": 6,
229
  "metadata": {},
230
  "outputs": [],
231
  "source": [
 
243
  " # dim = 2\n",
244
  " dim = 2\n",
245
  " stride = (2,2) if dim == 2 else (2,2,4)\n",
246
+ " num_image = 240#0\n",
247
  " HII_DIM = 64\n",
248
  " num_redshift = 512#256#256#64#512#128\n",
249
  " channel = 1\n",
 
291
  },
292
  {
293
  "cell_type": "code",
294
+ "execution_count": 7,
295
  "metadata": {},
296
  "outputs": [
297
  {
 
444
  " repo_id = self.repo_id,\n",
445
  " folder_path = \".\",#config.output_dir,\n",
446
  " commit_message = f\"{self.config.date}\",\n",
447
+ " ignore_patterns = [\"step_*\", \"epoch_*\", \"*.npy\", \"__pycache__\"],\n",
448
  " )\n",
449
  " if self.config.save_model:\n",
450
  " model_state = {\n",
 
502
  },
503
  {
504
  "cell_type": "code",
505
+ "execution_count": 8,
506
  "metadata": {},
507
  "outputs": [
508
  {
509
  "data": {
510
  "application/vnd.jupyter.widget-view+json": {
511
+ "model_id": "16b1b0f49854415fbcc0b742cc453b7d",
512
  "version_major": 2,
513
  "version_minor": 0
514
  },
 
528
  "51200 images can be loaded\n",
529
  "field.shape = (64, 64, 514)\n",
530
  "params keys = [b'ION_Tvir_MIN', b'HII_EFF_FACTOR']\n",
531
+ "loading 240 images randomly\n",
532
+ "images loaded: (240, 1, 64, 512)\n"
533
  ]
534
  },
535
  {
 
543
  "name": "stdout",
544
  "output_type": "stream",
545
  "text": [
546
+ "params loaded: (240, 2)\n",
547
+ "images rescaled to [-1.0, 1.1050198078155518]\n",
548
+ "params rescaled to [0.0, 0.9977353610767956]\n"
549
  ]
550
  },
551
  {
552
  "data": {
553
  "application/vnd.jupyter.widget-view+json": {
554
+ "model_id": "5d938426444b466e8a1887e9f461fee4",
555
  "version_major": 2,
556
  "version_minor": 0
557
  },
558
  "text/plain": [
559
+ " 0%| | 0/24 [00:00<?, ?it/s]"
560
  ]
561
  },
562
  "metadata": {},
 
565
  {
566
  "data": {
567
  "application/vnd.jupyter.widget-view+json": {
568
+ "model_id": "eb012055296f4d0fa03b6ede4160f2f9",
569
  "version_major": 2,
570
  "version_minor": 0
571
  },
572
  "text/plain": [
573
+ " 0%| | 0/24 [00:00<?, ?it/s]"
574
  ]
575
  },
576
  "metadata": {},
 
579
  {
580
  "data": {
581
  "application/vnd.jupyter.widget-view+json": {
582
+ "model_id": "cb486b58cb0a43b9a5dca19d78617e8f",
583
  "version_major": 2,
584
  "version_minor": 0
585
  },
586
  "text/plain": [
587
+ " 0%| | 0/24 [00:00<?, ?it/s]"
588
  ]
589
  },
590
  "metadata": {},
 
593
  {
594
  "data": {
595
  "application/vnd.jupyter.widget-view+json": {
596
+ "model_id": "afd120fad0a54479afd403350e1c47f1",
597
  "version_major": 2,
598
  "version_minor": 0
599
  },
600
  "text/plain": [
601
+ " 0%| | 0/24 [00:00<?, ?it/s]"
602
  ]
603
  },
604
  "metadata": {},
 
607
  {
608
  "data": {
609
  "application/vnd.jupyter.widget-view+json": {
610
+ "model_id": "6878fbbd5d36411caa80f23124a070fa",
611
  "version_major": 2,
612
  "version_minor": 0
613
  },
614
  "text/plain": [
615
+ " 0%| | 0/24 [00:00<?, ?it/s]"
616
  ]
617
  },
618
  "metadata": {},
 
621
  {
622
  "data": {
623
  "application/vnd.jupyter.widget-view+json": {
624
+ "model_id": "8fcfc88ca22c4c7cbb6e847bd8c1a226",
625
  "version_major": 2,
626
  "version_minor": 0
627
  },
628
  "text/plain": [
629
+ " 0%| | 0/24 [00:00<?, ?it/s]"
630
  ]
631
  },
632
  "metadata": {},
 
635
  {
636
  "data": {
637
  "application/vnd.jupyter.widget-view+json": {
638
+ "model_id": "71906ea928b0444888e43d8e1b6b1784",
639
  "version_major": 2,
640
  "version_minor": 0
641
  },
642
  "text/plain": [
643
+ " 0%| | 0/24 [00:00<?, ?it/s]"
644
  ]
645
  },
646
  "metadata": {},
 
649
  {
650
  "data": {
651
  "application/vnd.jupyter.widget-view+json": {
652
+ "model_id": "0d8745fe8157402db413d318a2e50867",
653
  "version_major": 2,
654
  "version_minor": 0
655
  },
656
  "text/plain": [
657
+ " 0%| | 0/24 [00:00<?, ?it/s]"
658
  ]
659
  },
660
  "metadata": {},
 
663
  {
664
  "data": {
665
  "application/vnd.jupyter.widget-view+json": {
666
+ "model_id": "5adde60a2f974c4785a5e1e14c0b0214",
667
  "version_major": 2,
668
  "version_minor": 0
669
  },
670
  "text/plain": [
671
+ " 0%| | 0/24 [00:00<?, ?it/s]"
672
  ]
673
  },
674
  "metadata": {},
 
677
  {
678
  "data": {
679
  "application/vnd.jupyter.widget-view+json": {
680
+ "model_id": "cda697db8ae2422bb27bc4e39edd893d",
681
  "version_major": 2,
682
  "version_minor": 0
683
  },
684
  "text/plain": [
685
+ " 0%| | 0/24 [00:00<?, ?it/s]"
686
  ]
687
  },
688
  "metadata": {},
 
698
  },
699
  {
700
  "cell_type": "code",
701
+ "execution_count": null,
702
  "metadata": {},
703
  "outputs": [
704
  {