Xsmos commited on
Commit
2afd57d
·
verified ·
1 Parent(s): 214e125
Files changed (2) hide show
  1. diffusion.ipynb +104 -0
  2. load_h5.py +1 -1
diffusion.ipynb CHANGED
@@ -3220,6 +3220,110 @@
3220
  },
3221
  "metadata": {},
3222
  "output_type": "display_data"
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
3223
  }
3224
  ],
3225
  "source": [
 
3220
  },
3221
  "metadata": {},
3222
  "output_type": "display_data"
3223
+ },
3224
+ {
3225
+ "name": "stdout",
3226
+ "output_type": "stream",
3227
+ "text": [
3228
+ "saved model at ./outputs/model_state.pth\n",
3229
+ "resumed nn_model from ./outputs/model_state.pth\n",
3230
+ "Number of parameters for nn_model: 111048705\n",
3231
+ "resumed ema_model from ./outputs/model_state.pth\n",
3232
+ "run_name = 0523-2301\n",
3233
+ "Launching training on one GPU.\n",
3234
+ "dataset content: <KeysViewHDF5 ['brightness_temp', 'density', 'kwargs', 'params', 'redshifts_distances', 'seeds', 'xH_box']>\n",
3235
+ "51200 images can be loaded\n",
3236
+ "field.shape = (64, 64, 514)\n",
3237
+ "params keys = [b'ION_Tvir_MIN', b'HII_EFF_FACTOR']\n",
3238
+ "loading 2560 images randomly\n",
3239
+ "images loaded: (2560, 1, 64, 512)\n",
3240
+ "params loaded: (2560, 2)\n"
3241
+ ]
3242
+ },
3243
+ {
3244
+ "name": "stderr",
3245
+ "output_type": "stream",
3246
+ "text": [
3247
+ "Detected kernel version 3.10.0, which is below the recommended minimum of 5.5.0; this can cause the process to hang. It is recommended to upgrade the kernel to the minimum version or higher.\n"
3248
+ ]
3249
+ },
3250
+ {
3251
+ "name": "stdout",
3252
+ "output_type": "stream",
3253
+ "text": [
3254
+ "images rescaled to [-1.0, 1.213691234588623]\n",
3255
+ "params rescaled to [0.0, 0.9998792950082773]\n"
3256
+ ]
3257
+ },
3258
+ {
3259
+ "data": {
3260
+ "application/vnd.jupyter.widget-view+json": {
3261
+ "model_id": "023579a6f4f74ebbaed5cf33ff27d094",
3262
+ "version_major": 2,
3263
+ "version_minor": 0
3264
+ },
3265
+ "text/plain": [
3266
+ " 0%| | 0/256 [00:00<?, ?it/s]"
3267
+ ]
3268
+ },
3269
+ "metadata": {},
3270
+ "output_type": "display_data"
3271
+ },
3272
+ {
3273
+ "data": {
3274
+ "application/vnd.jupyter.widget-view+json": {
3275
+ "model_id": "e0ddfcf0ce474d099de91dfdfffd651a",
3276
+ "version_major": 2,
3277
+ "version_minor": 0
3278
+ },
3279
+ "text/plain": [
3280
+ " 0%| | 0/256 [00:00<?, ?it/s]"
3281
+ ]
3282
+ },
3283
+ "metadata": {},
3284
+ "output_type": "display_data"
3285
+ },
3286
+ {
3287
+ "data": {
3288
+ "application/vnd.jupyter.widget-view+json": {
3289
+ "model_id": "287152cedc3b404ca667c3cdc41e08f7",
3290
+ "version_major": 2,
3291
+ "version_minor": 0
3292
+ },
3293
+ "text/plain": [
3294
+ " 0%| | 0/256 [00:00<?, ?it/s]"
3295
+ ]
3296
+ },
3297
+ "metadata": {},
3298
+ "output_type": "display_data"
3299
+ },
3300
+ {
3301
+ "data": {
3302
+ "application/vnd.jupyter.widget-view+json": {
3303
+ "model_id": "b43df55a7cd046619ef129fc547d673d",
3304
+ "version_major": 2,
3305
+ "version_minor": 0
3306
+ },
3307
+ "text/plain": [
3308
+ " 0%| | 0/256 [00:00<?, ?it/s]"
3309
+ ]
3310
+ },
3311
+ "metadata": {},
3312
+ "output_type": "display_data"
3313
+ },
3314
+ {
3315
+ "data": {
3316
+ "application/vnd.jupyter.widget-view+json": {
3317
+ "model_id": "de72c5d01a6d4b7f88aeec5748f78cbb",
3318
+ "version_major": 2,
3319
+ "version_minor": 0
3320
+ },
3321
+ "text/plain": [
3322
+ " 0%| | 0/256 [00:00<?, ?it/s]"
3323
+ ]
3324
+ },
3325
+ "metadata": {},
3326
+ "output_type": "display_data"
3327
  }
3328
  ],
3329
  "source": [
load_h5.py CHANGED
@@ -26,7 +26,7 @@ import datetime
26
  # from huggingface_hub import create_repo, upload_folder
27
 
28
  class Dataset4h5(Dataset):
29
- def __init__(self, dir_name, num_image=10, field='brightness_temp', shuffle=True, idx=None, num_redshift=32, HII_DIM=32, rescale=True, drop_prob = 0, dim=2, transform=True,):
30
  super().__init__()
31
 
32
  self.dir_name = dir_name
 
26
  # from huggingface_hub import create_repo, upload_folder
27
 
28
  class Dataset4h5(Dataset):
29
+ def __init__(self, dir_name, num_image=10, field='brightness_temp', shuffle=True, idx=None, num_redshift=512, HII_DIM=64, rescale=True, drop_prob = 0, dim=2, transform=True,):
30
  super().__init__()
31
 
32
  self.dir_name = dir_name