{"metadata":{"kernelspec":{"language":"python","display_name":"Python 3","name":"python3"},"language_info":{"name":"python","version":"3.10.16","mimetype":"text/x-python","codemirror_mode":{"name":"ipython","version":3},"pygments_lexer":"ipython3","nbconvert_exporter":"python","file_extension":".py"},"kaggle":{"accelerator":"none","dataSources":[],"dockerImageVersionId":31011,"isInternetEnabled":true,"language":"python","sourceType":"notebook","isGpuEnabled":false}},"nbformat_minor":4,"nbformat":4,"cells":[{"cell_type":"code","source":"pip install tensorflow==2.19.0\n","metadata":{"trusted":true},"outputs":[],"execution_count":null},{"cell_type":"code","source":"# Import zaroori libraries\nimport numpy as np\nimport tensorflow as tf\nfrom tensorflow.keras import layers, models\nfrom sklearn.model_selection import train_test_split\nimport matplotlib.pyplot as plt\nimport os\nimport pandas as pd\nfrom sklearn.metrics import mean_absolute_error # Use scikit-learn's directly for final eval\nimport json\n\n# Step 1: Dataset Path Setup (KOI BADLAV NAHI)\nbase_dir = '/kaggle/input/waveform-inversion/train_samples/'\ntest_dir = '/kaggle/input/yale-unc-ch-geophysical-waveform-inversion/test/'\nfolders = [\n    'CurveFault_A', 'CurveFault_B', 'CurveVel_A', 'CurveVel_B',\n    'FlatFault_A', 'FlatFault_B', 'FlatVel_A', 'FlatVel_B', 'Style_A','Style_B'\n]\n\nseismic_files = []\nvelocity_files = []\nfor folder in folders:\n    # ... (Aapka file loading logic theek lag raha hai, agar competition data hi use karna hai)\n    # AGAR OPENFWI KA PURA DATASET USE KARNA HAI TOH YEH LOGIC BADLEGA\n    if folder in ['CurveVel_A', 'CurveVel_B', 'FlatVel_B', 'Style_A', 'FlatVel_A','Style_B']: # FlatVel_A added\n        data_path = os.path.join(base_dir, folder, 'data')\n        model_path = os.path.join(base_dir, folder, 'model')\n        if os.path.exists(data_path) and os.path.isdir(data_path): # Check if directory\n            seismic_files.extend([os.path.join(data_path, f) for f in os.listdir(data_path) if f.endswith('.npy')])\n        if os.path.exists(model_path) and os.path.isdir(model_path): # Check if directory\n            velocity_files.extend([os.path.join(model_path, f) for f in os.listdir(model_path) if f.endswith('.npy')])\n    elif folder in ['CurveFault_A', 'CurveFault_B', 'FlatFault_A', 'FlatFault_B']: # Fault families\n        folder_path = os.path.join(base_dir, folder)\n        if os.path.exists(folder_path) and os.path.isdir(folder_path):\n            all_folder_files = [os.path.join(folder_path, f) for f in os.listdir(folder_path) if f.endswith('.npy')]\n            seismic_files.extend([f for f in all_folder_files if 'seis_' in os.path.basename(f)])\n            velocity_files.extend([f for f in all_folder_files if 'vel_' in os.path.basename(f)])\n\n\n\nall_curve_fault = '/kaggle/input/all-curve-fault/' #1\nall_curve_fault_1 = '/kaggle/input/all-curve-fault-1/' #2\nall_flat_fault = '/kaggle/input/all-flatfault/' #3\nall_flat_fault_1 = '/kaggle/input/all-flatfault-1/' #4\nnew_curveVel_A = '/kaggle/input/new-curvevel-a/' #5\nnew_curveVel_B = '/kaggle/input/new-curvevel-b/' #6\nstyle_A = '/kaggle/input/style-a/' #7\nnew_flatVel_A = '/kaggle/input/flat-vel-c/' #8\nnew_flatVel_B = '/kaggle/input/flat-vel-b/' #9\n\nnew_folders = ['seis_curveFault_A', 'seis_curveFault_B', 'vel_curveFault_A',\n               'vel_curveFault_B']\n# count = 0\nfor new_folder in new_folders :\n    if new_folder in ['vel_curveFault_A','vel_curveFault_B'] :\n        new_dataPath = os.path.join(all_curve_fault,new_folder,new_folder)\n        if os.path.exists(new_dataPath) :\n             all_folder_files = [os.path.join(new_dataPath, f) for f in os.listdir(new_dataPath) if f.endswith('.npy')]\n             velocity_files.extend([f for f in all_folder_files])\n             # count += 1\n\n    else :\n         new_dataPath = os.path.join(all_curve_fault,new_folder,new_folder)\n         if os.path.exists(new_dataPath) :\n             all_folder_files = [os.path.join(new_dataPath, f) for f in os.listdir(new_dataPath) if f.endswith('.npy')]\n             seismic_files.extend([f for f in all_folder_files])\n             # count += 1\n# # print(count)\n# # count = 0\nnew_folders_1 = ['seis_curveFault_A', 'seis_curveFault_B', 'vel_curveFault_A',\n               'vel_curveFault_B']\n\nfor new_folder in new_folders_1 :\n    if new_folder in ['vel_curveFault_A','vel_curveFault_B'] :\n        new_dataPath = os.path.join(all_curve_fault_1,new_folder)\n        if os.path.exists(new_dataPath) :\n             all_folder_files = [os.path.join(new_dataPath, f) for f in os.listdir(new_dataPath) if f.endswith('.npy')]\n             velocity_files.extend([f for f in all_folder_files])\n             # count =\n\n    else :\n         new_dataPath = os.path.join(all_curve_fault_1,new_folder)\n         if os.path.exists(new_dataPath) :\n             all_folder_files = [os.path.join(new_dataPath, f) for f in os.listdir(new_dataPath) if f.endswith('.npy')]\n             seismic_files.extend([f for f in all_folder_files])\n\nnew_folders_2 = ['seis_flatFault_A', 'seis_flatFault_B', 'vel_flatFault_A',\n               'vel_flatFault_B']\n\nfor new_folder in new_folders_2 :\n    if new_folder in ['vel_flatFault_A','vel_flatFault_B'] :\n        new_dataPath = os.path.join(all_flat_fault,new_folder)\n        if os.path.exists(new_dataPath) :\n             all_folder_files = [os.path.join(new_dataPath, f) for f in os.listdir(new_dataPath) if f.endswith('.npy')]\n             velocity_files.extend([f for f in all_folder_files])\n\n    else :\n         new_dataPath = os.path.join(all_flat_fault,new_folder)\n         if os.path.exists(new_dataPath) :\n             all_folder_files = [os.path.join(new_dataPath, f) for f in os.listdir(new_dataPath) if f.endswith('.npy')]\n             seismic_files.extend([f for f in all_folder_files])\n\nnew_folders_3 = ['seis_flatFault_A', 'seis_flatFault_B', 'vel_flatFault_A',\n               'vel_flatFault_B']\n\nfor new_folder in new_folders_3 :\n    if new_folder in ['vel_flatFault_A','vel_flatFault_B'] :\n        new_dataPath = os.path.join(all_flat_fault_1,new_folder)\n        if os.path.exists(new_dataPath) :\n             all_folder_files = [os.path.join(new_dataPath, f) for f in os.listdir(new_dataPath) if f.endswith('.npy')]\n             velocity_files.extend([f for f in all_folder_files])\n\n    else :\n         new_dataPath = os.path.join(all_flat_fault,new_folder)\n         if os.path.exists(new_dataPath) :\n             all_folder_files = [os.path.join(new_dataPath, f) for f in os.listdir(new_dataPath) if f.endswith('.npy')]\n             seismic_files.extend([f for f in all_folder_files])\n\n\npath_curveVel_A = new_curveVel_A\npath_curveVel_B = new_curveVel_B\n\ndata_path_1 = os.path.join(path_curveVel_A, 'drive-download-20250518T115027Z-1-001')\nmodel_path_1 = os.path.join(path_curveVel_A, 'drive-download-20250518T115336Z-1-001')\n\nseismic_files.extend([os.path.join(data_path_1, f) for f in os.listdir(data_path_1) if f.endswith('.npy')])\nvelocity_files.extend([os.path.join(model_path_1, f) for f in os.listdir(model_path_1) if f.endswith('.npy')])\n\ndata_path_2 = os.path.join(path_curveVel_B, 'drive-download-20250519T060118Z-1-001')\nmodel_path_2 = os.path.join(path_curveVel_B, 'drive-download-20250519T060942Z-1-001')\n\nseismic_files.extend([os.path.join(data_path_2, f) for f in os.listdir(data_path_2) if f.endswith('.npy')])\nvelocity_files.extend([os.path.join(model_path_2, f) for f in os.listdir(model_path_2) if f.endswith('.npy')])\n\npath_flatVel_A = new_flatVel_A\npath_flatVel_B = new_flatVel_B\n\ndata_path_1 = os.path.join(path_flatVel_A, 'drive-download-20250519T071928Z-1-001')\nmodel_path_1 = os.path.join(path_flatVel_A, 'drive-download-20250519T072541Z-1-001')\n\nseismic_files.extend([os.path.join(data_path_1, f) for f in os.listdir(data_path_1) if f.endswith('.npy')])\nvelocity_files.extend([os.path.join(model_path_1, f) for f in os.listdir(model_path_1) if f.endswith('.npy')])\n\ndata_path_2 = os.path.join(path_flatVel_B, 'drive-download-20250519T071928Z-1-001')\nmodel_path_2 = os.path.join(path_flatVel_B, 'drive-download-20250519T072541Z-1-001')\n\nseismic_files.extend([os.path.join(data_path_2, f) for f in os.listdir(data_path_2) if f.endswith('.npy')])\nvelocity_files.extend([os.path.join(model_path_2, f) for f in os.listdir(model_path_2) if f.endswith('.npy')])\n\nnew_flatVel_B = '/kaggle/input/style-a/'\n\npath_flatVel_A = new_flatVel_B\n\ndata_path_1 = os.path.join(path_flatVel_A, 'drive-download-20250519T073522Z-1-001')\nmodel_path_1 = os.path.join(path_flatVel_A, 'drive-download-20250519T074038Z-1-001')\n\nseismic_files.extend([os.path.join(data_path_1, f) for f in os.listdir(data_path_1) if f.endswith('.npy')])\nvelocity_files.extend([os.path.join(model_path_1, f) for f in os.listdir(model_path_1) if f.endswith('.npy')])\n\nseismic_files.sort()\nvelocity_files.sort()\n\nprint(f\"Found {len(seismic_files)} seismic files and {len(velocity_files)} velocity files.\")\nif not seismic_files or not velocity_files:\n    raise ValueError(\"No data files found. Check paths and folder structure.\")\nif len(seismic_files) != len(velocity_files):\n    print(\"Warning: Mismatch in number of seismic and velocity files. Check pairing logic.\")\n    # Implement more robust pairing if needed\n\n\n# Step 2: Data Load Karna\nall_seismic_raw = []\nall_velocity_raw = []\n\n# Limit number of files to load for faster iteration/debugging if needed\n# MAX_FILES_TO_LOAD = 10 # Example: load only first 10 pairs\n# for s_file, v_file in zip(seismic_files[:MAX_FILES_TO_LOAD], velocity_files[:MAX_FILES_TO_LOAD]):\n\nfor s_file, v_file in zip(seismic_files, velocity_files):\n    try:\n        seismic = np.load(s_file)\n        velocity = np.load(v_file)\n        # Assuming velocity shape is (batch, H, W) or (batch, 1, H, W)\n        # Problem description: Velocity maps are 3D arrays (batch_size, height, width)\n        # So, (500, 70, 70)\n        if velocity.ndim == 4 and velocity.shape[1] == 1: # (batch, 1, H, W)\n             all_velocity_raw.append(velocity.squeeze(axis=1))\n        elif velocity.ndim == 3: # (batch, H, W)\n             all_velocity_raw.append(velocity)\n        else:\n            print(f\"Unexpected velocity shape {velocity.shape} in file {v_file}\")\n            continue\n\n        # Seismic data: 4D arrays (batch_size, num_sources, time_steps, num_receivers)\n        # (500, 5, 1000, 70)\n        # We want to change it to (batch_size, time_steps, num_receivers, num_sources) for Conv2D\n#         # So, (500, 1000, 70, 5)\n        if seismic.ndim == 4:\n            seismic_permuted = np.transpose(seismic, (0, 2, 3, 1)) # from (N,S,T,R) to (N,T,R,S)\n            all_seismic_raw.append(seismic_permuted)\n        else:\n            print(f\"Unexpected seismic shape {seismic.shape} in file {s_file}\")\n            # Make sure corresponding velocity is also skipped\n            if velocity.ndim == 4 and velocity.shape[1] == 1: all_velocity_raw.pop()\n            elif velocity.ndim == 3: all_velocity_raw.pop()\n            continue\n\n    except Exception as e:\n        print(f\"Error loading file {s_file} or {v_file}: {e}\")\n        # If one file fails, ensure the pair is not added or the already added one is removed\n        # This depends on when the error occurs. For simplicity, we might lose a pair.\n\nif not all_seismic_raw or not all_velocity_raw:\n    raise ValueError(\"Failed to load any valid data. Check file integrity and loading logic.\")\n\nall_seismic_raw = np.concatenate(all_seismic_raw, axis=0)\nall_velocity_raw = np.concatenate(all_velocity_raw, axis=0)\n\nprint(\"Raw All Seismic Shape:\", all_seismic_raw.shape) # Should be (Total_Samples, 1000, 70, 5)\nprint(\"Raw All Velocity Shape:\", all_velocity_raw.shape) # Should be (Total_Samples, 70, 70)\n\n# Step 3: Data Augmentation (Kam noise) - Optional, can be done on-the-fly in tf.data pipeline\ndef augment_data(seismic):\n    noise_level = 0.001 # Reduced noise level slightly\n    noise = np.random.normal(0, noise_level, seismic.shape)\n    return seismic + noise\n\n# Augmentation applied after splitting is generally better, or on-the-fly\n# For now, let's keep it here but consider moving it.\n# all_seismic_augmented = augment_data(all_seismic_raw.copy()) # Augment a copy\n\n# Step 4: Data Preprocessing (Normalization)\n# SAVE MIN/MAX FOR DENORMALIZATION\nvelocity_min = np.min(all_velocity_raw)\nvelocity_max = np.max(all_velocity_raw)\n# Avoid division by zero if all values are the same\nif velocity_max == velocity_min:\n    velocity_max = velocity_min + 1e-6 # Add a small epsilon\n\nprint(f\"Velocity original min: {velocity_min}, max: {velocity_max}\")\n\ndef normalize_velocity(data, v_min, v_max):\n    return (data - v_min) / (v_max - v_min)\n\ndef denormalize_velocity(data, v_min, v_max):\n    return data * (v_max - v_min) + v_min\n\n# Normalize seismic data per sample or globally? Global for now.\nseismic_min = np.min(all_seismic_raw)\nseismic_max = np.max(all_seismic_raw)\nif seismic_max == seismic_min:\n    seismic_max = seismic_min + 1e-6\n\ndef normalize_seismic(data, s_min, s_max):\n    return (data - s_min) / (s_max - s_min)\n\nall_seismic_normalized = normalize_seismic(all_seismic_raw, seismic_min, seismic_max)\nall_velocity_normalized = normalize_velocity(all_velocity_raw, velocity_min, velocity_max)\n\n\n# Step 5: Train-Validation Split\n# We split the RAW seismic data (if augmenting on-the-fly) or augmented, and NORMALIZED velocity\n# Important: Split before augmenting if augmentation is heavy, to keep validation set clean.\n# Here, light augmentation is done before split, which is acceptable.\n# Let's split the normalized data.\ntrain_seismic, val_seismic, train_velocity_normalized, val_velocity_normalized = train_test_split(\n    all_seismic_normalized, all_velocity_normalized, test_size=0.2, random_state=42\n)\n# Also keep a split of raw velocities for MAE calculation in original scale\n_, _, train_velocity_raw, val_velocity_raw = train_test_split(\n    all_seismic_normalized, all_velocity_raw, test_size=0.2, random_state=42 # Use same random_state\n)\n\n\n# Step 6: TensorFlow Dataset\ndef create_dataset(seismic_data, velocity_data, batch_size=64): # Reduced batch size slightly\n    dataset = tf.data.Dataset.from_tensor_slices((\n        tf.cast(seismic_data, tf.float32),\n        tf.cast(velocity_data, tf.float32)\n    ))\n    # Add augmentation here if desired (map function)\n    dataset = dataset.cache() # Cache after initial loading and preprocessing\n    dataset = dataset.shuffle(buffer_size=1000)\n    dataset = dataset.batch(batch_size)\n    dataset = dataset.prefetch(tf.data.AUTOTUNE)\n    return dataset\n\ntrain_dataset = create_dataset(train_seismic, train_velocity_normalized)\nval_dataset = create_dataset(val_seismic, val_velocity_normalized)\n\n# Step 7: U-Net Model (Revised)\n# Step 7: U-Net Model (Revised with Cropping)\ndef build_unet(input_shape=(1000, 70, 5), output_channels=1):\n    inputs = layers.Input(shape=input_shape)\n\n    # Encoder\n    # c1, p1\n    c1 = layers.Conv2D(32, (3, 3), activation='relu', kernel_initializer='he_normal', padding='same')(inputs)\n    c1 = layers.Dropout(0.1)(c1)\n    c1 = layers.Conv2D(32, (3, 3), activation='relu', kernel_initializer='he_normal', padding='same')(c1)\n    p1 = layers.MaxPooling2D((2, 2), padding='same')(c1) # Shape: (H/2, W/2) e.g., (500, 35)\n\n    # c2, p2\n    c2 = layers.Conv2D(64, (3, 3), activation='relu', kernel_initializer='he_normal', padding='same')(p1)\n    c2 = layers.Dropout(0.1)(c2)\n    c2 = layers.Conv2D(64, (3, 3), activation='relu', kernel_initializer='he_normal', padding='same')(c2)\n    p2 = layers.MaxPooling2D((2, 2), padding='same')(c2) # Shape: (250, 18) -- ceil(35/2)=18\n\n    # c3, p3\n    c3 = layers.Conv2D(128, (3, 3), activation='relu', kernel_initializer='he_normal', padding='same')(p2)\n    c3 = layers.Dropout(0.2)(c3)\n    c3 = layers.Conv2D(128, (3, 3), activation='relu', kernel_initializer='he_normal', padding='same')(c3)\n    p3 = layers.MaxPooling2D((2, 2), padding='same')(c3) # Shape: (125, 9)\n\n    # c4, p4\n    c4 = layers.Conv2D(256, (3, 3), activation='relu', kernel_initializer='he_normal', padding='same')(p3)\n    c4 = layers.Dropout(0.2)(c4)\n    c4 = layers.Conv2D(256, (3, 3), activation='relu', kernel_initializer='he_normal', padding='same')(c4)\n    p4 = layers.MaxPooling2D((2, 2), padding='same')(c4) # Shape: (63, 5) -- ceil(125/2)=63, ceil(9/2)=5\n\n    # Bottleneck\n    bn = layers.Conv2D(512, (3, 3), activation='relu', kernel_initializer='he_normal', padding='same')(p4)\n    bn = layers.Dropout(0.3)(bn)\n    bn = layers.Conv2D(512, (3, 3), activation='relu', kernel_initializer='he_normal', padding='same')(bn)\n    # bn shape: (63, 5)\n\n    # Decoder\n    # Upsample bn and concatenate with c4\n    u4_transposed = layers.Conv2DTranspose(256, (2, 2), strides=(2, 2), padding='same')(bn) # Shape: (63*2, 5*2) = (126, 10)\n    # c4 shape is (125, 9). u4_transposed needs cropping.\n    # Crop (1 from height, 1 from width). Typically crop from bottom/right.\n    # Cropping: ((top_crop, bottom_crop), (left_crop, right_crop))\n    u4_cropped = layers.Cropping2D(cropping=((0, 1), (0, 1)))(u4_transposed) # (126-1, 10-1) = (125,9)\n    u4_concat = layers.concatenate([u4_cropped, c4])\n    u4_convs = layers.Conv2D(256, (3, 3), activation='relu', kernel_initializer='he_normal', padding='same')(u4_concat)\n    u4_convs = layers.Dropout(0.2)(u4_convs)\n    u4_convs = layers.Conv2D(256, (3, 3), activation='relu', kernel_initializer='he_normal', padding='same')(u4_convs)\n    # u4_convs shape: (125, 9)\n\n    # Upsample u4_convs and concatenate with c3\n    u3_transposed = layers.Conv2DTranspose(128, (2, 2), strides=(2, 2), padding='same')(u4_convs) # Shape: (125*2, 9*2) = (250, 18)\n    # c3 shape is (250, 18). Shapes match. No cropping needed.\n    u3_concat = layers.concatenate([u3_transposed, c3])\n    u3_convs = layers.Conv2D(128, (3, 3), activation='relu', kernel_initializer='he_normal', padding='same')(u3_concat)\n    u3_convs = layers.Dropout(0.2)(u3_convs)\n    u3_convs = layers.Conv2D(128, (3, 3), activation='relu', kernel_initializer='he_normal', padding='same')(u3_convs)\n    # u3_convs shape: (250, 18)\n\n    # Upsample u3_convs and concatenate with c2\n    u2_transposed = layers.Conv2DTranspose(64, (2, 2), strides=(2, 2), padding='same')(u3_convs) # Shape: (250*2, 18*2) = (500, 36)\n    # c2 shape is (500, 35). u2_transposed needs cropping.\n    # Crop (0 from height, 1 from width).\n    u2_cropped = layers.Cropping2D(cropping=((0, 0), (0, 1)))(u2_transposed) # (500, 36-1) = (500,35)\n    u2_concat = layers.concatenate([u2_cropped, c2])\n    u2_convs = layers.Conv2D(64, (3, 3), activation='relu', kernel_initializer='he_normal', padding='same')(u2_concat)\n    u2_convs = layers.Dropout(0.1)(u2_convs)\n    u2_convs = layers.Conv2D(64, (3, 3), activation='relu', kernel_initializer='he_normal', padding='same')(u2_convs)\n    # u2_convs shape: (500, 35)\n\n    # Upsample u2_convs and concatenate with c1\n    u1_transposed = layers.Conv2DTranspose(32, (2, 2), strides=(2, 2), padding='same')(u2_convs) # Shape: (500*2, 35*2) = (1000, 70)\n    # c1 shape is (1000, 70). Shapes match. No cropping needed.\n    u1_concat = layers.concatenate([u1_transposed, c1])\n    u1_convs = layers.Conv2D(32, (3, 3), activation='relu', kernel_initializer='he_normal', padding='same')(u1_concat)\n    u1_convs = layers.Dropout(0.1)(u1_convs)\n    u1_convs = layers.Conv2D(32, (3, 3), activation='relu', kernel_initializer='he_normal', padding='same')(u1_convs)\n    # u1_convs shape: (1000, 70)\n\n    # Output layer\n    output_conv = layers.Conv2D(output_channels, (1, 1), activation='linear', padding='same')(u1_convs)\n    output_resized = layers.Resizing(70, 70, interpolation='bilinear')(output_conv)\n    final_output = layers.Reshape((70, 70))(output_resized)\n\n    model = models.Model(inputs=[inputs], outputs=[final_output])\n    return model\n\n# Step 8: Physics Loss (Dynamic Weight)\ndef wave_equation_loss_laplacian(y_true_norm, y_pred_norm): # Renamed, takes normalized inputs\n    # This loss acts as a regularizer on the *normalized* prediction\n    # No need for y_true here, it's a property of y_pred\n    # Sobel edges expect image rank 4 (batch, H, W, C)\n    y_pred_norm_rank4 = y_pred_norm[..., tf.newaxis]\n    sobel_edges = tf.image.sobel_edges(y_pred_norm_rank4) # Output shape (batch, H, W, C, 2)\n    # dx = sobel_edges[..., 0, 0]  # Sobel_x for channel 0\n    # dy = sobel_edges[..., 0, 1]  # Sobel_y for channel 0\n    # laplacian = tf.reduce_mean(dx**2 + dy**2) # This is more like gradient magnitude squared\n\n    # True Laplacian using finite differences on y_pred_norm (rank 3: B, H, W)\n    # Or simpler: tf.nn.convolution for laplacian kernel\n    laplacian_filter = tf.constant([[[[0, 1, 0], [1, -4, 1], [0, 1, 0]]]], dtype=tf.float32) # H, W, Cin, Cout\n    laplacian_filter = tf.transpose(laplacian_filter, (1,2,0,3)) # Correct shape for conv2d depthwise_filter (H, W, C_in, C_mult)\n                                                                # For Conv2D, it should be (filter_H, filter_W, C_in, C_out)\n\n    # For a single channel output prediction y_pred_norm_rank4 (B, H, W, 1)\n    laplacian_kernel = tf.constant([[0, 1, 0], [1, -4, 1], [0, 1, 0]], dtype=tf.float32)\n    laplacian_kernel = laplacian_kernel[:, :, tf.newaxis, tf.newaxis] # (3, 3, 1, 1)\n\n    # Apply convolution\n    laplacian_of_pred = tf.nn.conv2d(y_pred_norm_rank4, laplacian_kernel, strides=[1, 1, 1, 1], padding='SAME')\n    return tf.reduce_mean(tf.square(laplacian_of_pred))\n\n\n# ... (CustomLoss class from previous code) ...\n\nclass CustomLoss:\n    def __init__(self, initial_physics_weight=0.1, v_min=0.0, v_max=1.0, physics_loss_type='laplacian'):\n        self.physics_weight = tf.Variable(initial_physics_weight, trainable=False, dtype=tf.float32)\n        self.v_min = tf.constant(v_min, dtype=tf.float32)\n        self.v_max = tf.constant(v_max, dtype=tf.float32)\n        self.physics_loss_type = physics_loss_type\n\n    def set_physics_weight(self, weight):\n        self.physics_weight.assign(weight)\n\n    def _laplacian_loss(self, y_pred_norm):\n        # y_pred_norm is (batch, H, W)\n        y_pred_norm_rank4 = y_pred_norm[..., tf.newaxis] # (batch, H, W, 1)\n\n        # Using tf.image.sobel_edges as a proxy for gradient magnitude (simpler than full Laplacian for now)\n        # Or stick to the Conv2D based Laplacian\n        gy, gx = tf.image.image_gradients(y_pred_norm_rank4) # Two tensors of shape (B,H,W,1)\n        # This calculates Sobel gradients. Sum of squares of gradients.\n        gradient_magnitude_sq = tf.square(gx) + tf.square(gy)\n        return tf.reduce_mean(gradient_magnitude_sq) # This is more like a TV (Total Variation) regularizer on gradients\n\n        # OR, your previous Laplacian\n        # laplacian_kernel = tf.constant([[0, 1, 0], [1, -4, 1], [0, 1, 0]], dtype=tf.float32)\n        # laplacian_kernel = laplacian_kernel[:, :, tf.newaxis, tf.newaxis]\n        # laplacian_of_pred = tf.nn.conv2d(y_pred_norm_rank4, laplacian_kernel, strides=[1, 1, 1, 1], padding='SAME')\n        # return tf.reduce_mean(tf.square(laplacian_of_pred))\n\n\n    def _gradient_penalty_loss(self, y_pred_norm):\n        y_pred_norm_rank4 = y_pred_norm[..., tf.newaxis]\n        # Calculate gradients (Sobel)\n        dy, dx = tf.image.image_gradients(y_pred_norm_rank4) # dx, dy are (batch, H, W, 1)\n        # Penalize sum of squared gradients\n        # This is similar to laplacian_loss if it was just sum of squared gradients\n        # A common TV (Total Variation) loss is sum of absolute gradients\n        # return tf.reduce_mean(tf.abs(dx) + tf.abs(dy)) # L1 norm of gradients (Total Variation)\n        return tf.reduce_mean(tf.square(dx) + tf.square(dy)) # L2 norm of gradients\n\n\n    def __call__(self, y_true_norm, y_pred_norm):\n        mae_loss_norm = tf.reduce_mean(tf.abs(y_true_norm - y_pred_norm))\n\n        physics_term = 0.0\n        if self.physics_loss_type == 'laplacian':\n            physics_term = self._laplacian_loss(y_pred_norm)\n        elif self.physics_loss_type == 'gradient':\n            physics_term = self._gradient_penalty_loss(y_pred_norm)\n\n        total_loss = (1.0 - self.physics_weight) * mae_loss_norm + self.physics_weight * physics_term\n        return total_loss\n\n\n# Jab aap CustomLoss initialize karein:\n# custom_loss_fn = CustomLoss(initial_physics_weight=0.2, # Thoda weight badha sakte hain\n#                             v_min=velocity_min, v_max=velocity_max,\n#                             physics_loss_type='gradient') # 'laplacian' ya 'gradient' try karein\n\n# Step 9: Evaluation Metrics - IMPORTANT: MAE on ORIGINAL SCALE\n# Keras metrics operate on y_true, y_pred passed from model.fit (normalized)\n# We need a custom callback to calculate MAE on original scale for validation.\n\n# Custom MAE metric for training (on normalized data, matches loss MAE term)\nclass NormalizedMAE(tf.keras.metrics.MeanAbsoluteError):\n    def __init__(self, name='normalized_mae', **kwargs):\n        super().__init__(name=name, **kwargs)\n\n# Step 10: Checkpointing Setup (KOI BADLAV NAHI)\ncheckpoint_dir = '/kaggle/working/checkpoints/'\nos.makedirs(checkpoint_dir, exist_ok=True)\ncheckpoint_path = os.path.join(checkpoint_dir, 'checkpoint.weights.h5') # Changed to .weights.h5\ntraining_state_path = os.path.join(checkpoint_dir, 'training_state.json')\n\nstart_epoch = 0\nif os.path.exists(training_state_path):\n    with open(training_state_path, 'r') as f:\n        training_state = json.load(f)\n    start_epoch = training_state.get('epoch', 0) # Use .get for safety\n    print(f\"Resuming training from epoch {start_epoch + 1}\")\nelse:\n    print(\"Starting training from scratch\")\n\n# Step 11: Model aur Optimizer\ninput_actual_shape = train_seismic.shape[1:] # (1000, 70, 5)\nmodel = build_unet(input_shape=input_actual_shape)\nmodel.summary()\n\n# Pass velocity_min, velocity_max to CustomLoss\ncustom_loss_fn = CustomLoss(initial_physics_weight=0.1, v_min=velocity_min, v_max=velocity_max)\n\nif os.path.exists(checkpoint_path) and start_epoch > 0: # Load weights only if resuming\n    model.load_weights(checkpoint_path)\n    print(\"Loaded model weights from checkpoint\")\n    if 'physics_weight' in training_state:\n        custom_loss_fn.set_physics_weight(training_state['physics_weight'])\n        print(f\"Restored physics weight to {training_state['physics_weight']}\")\n\n\nmodel.compile(\n    optimizer=tf.keras.optimizers.Adam(learning_rate=1e-4, clipnorm=1.0), # Reduced LR\n    loss=custom_loss_fn, # Use the instance\n    metrics=[NormalizedMAE()] # Metric on normalized data for training log\n)\n\n# Step 12: Callbacks\ncheckpoint_callback = tf.keras.callbacks.ModelCheckpoint(\n    checkpoint_path, save_weights_only=True, save_best_only=True, # Save only best weights\n    monitor='val_normalized_mae', mode='min', verbose=1 # Monitor val_normalized_mae\n)\n\nearly_stopping = tf.keras.callbacks.EarlyStopping(\n    monitor='val_normalized_mae', patience=10, min_delta=0.0001, # Increased patience\n    restore_best_weights=True, mode='min', verbose=1\n)\n\nlr_scheduler = tf.keras.callbacks.ReduceLROnPlateau(\n    monitor='val_normalized_mae', factor=0.5, patience=5, # Increased patience\n    min_lr=1e-7, verbose=1, mode='min'\n)\n\nclass OriginalScaleMAE(tf.keras.callbacks.Callback):\n    def __init__(self, validation_data, v_min, v_max, log_name='val_original_mae'):\n        super().__init__()\n        self.val_seismic, self.val_velocity_raw = validation_data # val_velocity_raw here\n        self.v_min = v_min\n        self.v_max = v_max\n        self.log_name = log_name\n\n    def on_epoch_end(self, epoch, logs=None):\n        if logs is None:\n            logs = {}\n        val_preds_normalized = self.model.predict(self.val_seismic, batch_size=64) # Predict on val seismic\n        val_preds_original_scale = denormalize_velocity(val_preds_normalized, self.v_min, self.v_max)\n\n        # val_velocity_raw is already in original scale\n        mae_original = mean_absolute_error(self.val_velocity_raw.flatten(), val_preds_original_scale.flatten())\n        logs[self.log_name] = mae_original\n        print(f\"Epoch {epoch+1}: {self.log_name} = {mae_original:.4f}\")\n\n# Pass val_seismic and val_velocity_RAW to the callback\noriginal_mae_callback = OriginalScaleMAE(\n    validation_data=(val_seismic, val_velocity_raw), # Pass raw validation velocities\n    v_min=velocity_min,\n    v_max=velocity_max\n)\n\n\nclass SaveTrainingState(tf.keras.callbacks.Callback):\n    def __init__(self, state_path, custom_loss_instance):\n        super().__init__()\n        self.state_path = state_path\n        self.custom_loss = custom_loss_instance\n\n    def on_epoch_end(self, epoch, logs=None):\n        # global_epoch is epoch (0-indexed) + start_epoch_from_json (0-indexed)\n        # so epoch to save is current epoch number (1-indexed)\n        current_epoch_num_to_save = epoch + start_epoch + 1\n        training_state = {\n            'epoch': current_epoch_num_to_save,\n            'physics_weight': self.custom_loss.physics_weight.numpy().item() # Save current weight\n            }\n        with open(self.state_path, 'w') as f:\n            json.dump(training_state, f)\n        print(f\"Saved training state for epoch {current_epoch_num_to_save}\")\n\n\nclass AdjustPhysicsWeight(tf.keras.callbacks.Callback):\n    def __init__(self, custom_loss_instance, total_epochs_planned):\n        super().__init__()\n        self.custom_loss = custom_loss_instance\n        self.total_epochs_planned = total_epochs_planned # For more controlled schedule\n\n    def on_epoch_begin(self, epoch, logs=None):\n        global_epoch_idx = epoch + start_epoch # current epoch index (0-based)\n        # Example: Start with higher physics weight, then decrease, then maybe increase again\n        # This is highly experimental\n        if global_epoch_idx < 5:\n            new_weight = 0.2\n        elif global_epoch_idx < 15:\n            new_weight = 0.1\n        elif global_epoch_idx < 25:\n            new_weight = 0.05\n        else:\n            new_weight = 0.02\n\n        self.custom_loss.set_physics_weight(new_weight)\n        print(f\"Epoch {global_epoch_idx + 1}: Setting physics loss weight to {new_weight:.3f}\")\n\nTOTAL_EPOCHS = 50 # Define total epochs you plan to run\n\n# Step 13: Model Train\nhistory = model.fit(\n    train_dataset,\n    validation_data=val_dataset, # Keras uses this for its own val_loss, val_normalized_mae\n    epochs=TOTAL_EPOCHS, # Increased epochs\n    initial_epoch=start_epoch, # Keras handles this\n    callbacks=[\n        checkpoint_callback,\n        early_stopping,\n        lr_scheduler,\n        original_mae_callback, # Calculates MAE on original scale for validation\n        SaveTrainingState(training_state_path, custom_loss_fn),\n        AdjustPhysicsWeight(custom_loss_fn, TOTAL_EPOCHS)\n    ],\n    verbose=1\n)\n\n# Step 14: Final Evaluation (On original scale)\nprint(\"\\n--- Final Evaluation ---\")\n# Training data\ntrain_preds_normalized = model.predict(train_seismic, batch_size=64)\ntrain_preds_original = denormalize_velocity(train_preds_normalized, velocity_min, velocity_max)\ntrain_mae_original = mean_absolute_error(train_velocity_raw.flatten(), train_preds_original.flatten())\nprint(f\"Final Train MAE (Original Scale): {train_mae_original:.4f}\")\n\n# Validation data (if early stopping restored best weights, this should be close to best val_original_mae)\nval_preds_normalized = model.predict(val_seismic, batch_size=64)\nval_preds_original = denormalize_velocity(val_preds_normalized, velocity_min, velocity_max)\nval_mae_original = mean_absolute_error(val_velocity_raw.flatten(), val_preds_original.flatten())\nprint(f\"Final Validation MAE (Original Scale): {val_mae_original:.4f}\")\n\n# Visual evaluation\nplt.figure(figsize=(18, 6))\nplt.subplot(1, 3, 1)\nplt.plot(history.history['loss'], label='Train Loss')\nplt.plot(history.history['val_loss'], label='Val Loss (Normalized)')\nplt.title('Model Loss (Normalized Scale)')\nplt.xlabel('Epoch')\nplt.ylabel('Loss')\nplt.legend()\n\nplt.subplot(1, 3, 2)\nplt.plot(history.history['normalized_mae'], label='Train MAE (Normalized)')\nplt.plot(history.history['val_normalized_mae'], label='Val MAE (Normalized)')\nif 'val_original_mae' in history.history: # Check if callback added it\n    plt.plot(history.history['val_original_mae'], label='Val MAE (Original Scale)', linestyle='--')\nplt.title('Mean Absolute Error')\nplt.xlabel('Epoch')\nplt.ylabel('MAE')\nplt.legend()\n\nplt.subplot(1, 3, 3)\n# Show a sample from validation set (original scale)\nsample_idx = 0\nplt.imshow(val_preds_original[sample_idx], cmap='viridis', vmin=velocity_min, vmax=velocity_max)\nplt.title(f'Sample Predicted Velocity (Original Scale)\\nMAE for this sample: {mean_absolute_error(val_velocity_raw[sample_idx], val_preds_original[sample_idx]):.2f}')\nplt.colorbar(label='Velocity (m/s)')\nplt.tight_layout()\nplt.show()\n\n# Step 15: Model Save (Full model, not just weights)\n# Save min/max values with the model or separately for inference pipeline\nmodel_save_path = '/kaggle/working/fwi_unet_model_final.keras' # Use .keras for modern format\nmodel.save(model_save_path)\nprint(f\"Model saved to {model_save_path}\")\n\n# Save normalization parameters\nnorm_params = {'velocity_min': float(velocity_min), 'velocity_max': float(velocity_max),\n               'seismic_min': float(seismic_min), 'seismic_max': float(seismic_max)}\nwith open('/kaggle/working/normalization_params.json', 'w') as f:\n    json.dump(norm_params, f)\nprint(f\"Normalization parameters saved to /kaggle/working/normalization_params.json\")","metadata":{"trusted":true,"execution":{"iopub.status.busy":"2025-05-22T06:25:13.800093Z","iopub.execute_input":"2025-05-22T06:25:13.800459Z"}},"outputs":[{"name":"stdout","text":"Found 51 seismic files and 51 velocity files.\nRaw All Seismic Shape: (25500, 1000, 70, 5)\nRaw All Velocity Shape: (25500, 70, 70)\nVelocity original min: 1500.0, max: 4500.0\n","output_type":"stream"},{"name":"stderr","text":"2025-05-22 06:26:55.439440: E external/local_xla/xla/stream_executor/cuda/cuda_platform.cc:51] failed call to cuInit: INTERNAL: CUDA error: Failed call to cuInit: UNKNOWN ERROR (303)\n","output_type":"stream"},{"name":"stdout","text":"Starting training from scratch\n","output_type":"stream"},{"output_type":"display_data","data":{"text/plain":"\u001b[1mModel: \"functional\"\u001b[0m\n","text/html":"<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\">Model: \"functional\"</span>\n</pre>\n"},"metadata":{}},{"output_type":"display_data","data":{"text/plain":"┏━━━━━━━━━━━━━━━━━━━━━┳━━━━━━━━━━━━━━━━━━━┳━━━━━━━━━━━━┳━━━━━━━━━━━━━━━━━━━┓\n┃\u001b[1m \u001b[0m\u001b[1mLayer (type)       \u001b[0m\u001b[1m \u001b[0m┃\u001b[1m \u001b[0m\u001b[1mOutput Shape     \u001b[0m\u001b[1m \u001b[0m┃\u001b[1m \u001b[0m\u001b[1m   Param #\u001b[0m\u001b[1m \u001b[0m┃\u001b[1m \u001b[0m\u001b[1mConnected to     \u001b[0m\u001b[1m \u001b[0m┃\n┡━━━━━━━━━━━━━━━━━━━━━╇━━━━━━━━━━━━━━━━━━━╇━━━━━━━━━━━━╇━━━━━━━━━━━━━━━━━━━┩\n│ input_layer         │ (\u001b[38;5;45mNone\u001b[0m, \u001b[38;5;34m1000\u001b[0m, \u001b[38;5;34m70\u001b[0m,  │          \u001b[38;5;34m0\u001b[0m │ -                 │\n│ (\u001b[38;5;33mInputLayer\u001b[0m)        │ \u001b[38;5;34m5\u001b[0m)                │            │                   │\n├─────────────────────┼───────────────────┼────────────┼───────────────────┤\n│ conv2d (\u001b[38;5;33mConv2D\u001b[0m)     │ (\u001b[38;5;45mNone\u001b[0m, \u001b[38;5;34m1000\u001b[0m, \u001b[38;5;34m70\u001b[0m,  │      \u001b[38;5;34m1,472\u001b[0m │ input_layer[\u001b[38;5;34m0\u001b[0m][\u001b[38;5;34m0\u001b[0m] │\n│                     │ \u001b[38;5;34m32\u001b[0m)               │            │                   │\n├─────────────────────┼───────────────────┼────────────┼───────────────────┤\n│ dropout (\u001b[38;5;33mDropout\u001b[0m)   │ (\u001b[38;5;45mNone\u001b[0m, \u001b[38;5;34m1000\u001b[0m, \u001b[38;5;34m70\u001b[0m,  │          \u001b[38;5;34m0\u001b[0m │ conv2d[\u001b[38;5;34m0\u001b[0m][\u001b[38;5;34m0\u001b[0m]      │\n│                     │ \u001b[38;5;34m32\u001b[0m)               │            │                   │\n├─────────────────────┼───────────────────┼────────────┼───────────────────┤\n│ conv2d_1 (\u001b[38;5;33mConv2D\u001b[0m)   │ (\u001b[38;5;45mNone\u001b[0m, \u001b[38;5;34m1000\u001b[0m, \u001b[38;5;34m70\u001b[0m,  │      \u001b[38;5;34m9,248\u001b[0m │ dropout[\u001b[38;5;34m0\u001b[0m][\u001b[38;5;34m0\u001b[0m]     │\n│                     │ \u001b[38;5;34m32\u001b[0m)               │            │                   │\n├─────────────────────┼───────────────────┼────────────┼───────────────────┤\n│ max_pooling2d       │ (\u001b[38;5;45mNone\u001b[0m, \u001b[38;5;34m500\u001b[0m, \u001b[38;5;34m35\u001b[0m,   │          \u001b[38;5;34m0\u001b[0m │ conv2d_1[\u001b[38;5;34m0\u001b[0m][\u001b[38;5;34m0\u001b[0m]    │\n│ (\u001b[38;5;33mMaxPooling2D\u001b[0m)      │ \u001b[38;5;34m32\u001b[0m)               │            │                   │\n├─────────────────────┼───────────────────┼────────────┼───────────────────┤\n│ conv2d_2 (\u001b[38;5;33mConv2D\u001b[0m)   │ (\u001b[38;5;45mNone\u001b[0m, \u001b[38;5;34m500\u001b[0m, \u001b[38;5;34m35\u001b[0m,   │     \u001b[38;5;34m18,496\u001b[0m │ max_pooling2d[\u001b[38;5;34m0\u001b[0m]… │\n│                     │ \u001b[38;5;34m64\u001b[0m)               │            │                   │\n├─────────────────────┼───────────────────┼────────────┼───────────────────┤\n│ dropout_1 (\u001b[38;5;33mDropout\u001b[0m) │ (\u001b[38;5;45mNone\u001b[0m, \u001b[38;5;34m500\u001b[0m, \u001b[38;5;34m35\u001b[0m,   │          \u001b[38;5;34m0\u001b[0m │ conv2d_2[\u001b[38;5;34m0\u001b[0m][\u001b[38;5;34m0\u001b[0m]    │\n│                     │ \u001b[38;5;34m64\u001b[0m)               │            │                   │\n├─────────────────────┼───────────────────┼────────────┼───────────────────┤\n│ conv2d_3 (\u001b[38;5;33mConv2D\u001b[0m)   │ (\u001b[38;5;45mNone\u001b[0m, \u001b[38;5;34m500\u001b[0m, \u001b[38;5;34m35\u001b[0m,   │     \u001b[38;5;34m36,928\u001b[0m │ dropout_1[\u001b[38;5;34m0\u001b[0m][\u001b[38;5;34m0\u001b[0m]   │\n│                     │ \u001b[38;5;34m64\u001b[0m)               │            │                   │\n├─────────────────────┼───────────────────┼────────────┼───────────────────┤\n│ max_pooling2d_1     │ (\u001b[38;5;45mNone\u001b[0m, \u001b[38;5;34m250\u001b[0m, \u001b[38;5;34m18\u001b[0m,   │          \u001b[38;5;34m0\u001b[0m │ conv2d_3[\u001b[38;5;34m0\u001b[0m][\u001b[38;5;34m0\u001b[0m]    │\n│ (\u001b[38;5;33mMaxPooling2D\u001b[0m)      │ \u001b[38;5;34m64\u001b[0m)               │            │                   │\n├─────────────────────┼───────────────────┼────────────┼───────────────────┤\n│ conv2d_4 (\u001b[38;5;33mConv2D\u001b[0m)   │ (\u001b[38;5;45mNone\u001b[0m, \u001b[38;5;34m250\u001b[0m, \u001b[38;5;34m18\u001b[0m,   │     \u001b[38;5;34m73,856\u001b[0m │ max_pooling2d_1[\u001b[38;5;34m…\u001b[0m │\n│                     │ \u001b[38;5;34m128\u001b[0m)              │            │                   │\n├─────────────────────┼───────────────────┼────────────┼───────────────────┤\n│ dropout_2 (\u001b[38;5;33mDropout\u001b[0m) │ (\u001b[38;5;45mNone\u001b[0m, \u001b[38;5;34m250\u001b[0m, \u001b[38;5;34m18\u001b[0m,   │          \u001b[38;5;34m0\u001b[0m │ conv2d_4[\u001b[38;5;34m0\u001b[0m][\u001b[38;5;34m0\u001b[0m]    │\n│                     │ \u001b[38;5;34m128\u001b[0m)              │            │                   │\n├─────────────────────┼───────────────────┼────────────┼───────────────────┤\n│ conv2d_5 (\u001b[38;5;33mConv2D\u001b[0m)   │ (\u001b[38;5;45mNone\u001b[0m, \u001b[38;5;34m250\u001b[0m, \u001b[38;5;34m18\u001b[0m,   │    \u001b[38;5;34m147,584\u001b[0m │ dropout_2[\u001b[38;5;34m0\u001b[0m][\u001b[38;5;34m0\u001b[0m]   │\n│                     │ \u001b[38;5;34m128\u001b[0m)              │            │                   │\n├─────────────────────┼───────────────────┼────────────┼───────────────────┤\n│ max_pooling2d_2     │ (\u001b[38;5;45mNone\u001b[0m, \u001b[38;5;34m125\u001b[0m, \u001b[38;5;34m9\u001b[0m,    │          \u001b[38;5;34m0\u001b[0m │ conv2d_5[\u001b[38;5;34m0\u001b[0m][\u001b[38;5;34m0\u001b[0m]    │\n│ (\u001b[38;5;33mMaxPooling2D\u001b[0m)      │ \u001b[38;5;34m128\u001b[0m)              │            │                   │\n├─────────────────────┼───────────────────┼────────────┼───────────────────┤\n│ conv2d_6 (\u001b[38;5;33mConv2D\u001b[0m)   │ (\u001b[38;5;45mNone\u001b[0m, \u001b[38;5;34m125\u001b[0m, \u001b[38;5;34m9\u001b[0m,    │    \u001b[38;5;34m295,168\u001b[0m │ max_pooling2d_2[\u001b[38;5;34m…\u001b[0m │\n│                     │ \u001b[38;5;34m256\u001b[0m)              │            │                   │\n├─────────────────────┼───────────────────┼────────────┼───────────────────┤\n│ dropout_3 (\u001b[38;5;33mDropout\u001b[0m) │ (\u001b[38;5;45mNone\u001b[0m, \u001b[38;5;34m125\u001b[0m, \u001b[38;5;34m9\u001b[0m,    │          \u001b[38;5;34m0\u001b[0m │ conv2d_6[\u001b[38;5;34m0\u001b[0m][\u001b[38;5;34m0\u001b[0m]    │\n│                     │ \u001b[38;5;34m256\u001b[0m)              │            │                   │\n├─────────────────────┼───────────────────┼────────────┼───────────────────┤\n│ conv2d_7 (\u001b[38;5;33mConv2D\u001b[0m)   │ (\u001b[38;5;45mNone\u001b[0m, \u001b[38;5;34m125\u001b[0m, \u001b[38;5;34m9\u001b[0m,    │    \u001b[38;5;34m590,080\u001b[0m │ dropout_3[\u001b[38;5;34m0\u001b[0m][\u001b[38;5;34m0\u001b[0m]   │\n│                     │ \u001b[38;5;34m256\u001b[0m)              │            │                   │\n├─────────────────────┼───────────────────┼────────────┼───────────────────┤\n│ max_pooling2d_3     │ (\u001b[38;5;45mNone\u001b[0m, \u001b[38;5;34m63\u001b[0m, \u001b[38;5;34m5\u001b[0m,     │          \u001b[38;5;34m0\u001b[0m │ conv2d_7[\u001b[38;5;34m0\u001b[0m][\u001b[38;5;34m0\u001b[0m]    │\n│ (\u001b[38;5;33mMaxPooling2D\u001b[0m)      │ \u001b[38;5;34m256\u001b[0m)              │            │                   │\n├─────────────────────┼───────────────────┼────────────┼───────────────────┤\n│ conv2d_8 (\u001b[38;5;33mConv2D\u001b[0m)   │ (\u001b[38;5;45mNone\u001b[0m, \u001b[38;5;34m63\u001b[0m, \u001b[38;5;34m5\u001b[0m,     │  \u001b[38;5;34m1,180,160\u001b[0m │ max_pooling2d_3[\u001b[38;5;34m…\u001b[0m │\n│                     │ \u001b[38;5;34m512\u001b[0m)              │            │                   │\n├─────────────────────┼───────────────────┼────────────┼───────────────────┤\n│ dropout_4 (\u001b[38;5;33mDropout\u001b[0m) │ (\u001b[38;5;45mNone\u001b[0m, \u001b[38;5;34m63\u001b[0m, \u001b[38;5;34m5\u001b[0m,     │          \u001b[38;5;34m0\u001b[0m │ conv2d_8[\u001b[38;5;34m0\u001b[0m][\u001b[38;5;34m0\u001b[0m]    │\n│                     │ \u001b[38;5;34m512\u001b[0m)              │            │                   │\n├─────────────────────┼───────────────────┼────────────┼───────────────────┤\n│ conv2d_9 (\u001b[38;5;33mConv2D\u001b[0m)   │ (\u001b[38;5;45mNone\u001b[0m, \u001b[38;5;34m63\u001b[0m, \u001b[38;5;34m5\u001b[0m,     │  \u001b[38;5;34m2,359,808\u001b[0m │ dropout_4[\u001b[38;5;34m0\u001b[0m][\u001b[38;5;34m0\u001b[0m]   │\n│                     │ \u001b[38;5;34m512\u001b[0m)              │            │                   │\n├─────────────────────┼───────────────────┼────────────┼───────────────────┤\n│ conv2d_transpose    │ (\u001b[38;5;45mNone\u001b[0m, \u001b[38;5;34m126\u001b[0m, \u001b[38;5;34m10\u001b[0m,   │    \u001b[38;5;34m524,544\u001b[0m │ conv2d_9[\u001b[38;5;34m0\u001b[0m][\u001b[38;5;34m0\u001b[0m]    │\n│ (\u001b[38;5;33mConv2DTranspose\u001b[0m)   │ \u001b[38;5;34m256\u001b[0m)              │            │                   │\n├─────────────────────┼───────────────────┼────────────┼───────────────────┤\n│ cropping2d          │ (\u001b[38;5;45mNone\u001b[0m, \u001b[38;5;34m125\u001b[0m, \u001b[38;5;34m9\u001b[0m,    │          \u001b[38;5;34m0\u001b[0m │ conv2d_transpose… │\n│ (\u001b[38;5;33mCropping2D\u001b[0m)        │ \u001b[38;5;34m256\u001b[0m)              │            │                   │\n├─────────────────────┼───────────────────┼────────────┼───────────────────┤\n│ concatenate         │ (\u001b[38;5;45mNone\u001b[0m, \u001b[38;5;34m125\u001b[0m, \u001b[38;5;34m9\u001b[0m,    │          \u001b[38;5;34m0\u001b[0m │ cropping2d[\u001b[38;5;34m0\u001b[0m][\u001b[38;5;34m0\u001b[0m], │\n│ (\u001b[38;5;33mConcatenate\u001b[0m)       │ \u001b[38;5;34m512\u001b[0m)              │            │ conv2d_7[\u001b[38;5;34m0\u001b[0m][\u001b[38;5;34m0\u001b[0m]    │\n├─────────────────────┼───────────────────┼────────────┼───────────────────┤\n│ conv2d_10 (\u001b[38;5;33mConv2D\u001b[0m)  │ (\u001b[38;5;45mNone\u001b[0m, \u001b[38;5;34m125\u001b[0m, \u001b[38;5;34m9\u001b[0m,    │  \u001b[38;5;34m1,179,904\u001b[0m │ concatenate[\u001b[38;5;34m0\u001b[0m][\u001b[38;5;34m0\u001b[0m] │\n│                     │ \u001b[38;5;34m256\u001b[0m)              │            │                   │\n├─────────────────────┼───────────────────┼────────────┼───────────────────┤\n│ dropout_5 (\u001b[38;5;33mDropout\u001b[0m) │ (\u001b[38;5;45mNone\u001b[0m, \u001b[38;5;34m125\u001b[0m, \u001b[38;5;34m9\u001b[0m,    │          \u001b[38;5;34m0\u001b[0m │ conv2d_10[\u001b[38;5;34m0\u001b[0m][\u001b[38;5;34m0\u001b[0m]   │\n│                     │ \u001b[38;5;34m256\u001b[0m)              │            │                   │\n├─────────────────────┼───────────────────┼────────────┼───────────────────┤\n│ conv2d_11 (\u001b[38;5;33mConv2D\u001b[0m)  │ (\u001b[38;5;45mNone\u001b[0m, \u001b[38;5;34m125\u001b[0m, \u001b[38;5;34m9\u001b[0m,    │    \u001b[38;5;34m590,080\u001b[0m │ dropout_5[\u001b[38;5;34m0\u001b[0m][\u001b[38;5;34m0\u001b[0m]   │\n│                     │ \u001b[38;5;34m256\u001b[0m)              │            │                   │\n├─────────────────────┼───────────────────┼────────────┼───────────────────┤\n│ conv2d_transpose_1  │ (\u001b[38;5;45mNone\u001b[0m, \u001b[38;5;34m250\u001b[0m, \u001b[38;5;34m18\u001b[0m,   │    \u001b[38;5;34m131,200\u001b[0m │ conv2d_11[\u001b[38;5;34m0\u001b[0m][\u001b[38;5;34m0\u001b[0m]   │\n│ (\u001b[38;5;33mConv2DTranspose\u001b[0m)   │ \u001b[38;5;34m128\u001b[0m)              │            │                   │\n├─────────────────────┼───────────────────┼────────────┼───────────────────┤\n│ concatenate_1       │ (\u001b[38;5;45mNone\u001b[0m, \u001b[38;5;34m250\u001b[0m, \u001b[38;5;34m18\u001b[0m,   │          \u001b[38;5;34m0\u001b[0m │ conv2d_transpose… │\n│ (\u001b[38;5;33mConcatenate\u001b[0m)       │ \u001b[38;5;34m256\u001b[0m)              │            │ conv2d_5[\u001b[38;5;34m0\u001b[0m][\u001b[38;5;34m0\u001b[0m]    │\n├─────────────────────┼───────────────────┼────────────┼───────────────────┤\n│ conv2d_12 (\u001b[38;5;33mConv2D\u001b[0m)  │ (\u001b[38;5;45mNone\u001b[0m, \u001b[38;5;34m250\u001b[0m, \u001b[38;5;34m18\u001b[0m,   │    \u001b[38;5;34m295,040\u001b[0m │ concatenate_1[\u001b[38;5;34m0\u001b[0m]… │\n│                     │ \u001b[38;5;34m128\u001b[0m)              │            │                   │\n├─────────────────────┼───────────────────┼────────────┼───────────────────┤\n│ dropout_6 (\u001b[38;5;33mDropout\u001b[0m) │ (\u001b[38;5;45mNone\u001b[0m, \u001b[38;5;34m250\u001b[0m, \u001b[38;5;34m18\u001b[0m,   │          \u001b[38;5;34m0\u001b[0m │ conv2d_12[\u001b[38;5;34m0\u001b[0m][\u001b[38;5;34m0\u001b[0m]   │\n│                     │ \u001b[38;5;34m128\u001b[0m)              │            │                   │\n├─────────────────────┼───────────────────┼────────────┼───────────────────┤\n│ conv2d_13 (\u001b[38;5;33mConv2D\u001b[0m)  │ (\u001b[38;5;45mNone\u001b[0m, \u001b[38;5;34m250\u001b[0m, \u001b[38;5;34m18\u001b[0m,   │    \u001b[38;5;34m147,584\u001b[0m │ dropout_6[\u001b[38;5;34m0\u001b[0m][\u001b[38;5;34m0\u001b[0m]   │\n│                     │ \u001b[38;5;34m128\u001b[0m)              │            │                   │\n├─────────────────────┼───────────────────┼────────────┼───────────────────┤\n│ conv2d_transpose_2  │ (\u001b[38;5;45mNone\u001b[0m, \u001b[38;5;34m500\u001b[0m, \u001b[38;5;34m36\u001b[0m,   │     \u001b[38;5;34m32,832\u001b[0m │ conv2d_13[\u001b[38;5;34m0\u001b[0m][\u001b[38;5;34m0\u001b[0m]   │\n│ (\u001b[38;5;33mConv2DTranspose\u001b[0m)   │ \u001b[38;5;34m64\u001b[0m)               │            │                   │\n├─────────────────────┼───────────────────┼────────────┼───────────────────┤\n│ cropping2d_1        │ (\u001b[38;5;45mNone\u001b[0m, \u001b[38;5;34m500\u001b[0m, \u001b[38;5;34m35\u001b[0m,   │          \u001b[38;5;34m0\u001b[0m │ conv2d_transpose… │\n│ (\u001b[38;5;33mCropping2D\u001b[0m)        │ \u001b[38;5;34m64\u001b[0m)               │            │                   │\n├─────────────────────┼───────────────────┼────────────┼───────────────────┤\n│ concatenate_2       │ (\u001b[38;5;45mNone\u001b[0m, \u001b[38;5;34m500\u001b[0m, \u001b[38;5;34m35\u001b[0m,   │          \u001b[38;5;34m0\u001b[0m │ cropping2d_1[\u001b[38;5;34m0\u001b[0m][\u001b[38;5;34m…\u001b[0m │\n│ (\u001b[38;5;33mConcatenate\u001b[0m)       │ \u001b[38;5;34m128\u001b[0m)              │            │ conv2d_3[\u001b[38;5;34m0\u001b[0m][\u001b[38;5;34m0\u001b[0m]    │\n├─────────────────────┼───────────────────┼────────────┼───────────────────┤\n│ conv2d_14 (\u001b[38;5;33mConv2D\u001b[0m)  │ (\u001b[38;5;45mNone\u001b[0m, \u001b[38;5;34m500\u001b[0m, \u001b[38;5;34m35\u001b[0m,   │     \u001b[38;5;34m73,792\u001b[0m │ concatenate_2[\u001b[38;5;34m0\u001b[0m]… │\n│                     │ \u001b[38;5;34m64\u001b[0m)               │            │                   │\n├─────────────────────┼───────────────────┼────────────┼───────────────────┤\n│ dropout_7 (\u001b[38;5;33mDropout\u001b[0m) │ (\u001b[38;5;45mNone\u001b[0m, \u001b[38;5;34m500\u001b[0m, \u001b[38;5;34m35\u001b[0m,   │          \u001b[38;5;34m0\u001b[0m │ conv2d_14[\u001b[38;5;34m0\u001b[0m][\u001b[38;5;34m0\u001b[0m]   │\n│                     │ \u001b[38;5;34m64\u001b[0m)               │            │                   │\n├─────────────────────┼───────────────────┼────────────┼───────────────────┤\n│ conv2d_15 (\u001b[38;5;33mConv2D\u001b[0m)  │ (\u001b[38;5;45mNone\u001b[0m, \u001b[38;5;34m500\u001b[0m, \u001b[38;5;34m35\u001b[0m,   │     \u001b[38;5;34m36,928\u001b[0m │ dropout_7[\u001b[38;5;34m0\u001b[0m][\u001b[38;5;34m0\u001b[0m]   │\n│                     │ \u001b[38;5;34m64\u001b[0m)               │            │                   │\n├─────────────────────┼───────────────────┼────────────┼───────────────────┤\n│ conv2d_transpose_3  │ (\u001b[38;5;45mNone\u001b[0m, \u001b[38;5;34m1000\u001b[0m, \u001b[38;5;34m70\u001b[0m,  │      \u001b[38;5;34m8,224\u001b[0m │ conv2d_15[\u001b[38;5;34m0\u001b[0m][\u001b[38;5;34m0\u001b[0m]   │\n│ (\u001b[38;5;33mConv2DTranspose\u001b[0m)   │ \u001b[38;5;34m32\u001b[0m)               │            │                   │\n├─────────────────────┼───────────────────┼────────────┼───────────────────┤\n│ concatenate_3       │ (\u001b[38;5;45mNone\u001b[0m, \u001b[38;5;34m1000\u001b[0m, \u001b[38;5;34m70\u001b[0m,  │          \u001b[38;5;34m0\u001b[0m │ conv2d_transpose… │\n│ (\u001b[38;5;33mConcatenate\u001b[0m)       │ \u001b[38;5;34m64\u001b[0m)               │            │ conv2d_1[\u001b[38;5;34m0\u001b[0m][\u001b[38;5;34m0\u001b[0m]    │\n├─────────────────────┼───────────────────┼────────────┼───────────────────┤\n│ conv2d_16 (\u001b[38;5;33mConv2D\u001b[0m)  │ (\u001b[38;5;45mNone\u001b[0m, \u001b[38;5;34m1000\u001b[0m, \u001b[38;5;34m70\u001b[0m,  │     \u001b[38;5;34m18,464\u001b[0m │ concatenate_3[\u001b[38;5;34m0\u001b[0m]… │\n│                     │ \u001b[38;5;34m32\u001b[0m)               │            │                   │\n├─────────────────────┼───────────────────┼────────────┼───────────────────┤\n│ dropout_8 (\u001b[38;5;33mDropout\u001b[0m) │ (\u001b[38;5;45mNone\u001b[0m, \u001b[38;5;34m1000\u001b[0m, \u001b[38;5;34m70\u001b[0m,  │          \u001b[38;5;34m0\u001b[0m │ conv2d_16[\u001b[38;5;34m0\u001b[0m][\u001b[38;5;34m0\u001b[0m]   │\n│                     │ \u001b[38;5;34m32\u001b[0m)               │            │                   │\n├─────────────────────┼───────────────────┼────────────┼───────────────────┤\n│ conv2d_17 (\u001b[38;5;33mConv2D\u001b[0m)  │ (\u001b[38;5;45mNone\u001b[0m, \u001b[38;5;34m1000\u001b[0m, \u001b[38;5;34m70\u001b[0m,  │      \u001b[38;5;34m9,248\u001b[0m │ dropout_8[\u001b[38;5;34m0\u001b[0m][\u001b[38;5;34m0\u001b[0m]   │\n│                     │ \u001b[38;5;34m32\u001b[0m)               │            │                   │\n├─────────────────────┼───────────────────┼────────────┼───────────────────┤\n│ conv2d_18 (\u001b[38;5;33mConv2D\u001b[0m)  │ (\u001b[38;5;45mNone\u001b[0m, \u001b[38;5;34m1000\u001b[0m, \u001b[38;5;34m70\u001b[0m,  │         \u001b[38;5;34m33\u001b[0m │ conv2d_17[\u001b[38;5;34m0\u001b[0m][\u001b[38;5;34m0\u001b[0m]   │\n│                     │ \u001b[38;5;34m1\u001b[0m)                │            │                   │\n├─────────────────────┼───────────────────┼────────────┼───────────────────┤\n│ resizing (\u001b[38;5;33mResizing\u001b[0m) │ (\u001b[38;5;45mNone\u001b[0m, \u001b[38;5;34m70\u001b[0m, \u001b[38;5;34m70\u001b[0m, \u001b[38;5;34m1\u001b[0m) │          \u001b[38;5;34m0\u001b[0m │ conv2d_18[\u001b[38;5;34m0\u001b[0m][\u001b[38;5;34m0\u001b[0m]   │\n├─────────────────────┼───────────────────┼────────────┼───────────────────┤\n│ reshape (\u001b[38;5;33mReshape\u001b[0m)   │ (\u001b[38;5;45mNone\u001b[0m, \u001b[38;5;34m70\u001b[0m, \u001b[38;5;34m70\u001b[0m)    │          \u001b[38;5;34m0\u001b[0m │ resizing[\u001b[38;5;34m0\u001b[0m][\u001b[38;5;34m0\u001b[0m]    │\n└─────────────────────┴───────────────────┴────────────┴───────────────────┘\n","text/html":"<pre style=\"white-space:pre;overflow-x:auto;line-height:normal;font-family:Menlo,'DejaVu Sans Mono',consolas,'Courier New',monospace\">┏━━━━━━━━━━━━━━━━━━━━━┳━━━━━━━━━━━━━━━━━━━┳━━━━━━━━━━━━┳━━━━━━━━━━━━━━━━━━━┓\n┃<span style=\"font-weight: bold\"> Layer (type)        </span>┃<span style=\"font-weight: bold\"> Output Shape      </span>┃<span style=\"font-weight: bold\">    Param # </span>┃<span style=\"font-weight: bold\"> Connected to      </span>┃\n┡━━━━━━━━━━━━━━━━━━━━━╇━━━━━━━━━━━━━━━━━━━╇━━━━━━━━━━━━╇━━━━━━━━━━━━━━━━━━━┩\n│ input_layer         │ (<span style=\"color: #00d7ff; text-decoration-color: #00d7ff\">None</span>, <span style=\"color: #00af00; text-decoration-color: #00af00\">1000</span>, <span style=\"color: #00af00; text-decoration-color: #00af00\">70</span>,  │          <span style=\"color: #00af00; text-decoration-color: #00af00\">0</span> │ -                 │\n│ (<span style=\"color: #0087ff; text-decoration-color: #0087ff\">InputLayer</span>)        │ <span style=\"color: #00af00; text-decoration-color: #00af00\">5</span>)                │            │                   │\n├─────────────────────┼───────────────────┼────────────┼───────────────────┤\n│ conv2d (<span style=\"color: #0087ff; text-decoration-color: #0087ff\">Conv2D</span>)     │ (<span style=\"color: #00d7ff; text-decoration-color: #00d7ff\">None</span>, <span style=\"color: #00af00; text-decoration-color: #00af00\">1000</span>, <span style=\"color: #00af00; text-decoration-color: #00af00\">70</span>,  │      <span style=\"color: #00af00; text-decoration-color: #00af00\">1,472</span> │ input_layer[<span style=\"color: #00af00; text-decoration-color: #00af00\">0</span>][<span style=\"color: #00af00; text-decoration-color: #00af00\">0</span>] │\n│                     │ <span style=\"color: #00af00; text-decoration-color: #00af00\">32</span>)               │            │                   │\n├─────────────────────┼───────────────────┼────────────┼───────────────────┤\n│ dropout (<span style=\"color: #0087ff; text-decoration-color: #0087ff\">Dropout</span>)   │ (<span style=\"color: #00d7ff; text-decoration-color: #00d7ff\">None</span>, <span style=\"color: #00af00; text-decoration-color: #00af00\">1000</span>, <span style=\"color: #00af00; text-decoration-color: #00af00\">70</span>,  │          <span style=\"color: #00af00; text-decoration-color: #00af00\">0</span> │ conv2d[<span style=\"color: #00af00; text-decoration-color: #00af00\">0</span>][<span style=\"color: #00af00; text-decoration-color: #00af00\">0</span>]      │\n│                     │ <span style=\"color: #00af00; text-decoration-color: #00af00\">32</span>)               │            │                   │\n├─────────────────────┼───────────────────┼────────────┼───────────────────┤\n│ conv2d_1 (<span style=\"color: #0087ff; text-decoration-color: #0087ff\">Conv2D</span>)   │ (<span style=\"color: #00d7ff; text-decoration-color: #00d7ff\">None</span>, <span style=\"color: #00af00; text-decoration-color: #00af00\">1000</span>, <span style=\"color: #00af00; text-decoration-color: #00af00\">70</span>,  │      <span style=\"color: #00af00; text-decoration-color: #00af00\">9,248</span> │ dropout[<span style=\"color: #00af00; text-decoration-color: #00af00\">0</span>][<span style=\"color: #00af00; text-decoration-color: #00af00\">0</span>]     │\n│                     │ <span style=\"color: #00af00; text-decoration-color: #00af00\">32</span>)               │            │                   │\n├─────────────────────┼───────────────────┼────────────┼───────────────────┤\n│ max_pooling2d       │ (<span style=\"color: #00d7ff; text-decoration-color: #00d7ff\">None</span>, <span style=\"color: #00af00; text-decoration-color: #00af00\">500</span>, <span style=\"color: #00af00; text-decoration-color: #00af00\">35</span>,   │          <span style=\"color: #00af00; text-decoration-color: #00af00\">0</span> │ conv2d_1[<span style=\"color: #00af00; text-decoration-color: #00af00\">0</span>][<span style=\"color: #00af00; text-decoration-color: #00af00\">0</span>]    │\n│ (<span style=\"color: #0087ff; text-decoration-color: #0087ff\">MaxPooling2D</span>)      │ <span style=\"color: #00af00; text-decoration-color: #00af00\">32</span>)               │            │                   │\n├─────────────────────┼───────────────────┼────────────┼───────────────────┤\n│ conv2d_2 (<span style=\"color: #0087ff; text-decoration-color: #0087ff\">Conv2D</span>)   │ (<span style=\"color: #00d7ff; text-decoration-color: #00d7ff\">None</span>, <span style=\"color: #00af00; text-decoration-color: #00af00\">500</span>, <span style=\"color: #00af00; text-decoration-color: #00af00\">35</span>,   │     <span style=\"color: #00af00; text-decoration-color: #00af00\">18,496</span> │ max_pooling2d[<span style=\"color: #00af00; text-decoration-color: #00af00\">0</span>]… │\n│                     │ <span style=\"color: #00af00; text-decoration-color: #00af00\">64</span>)               │            │                   │\n├─────────────────────┼───────────────────┼────────────┼───────────────────┤\n│ dropout_1 (<span style=\"color: #0087ff; text-decoration-color: #0087ff\">Dropout</span>) │ (<span style=\"color: #00d7ff; text-decoration-color: #00d7ff\">None</span>, <span style=\"color: #00af00; text-decoration-color: #00af00\">500</span>, <span style=\"color: #00af00; text-decoration-color: #00af00\">35</span>,   │          <span style=\"color: #00af00; text-decoration-color: #00af00\">0</span> │ conv2d_2[<span style=\"color: #00af00; text-decoration-color: #00af00\">0</span>][<span style=\"color: #00af00; text-decoration-color: #00af00\">0</span>]    │\n│                     │ <span style=\"color: #00af00; text-decoration-color: #00af00\">64</span>)               │            │                   │\n├─────────────────────┼───────────────────┼────────────┼───────────────────┤\n│ conv2d_3 (<span style=\"color: #0087ff; text-decoration-color: #0087ff\">Conv2D</span>)   │ (<span style=\"color: #00d7ff; text-decoration-color: #00d7ff\">None</span>, <span style=\"color: #00af00; text-decoration-color: #00af00\">500</span>, <span style=\"color: #00af00; text-decoration-color: #00af00\">35</span>,   │     <span style=\"color: #00af00; text-decoration-color: #00af00\">36,928</span> │ dropout_1[<span style=\"color: #00af00; text-decoration-color: #00af00\">0</span>][<span style=\"color: #00af00; text-decoration-color: #00af00\">0</span>]   │\n│                     │ <span style=\"color: #00af00; text-decoration-color: #00af00\">64</span>)               │            │                   │\n├─────────────────────┼───────────────────┼────────────┼───────────────────┤\n│ max_pooling2d_1     │ (<span style=\"color: #00d7ff; text-decoration-color: #00d7ff\">None</span>, <span style=\"color: #00af00; text-decoration-color: #00af00\">250</span>, <span style=\"color: #00af00; text-decoration-color: #00af00\">18</span>,   │          <span style=\"color: #00af00; text-decoration-color: #00af00\">0</span> │ conv2d_3[<span style=\"color: #00af00; text-decoration-color: #00af00\">0</span>][<span style=\"color: #00af00; text-decoration-color: #00af00\">0</span>]    │\n│ (<span style=\"color: #0087ff; text-decoration-color: #0087ff\">MaxPooling2D</span>)      │ <span style=\"color: #00af00; text-decoration-color: #00af00\">64</span>)               │            │                   │\n├─────────────────────┼───────────────────┼────────────┼───────────────────┤\n│ conv2d_4 (<span style=\"color: #0087ff; text-decoration-color: #0087ff\">Conv2D</span>)   │ (<span style=\"color: #00d7ff; text-decoration-color: #00d7ff\">None</span>, <span style=\"color: #00af00; text-decoration-color: #00af00\">250</span>, <span style=\"color: #00af00; text-decoration-color: #00af00\">18</span>,   │     <span style=\"color: #00af00; text-decoration-color: #00af00\">73,856</span> │ max_pooling2d_1[<span style=\"color: #00af00; text-decoration-color: #00af00\">…</span> │\n│                     │ <span style=\"color: #00af00; text-decoration-color: #00af00\">128</span>)              │            │                   │\n├─────────────────────┼───────────────────┼────────────┼───────────────────┤\n│ dropout_2 (<span style=\"color: #0087ff; text-decoration-color: #0087ff\">Dropout</span>) │ (<span style=\"color: #00d7ff; text-decoration-color: #00d7ff\">None</span>, <span style=\"color: #00af00; text-decoration-color: #00af00\">250</span>, <span style=\"color: #00af00; text-decoration-color: #00af00\">18</span>,   │          <span style=\"color: #00af00; text-decoration-color: #00af00\">0</span> │ conv2d_4[<span style=\"color: #00af00; text-decoration-color: #00af00\">0</span>][<span style=\"color: #00af00; text-decoration-color: #00af00\">0</span>]    │\n│                     │ <span style=\"color: #00af00; text-decoration-color: #00af00\">128</span>)              │            │                   │\n├─────────────────────┼───────────────────┼────────────┼───────────────────┤\n│ conv2d_5 (<span style=\"color: #0087ff; text-decoration-color: #0087ff\">Conv2D</span>)   │ (<span style=\"color: #00d7ff; text-decoration-color: #00d7ff\">None</span>, <span style=\"color: #00af00; text-decoration-color: #00af00\">250</span>, <span style=\"color: #00af00; text-decoration-color: #00af00\">18</span>,   │    <span style=\"color: #00af00; text-decoration-color: #00af00\">147,584</span> │ dropout_2[<span style=\"color: #00af00; text-decoration-color: #00af00\">0</span>][<span style=\"color: #00af00; text-decoration-color: #00af00\">0</span>]   │\n│                     │ <span style=\"color: #00af00; text-decoration-color: #00af00\">128</span>)              │            │                   │\n├─────────────────────┼───────────────────┼────────────┼───────────────────┤\n│ max_pooling2d_2     │ (<span style=\"color: #00d7ff; text-decoration-color: #00d7ff\">None</span>, <span style=\"color: #00af00; text-decoration-color: #00af00\">125</span>, <span style=\"color: #00af00; text-decoration-color: #00af00\">9</span>,    │          <span style=\"color: #00af00; text-decoration-color: #00af00\">0</span> │ conv2d_5[<span style=\"color: #00af00; text-decoration-color: #00af00\">0</span>][<span style=\"color: #00af00; text-decoration-color: #00af00\">0</span>]    │\n│ (<span style=\"color: #0087ff; text-decoration-color: #0087ff\">MaxPooling2D</span>)      │ <span style=\"color: #00af00; text-decoration-color: #00af00\">128</span>)              │            │                   │\n├─────────────────────┼───────────────────┼────────────┼───────────────────┤\n│ conv2d_6 (<span style=\"color: #0087ff; text-decoration-color: #0087ff\">Conv2D</span>)   │ (<span style=\"color: #00d7ff; text-decoration-color: #00d7ff\">None</span>, <span style=\"color: #00af00; text-decoration-color: #00af00\">125</span>, <span style=\"color: #00af00; text-decoration-color: #00af00\">9</span>,    │    <span style=\"color: #00af00; text-decoration-color: #00af00\">295,168</span> │ max_pooling2d_2[<span style=\"color: #00af00; text-decoration-color: #00af00\">…</span> │\n│                     │ <span style=\"color: #00af00; text-decoration-color: #00af00\">256</span>)              │            │                   │\n├─────────────────────┼───────────────────┼────────────┼───────────────────┤\n│ dropout_3 (<span style=\"color: #0087ff; text-decoration-color: #0087ff\">Dropout</span>) │ (<span style=\"color: #00d7ff; text-decoration-color: #00d7ff\">None</span>, <span style=\"color: #00af00; text-decoration-color: #00af00\">125</span>, <span style=\"color: #00af00; text-decoration-color: #00af00\">9</span>,    │          <span style=\"color: #00af00; text-decoration-color: #00af00\">0</span> │ conv2d_6[<span style=\"color: #00af00; text-decoration-color: #00af00\">0</span>][<span style=\"color: #00af00; text-decoration-color: #00af00\">0</span>]    │\n│                     │ <span style=\"color: #00af00; text-decoration-color: #00af00\">256</span>)              │            │                   │\n├─────────────────────┼───────────────────┼────────────┼───────────────────┤\n│ conv2d_7 (<span style=\"color: #0087ff; text-decoration-color: #0087ff\">Conv2D</span>)   │ (<span style=\"color: #00d7ff; text-decoration-color: #00d7ff\">None</span>, <span style=\"color: #00af00; text-decoration-color: #00af00\">125</span>, <span style=\"color: #00af00; text-decoration-color: #00af00\">9</span>,    │    <span style=\"color: #00af00; text-decoration-color: #00af00\">590,080</span> │ dropout_3[<span style=\"color: #00af00; text-decoration-color: #00af00\">0</span>][<span style=\"color: #00af00; text-decoration-color: #00af00\">0</span>]   │\n│                     │ <span style=\"color: #00af00; text-decoration-color: #00af00\">256</span>)              │            │                   │\n├─────────────────────┼───────────────────┼────────────┼───────────────────┤\n│ max_pooling2d_3     │ (<span style=\"color: #00d7ff; text-decoration-color: #00d7ff\">None</span>, <span style=\"color: #00af00; text-decoration-color: #00af00\">63</span>, <span style=\"color: #00af00; text-decoration-color: #00af00\">5</span>,     │          <span style=\"color: #00af00; text-decoration-color: #00af00\">0</span> │ conv2d_7[<span style=\"color: #00af00; text-decoration-color: #00af00\">0</span>][<span style=\"color: #00af00; text-decoration-color: #00af00\">0</span>]    │\n│ (<span style=\"color: #0087ff; text-decoration-color: #0087ff\">MaxPooling2D</span>)      │ <span style=\"color: #00af00; text-decoration-color: #00af00\">256</span>)              │            │                   │\n├─────────────────────┼───────────────────┼────────────┼───────────────────┤\n│ conv2d_8 (<span style=\"color: #0087ff; text-decoration-color: #0087ff\">Conv2D</span>)   │ (<span style=\"color: #00d7ff; text-decoration-color: #00d7ff\">None</span>, <span style=\"color: #00af00; text-decoration-color: #00af00\">63</span>, <span style=\"color: #00af00; text-decoration-color: #00af00\">5</span>,     │  <span style=\"color: #00af00; text-decoration-color: #00af00\">1,180,160</span> │ max_pooling2d_3[<span style=\"color: #00af00; text-decoration-color: #00af00\">…</span> │\n│                     │ <span style=\"color: #00af00; text-decoration-color: #00af00\">512</span>)              │            │                   │\n├─────────────────────┼───────────────────┼────────────┼───────────────────┤\n│ dropout_4 (<span style=\"color: #0087ff; text-decoration-color: #0087ff\">Dropout</span>) │ (<span style=\"color: #00d7ff; text-decoration-color: #00d7ff\">None</span>, <span style=\"color: #00af00; text-decoration-color: #00af00\">63</span>, <span style=\"color: #00af00; text-decoration-color: #00af00\">5</span>,     │          <span style=\"color: #00af00; text-decoration-color: #00af00\">0</span> │ conv2d_8[<span style=\"color: #00af00; text-decoration-color: #00af00\">0</span>][<span style=\"color: #00af00; text-decoration-color: #00af00\">0</span>]    │\n│                     │ <span style=\"color: #00af00; text-decoration-color: #00af00\">512</span>)              │            │                   │\n├─────────────────────┼───────────────────┼────────────┼───────────────────┤\n│ conv2d_9 (<span style=\"color: #0087ff; text-decoration-color: #0087ff\">Conv2D</span>)   │ (<span style=\"color: #00d7ff; text-decoration-color: #00d7ff\">None</span>, <span style=\"color: #00af00; text-decoration-color: #00af00\">63</span>, <span style=\"color: #00af00; text-decoration-color: #00af00\">5</span>,     │  <span style=\"color: #00af00; text-decoration-color: #00af00\">2,359,808</span> │ dropout_4[<span style=\"color: #00af00; text-decoration-color: #00af00\">0</span>][<span style=\"color: #00af00; text-decoration-color: #00af00\">0</span>]   │\n│                     │ <span style=\"color: #00af00; text-decoration-color: #00af00\">512</span>)              │            │                   │\n├─────────────────────┼───────────────────┼────────────┼───────────────────┤\n│ conv2d_transpose    │ (<span style=\"color: #00d7ff; text-decoration-color: #00d7ff\">None</span>, <span style=\"color: #00af00; text-decoration-color: #00af00\">126</span>, <span style=\"color: #00af00; text-decoration-color: #00af00\">10</span>,   │    <span style=\"color: #00af00; text-decoration-color: #00af00\">524,544</span> │ conv2d_9[<span style=\"color: #00af00; text-decoration-color: #00af00\">0</span>][<span style=\"color: #00af00; text-decoration-color: #00af00\">0</span>]    │\n│ (<span style=\"color: #0087ff; text-decoration-color: #0087ff\">Conv2DTranspose</span>)   │ <span style=\"color: #00af00; text-decoration-color: #00af00\">256</span>)              │            │                   │\n├─────────────────────┼───────────────────┼────────────┼───────────────────┤\n│ cropping2d          │ (<span style=\"color: #00d7ff; text-decoration-color: #00d7ff\">None</span>, <span style=\"color: #00af00; text-decoration-color: #00af00\">125</span>, <span style=\"color: #00af00; text-decoration-color: #00af00\">9</span>,    │          <span style=\"color: #00af00; text-decoration-color: #00af00\">0</span> │ conv2d_transpose… │\n│ (<span style=\"color: #0087ff; text-decoration-color: #0087ff\">Cropping2D</span>)        │ <span style=\"color: #00af00; text-decoration-color: #00af00\">256</span>)              │            │                   │\n├─────────────────────┼───────────────────┼────────────┼───────────────────┤\n│ concatenate         │ (<span style=\"color: #00d7ff; text-decoration-color: #00d7ff\">None</span>, <span style=\"color: #00af00; text-decoration-color: #00af00\">125</span>, <span style=\"color: #00af00; text-decoration-color: #00af00\">9</span>,    │          <span style=\"color: #00af00; text-decoration-color: #00af00\">0</span> │ cropping2d[<span style=\"color: #00af00; text-decoration-color: #00af00\">0</span>][<span style=\"color: #00af00; text-decoration-color: #00af00\">0</span>], │\n│ (<span style=\"color: #0087ff; text-decoration-color: #0087ff\">Concatenate</span>)       │ <span style=\"color: #00af00; text-decoration-color: #00af00\">512</span>)              │            │ conv2d_7[<span style=\"color: #00af00; text-decoration-color: #00af00\">0</span>][<span style=\"color: #00af00; text-decoration-color: #00af00\">0</span>]    │\n├─────────────────────┼───────────────────┼────────────┼───────────────────┤\n│ conv2d_10 (<span style=\"color: #0087ff; text-decoration-color: #0087ff\">Conv2D</span>)  │ (<span style=\"color: #00d7ff; text-decoration-color: #00d7ff\">None</span>, <span style=\"color: #00af00; text-decoration-color: #00af00\">125</span>, <span style=\"color: #00af00; text-decoration-color: #00af00\">9</span>,    │  <span style=\"color: #00af00; text-decoration-color: #00af00\">1,179,904</span> │ concatenate[<span style=\"color: #00af00; text-decoration-color: #00af00\">0</span>][<span style=\"color: #00af00; text-decoration-color: #00af00\">0</span>] │\n│                     │ <span style=\"color: #00af00; text-decoration-color: #00af00\">256</span>)              │            │                   │\n├─────────────────────┼───────────────────┼────────────┼───────────────────┤\n│ dropout_5 (<span style=\"color: #0087ff; text-decoration-color: #0087ff\">Dropout</span>) │ (<span style=\"color: #00d7ff; text-decoration-color: #00d7ff\">None</span>, <span style=\"color: #00af00; text-decoration-color: #00af00\">125</span>, <span style=\"color: #00af00; text-decoration-color: #00af00\">9</span>,    │          <span style=\"color: #00af00; text-decoration-color: #00af00\">0</span> │ conv2d_10[<span style=\"color: #00af00; text-decoration-color: #00af00\">0</span>][<span style=\"color: #00af00; text-decoration-color: #00af00\">0</span>]   │\n│                     │ <span style=\"color: #00af00; text-decoration-color: #00af00\">256</span>)              │            │                   │\n├─────────────────────┼───────────────────┼────────────┼───────────────────┤\n│ conv2d_11 (<span style=\"color: #0087ff; text-decoration-color: #0087ff\">Conv2D</span>)  │ (<span style=\"color: #00d7ff; text-decoration-color: #00d7ff\">None</span>, <span style=\"color: #00af00; text-decoration-color: #00af00\">125</span>, <span style=\"color: #00af00; text-decoration-color: #00af00\">9</span>,    │    <span style=\"color: #00af00; text-decoration-color: #00af00\">590,080</span> │ dropout_5[<span style=\"color: #00af00; text-decoration-color: #00af00\">0</span>][<span style=\"color: #00af00; text-decoration-color: #00af00\">0</span>]   │\n│                     │ <span style=\"color: #00af00; text-decoration-color: #00af00\">256</span>)              │            │                   │\n├─────────────────────┼───────────────────┼────────────┼───────────────────┤\n│ conv2d_transpose_1  │ (<span style=\"color: #00d7ff; text-decoration-color: #00d7ff\">None</span>, <span style=\"color: #00af00; text-decoration-color: #00af00\">250</span>, <span style=\"color: #00af00; text-decoration-color: #00af00\">18</span>,   │    <span style=\"color: #00af00; text-decoration-color: #00af00\">131,200</span> │ conv2d_11[<span style=\"color: #00af00; text-decoration-color: #00af00\">0</span>][<span style=\"color: #00af00; text-decoration-color: #00af00\">0</span>]   │\n│ (<span style=\"color: #0087ff; text-decoration-color: #0087ff\">Conv2DTranspose</span>)   │ <span style=\"color: #00af00; text-decoration-color: #00af00\">128</span>)              │            │                   │\n├─────────────────────┼───────────────────┼────────────┼───────────────────┤\n│ concatenate_1       │ (<span style=\"color: #00d7ff; text-decoration-color: #00d7ff\">None</span>, <span style=\"color: #00af00; text-decoration-color: #00af00\">250</span>, <span style=\"color: #00af00; text-decoration-color: #00af00\">18</span>,   │          <span style=\"color: #00af00; text-decoration-color: #00af00\">0</span> │ conv2d_transpose… │\n│ (<span style=\"color: #0087ff; text-decoration-color: #0087ff\">Concatenate</span>)       │ <span style=\"color: #00af00; text-decoration-color: #00af00\">256</span>)              │            │ conv2d_5[<span style=\"color: #00af00; text-decoration-color: #00af00\">0</span>][<span style=\"color: #00af00; text-decoration-color: #00af00\">0</span>]    │\n├─────────────────────┼───────────────────┼────────────┼───────────────────┤\n│ conv2d_12 (<span style=\"color: #0087ff; text-decoration-color: #0087ff\">Conv2D</span>)  │ (<span style=\"color: #00d7ff; text-decoration-color: #00d7ff\">None</span>, <span style=\"color: #00af00; text-decoration-color: #00af00\">250</span>, <span style=\"color: #00af00; text-decoration-color: #00af00\">18</span>,   │    <span style=\"color: #00af00; text-decoration-color: #00af00\">295,040</span> │ concatenate_1[<span style=\"color: #00af00; text-decoration-color: #00af00\">0</span>]… │\n│                     │ <span style=\"color: #00af00; text-decoration-color: #00af00\">128</span>)              │            │                   │\n├─────────────────────┼───────────────────┼────────────┼───────────────────┤\n│ dropout_6 (<span style=\"color: #0087ff; text-decoration-color: #0087ff\">Dropout</span>) │ (<span style=\"color: #00d7ff; text-decoration-color: #00d7ff\">None</span>, <span style=\"color: #00af00; text-decoration-color: #00af00\">250</span>, <span style=\"color: #00af00; text-decoration-color: #00af00\">18</span>,   │          <span style=\"color: #00af00; text-decoration-color: #00af00\">0</span> │ conv2d_12[<span style=\"color: #00af00; text-decoration-color: #00af00\">0</span>][<span style=\"color: #00af00; text-decoration-color: #00af00\">0</span>]   │\n│                     │ <span style=\"color: #00af00; text-decoration-color: #00af00\">128</span>)              │            │                   │\n├─────────────────────┼───────────────────┼────────────┼───────────────────┤\n│ conv2d_13 (<span style=\"color: #0087ff; text-decoration-color: #0087ff\">Conv2D</span>)  │ (<span style=\"color: #00d7ff; text-decoration-color: #00d7ff\">None</span>, <span style=\"color: #00af00; text-decoration-color: #00af00\">250</span>, <span style=\"color: #00af00; text-decoration-color: #00af00\">18</span>,   │    <span style=\"color: #00af00; text-decoration-color: #00af00\">147,584</span> │ dropout_6[<span style=\"color: #00af00; text-decoration-color: #00af00\">0</span>][<span style=\"color: #00af00; text-decoration-color: #00af00\">0</span>]   │\n│                     │ <span style=\"color: #00af00; text-decoration-color: #00af00\">128</span>)              │            │                   │\n├─────────────────────┼───────────────────┼────────────┼───────────────────┤\n│ conv2d_transpose_2  │ (<span style=\"color: #00d7ff; text-decoration-color: #00d7ff\">None</span>, <span style=\"color: #00af00; text-decoration-color: #00af00\">500</span>, <span style=\"color: #00af00; text-decoration-color: #00af00\">36</span>,   │     <span style=\"color: #00af00; text-decoration-color: #00af00\">32,832</span> │ conv2d_13[<span style=\"color: #00af00; text-decoration-color: #00af00\">0</span>][<span style=\"color: #00af00; text-decoration-color: #00af00\">0</span>]   │\n│ (<span style=\"color: #0087ff; text-decoration-color: #0087ff\">Conv2DTranspose</span>)   │ <span style=\"color: #00af00; text-decoration-color: #00af00\">64</span>)               │            │                   │\n├─────────────────────┼───────────────────┼────────────┼───────────────────┤\n│ cropping2d_1        │ (<span style=\"color: #00d7ff; text-decoration-color: #00d7ff\">None</span>, <span style=\"color: #00af00; text-decoration-color: #00af00\">500</span>, <span style=\"color: #00af00; text-decoration-color: #00af00\">35</span>,   │          <span style=\"color: #00af00; text-decoration-color: #00af00\">0</span> │ conv2d_transpose… │\n│ (<span style=\"color: #0087ff; text-decoration-color: #0087ff\">Cropping2D</span>)        │ <span style=\"color: #00af00; text-decoration-color: #00af00\">64</span>)               │            │                   │\n├─────────────────────┼───────────────────┼────────────┼───────────────────┤\n│ concatenate_2       │ (<span style=\"color: #00d7ff; text-decoration-color: #00d7ff\">None</span>, <span style=\"color: #00af00; text-decoration-color: #00af00\">500</span>, <span style=\"color: #00af00; text-decoration-color: #00af00\">35</span>,   │          <span style=\"color: #00af00; text-decoration-color: #00af00\">0</span> │ cropping2d_1[<span style=\"color: #00af00; text-decoration-color: #00af00\">0</span>][<span style=\"color: #00af00; text-decoration-color: #00af00\">…</span> │\n│ (<span style=\"color: #0087ff; text-decoration-color: #0087ff\">Concatenate</span>)       │ <span style=\"color: #00af00; text-decoration-color: #00af00\">128</span>)              │            │ conv2d_3[<span style=\"color: #00af00; text-decoration-color: #00af00\">0</span>][<span style=\"color: #00af00; text-decoration-color: #00af00\">0</span>]    │\n├─────────────────────┼───────────────────┼────────────┼───────────────────┤\n│ conv2d_14 (<span style=\"color: #0087ff; text-decoration-color: #0087ff\">Conv2D</span>)  │ (<span style=\"color: #00d7ff; text-decoration-color: #00d7ff\">None</span>, <span style=\"color: #00af00; text-decoration-color: #00af00\">500</span>, <span style=\"color: #00af00; text-decoration-color: #00af00\">35</span>,   │     <span style=\"color: #00af00; text-decoration-color: #00af00\">73,792</span> │ concatenate_2[<span style=\"color: #00af00; text-decoration-color: #00af00\">0</span>]… │\n│                     │ <span style=\"color: #00af00; text-decoration-color: #00af00\">64</span>)               │            │                   │\n├─────────────────────┼───────────────────┼────────────┼───────────────────┤\n│ dropout_7 (<span style=\"color: #0087ff; text-decoration-color: #0087ff\">Dropout</span>) │ (<span style=\"color: #00d7ff; text-decoration-color: #00d7ff\">None</span>, <span style=\"color: #00af00; text-decoration-color: #00af00\">500</span>, <span style=\"color: #00af00; text-decoration-color: #00af00\">35</span>,   │          <span style=\"color: #00af00; text-decoration-color: #00af00\">0</span> │ conv2d_14[<span style=\"color: #00af00; text-decoration-color: #00af00\">0</span>][<span style=\"color: #00af00; text-decoration-color: #00af00\">0</span>]   │\n│                     │ <span style=\"color: #00af00; text-decoration-color: #00af00\">64</span>)               │            │                   │\n├─────────────────────┼───────────────────┼────────────┼───────────────────┤\n│ conv2d_15 (<span style=\"color: #0087ff; text-decoration-color: #0087ff\">Conv2D</span>)  │ (<span style=\"color: #00d7ff; text-decoration-color: #00d7ff\">None</span>, <span style=\"color: #00af00; text-decoration-color: #00af00\">500</span>, <span style=\"color: #00af00; text-decoration-color: #00af00\">35</span>,   │     <span style=\"color: #00af00; text-decoration-color: #00af00\">36,928</span> │ dropout_7[<span style=\"color: #00af00; text-decoration-color: #00af00\">0</span>][<span style=\"color: #00af00; text-decoration-color: #00af00\">0</span>]   │\n│                     │ <span style=\"color: #00af00; text-decoration-color: #00af00\">64</span>)               │            │                   │\n├─────────────────────┼───────────────────┼────────────┼───────────────────┤\n│ conv2d_transpose_3  │ (<span style=\"color: #00d7ff; text-decoration-color: #00d7ff\">None</span>, <span style=\"color: #00af00; text-decoration-color: #00af00\">1000</span>, <span style=\"color: #00af00; text-decoration-color: #00af00\">70</span>,  │      <span style=\"color: #00af00; text-decoration-color: #00af00\">8,224</span> │ conv2d_15[<span style=\"color: #00af00; text-decoration-color: #00af00\">0</span>][<span style=\"color: #00af00; text-decoration-color: #00af00\">0</span>]   │\n│ (<span style=\"color: #0087ff; text-decoration-color: #0087ff\">Conv2DTranspose</span>)   │ <span style=\"color: #00af00; text-decoration-color: #00af00\">32</span>)               │            │                   │\n├─────────────────────┼───────────────────┼────────────┼───────────────────┤\n│ concatenate_3       │ (<span style=\"color: #00d7ff; text-decoration-color: #00d7ff\">None</span>, <span style=\"color: #00af00; text-decoration-color: #00af00\">1000</span>, <span style=\"color: #00af00; text-decoration-color: #00af00\">70</span>,  │          <span style=\"color: #00af00; text-decoration-color: #00af00\">0</span> │ conv2d_transpose… │\n│ (<span style=\"color: #0087ff; text-decoration-color: #0087ff\">Concatenate</span>)       │ <span style=\"color: #00af00; text-decoration-color: #00af00\">64</span>)               │            │ conv2d_1[<span style=\"color: #00af00; text-decoration-color: #00af00\">0</span>][<span style=\"color: #00af00; text-decoration-color: #00af00\">0</span>]    │\n├─────────────────────┼───────────────────┼────────────┼───────────────────┤\n│ conv2d_16 (<span style=\"color: #0087ff; text-decoration-color: #0087ff\">Conv2D</span>)  │ (<span style=\"color: #00d7ff; text-decoration-color: #00d7ff\">None</span>, <span style=\"color: #00af00; text-decoration-color: #00af00\">1000</span>, <span style=\"color: #00af00; text-decoration-color: #00af00\">70</span>,  │     <span style=\"color: #00af00; text-decoration-color: #00af00\">18,464</span> │ concatenate_3[<span style=\"color: #00af00; text-decoration-color: #00af00\">0</span>]… │\n│                     │ <span style=\"color: #00af00; text-decoration-color: #00af00\">32</span>)               │            │                   │\n├─────────────────────┼───────────────────┼────────────┼───────────────────┤\n│ dropout_8 (<span style=\"color: #0087ff; text-decoration-color: #0087ff\">Dropout</span>) │ (<span style=\"color: #00d7ff; text-decoration-color: #00d7ff\">None</span>, <span style=\"color: #00af00; text-decoration-color: #00af00\">1000</span>, <span style=\"color: #00af00; text-decoration-color: #00af00\">70</span>,  │          <span style=\"color: #00af00; text-decoration-color: #00af00\">0</span> │ conv2d_16[<span style=\"color: #00af00; text-decoration-color: #00af00\">0</span>][<span style=\"color: #00af00; text-decoration-color: #00af00\">0</span>]   │\n│                     │ <span style=\"color: #00af00; text-decoration-color: #00af00\">32</span>)               │            │                   │\n├─────────────────────┼───────────────────┼────────────┼───────────────────┤\n│ conv2d_17 (<span style=\"color: #0087ff; text-decoration-color: #0087ff\">Conv2D</span>)  │ (<span style=\"color: #00d7ff; text-decoration-color: #00d7ff\">None</span>, <span style=\"color: #00af00; text-decoration-color: #00af00\">1000</span>, <span style=\"color: #00af00; text-decoration-color: #00af00\">70</span>,  │      <span style=\"color: #00af00; text-decoration-color: #00af00\">9,248</span> │ dropout_8[<span style=\"color: #00af00; text-decoration-color: #00af00\">0</span>][<span style=\"color: #00af00; text-decoration-color: #00af00\">0</span>]   │\n│                     │ <span style=\"color: #00af00; text-decoration-color: #00af00\">32</span>)               │            │                   │\n├─────────────────────┼───────────────────┼────────────┼───────────────────┤\n│ conv2d_18 (<span style=\"color: #0087ff; text-decoration-color: #0087ff\">Conv2D</span>)  │ (<span style=\"color: #00d7ff; text-decoration-color: #00d7ff\">None</span>, <span style=\"color: #00af00; text-decoration-color: #00af00\">1000</span>, <span style=\"color: #00af00; text-decoration-color: #00af00\">70</span>,  │         <span style=\"color: #00af00; text-decoration-color: #00af00\">33</span> │ conv2d_17[<span style=\"color: #00af00; text-decoration-color: #00af00\">0</span>][<span style=\"color: #00af00; text-decoration-color: #00af00\">0</span>]   │\n│                     │ <span style=\"color: #00af00; text-decoration-color: #00af00\">1</span>)                │            │                   │\n├─────────────────────┼───────────────────┼────────────┼───────────────────┤\n│ resizing (<span style=\"color: #0087ff; text-decoration-color: #0087ff\">Resizing</span>) │ (<span style=\"color: #00d7ff; text-decoration-color: #00d7ff\">None</span>, <span style=\"color: #00af00; text-decoration-color: #00af00\">70</span>, <span style=\"color: #00af00; text-decoration-color: #00af00\">70</span>, <span style=\"color: #00af00; text-decoration-color: #00af00\">1</span>) │          <span style=\"color: #00af00; text-decoration-color: #00af00\">0</span> │ conv2d_18[<span style=\"color: #00af00; text-decoration-color: #00af00\">0</span>][<span style=\"color: #00af00; text-decoration-color: #00af00\">0</span>]   │\n├─────────────────────┼───────────────────┼────────────┼───────────────────┤\n│ reshape (<span style=\"color: #0087ff; text-decoration-color: #0087ff\">Reshape</span>)   │ (<span style=\"color: #00d7ff; text-decoration-color: #00d7ff\">None</span>, <span style=\"color: #00af00; text-decoration-color: #00af00\">70</span>, <span style=\"color: #00af00; text-decoration-color: #00af00\">70</span>)    │          <span style=\"color: #00af00; text-decoration-color: #00af00\">0</span> │ resizing[<span style=\"color: #00af00; text-decoration-color: #00af00\">0</span>][<span style=\"color: #00af00; text-decoration-color: #00af00\">0</span>]    │\n└─────────────────────┴───────────────────┴────────────┴───────────────────┘\n</pre>\n"},"metadata":{}},{"output_type":"display_data","data":{"text/plain":"\u001b[1m Total params: \u001b[0m\u001b[38;5;34m7,760,673\u001b[0m (29.60 MB)\n","text/html":"<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\"> Total params: </span><span style=\"color: #00af00; text-decoration-color: #00af00\">7,760,673</span> (29.60 MB)\n</pre>\n"},"metadata":{}},{"output_type":"display_data","data":{"text/plain":"\u001b[1m Trainable params: \u001b[0m\u001b[38;5;34m7,760,673\u001b[0m (29.60 MB)\n","text/html":"<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\"> Trainable params: </span><span style=\"color: #00af00; text-decoration-color: #00af00\">7,760,673</span> (29.60 MB)\n</pre>\n"},"metadata":{}},{"output_type":"display_data","data":{"text/plain":"\u001b[1m Non-trainable params: \u001b[0m\u001b[38;5;34m0\u001b[0m (0.00 B)\n","text/html":"<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\"> Non-trainable params: </span><span style=\"color: #00af00; text-decoration-color: #00af00\">0</span> (0.00 B)\n</pre>\n"},"metadata":{}},{"name":"stdout","text":"Epoch 1: Setting physics loss weight to 0.200\nEpoch 1/50\n","output_type":"stream"},{"name":"stderr","text":"/usr/local/lib/python3.10/site-packages/keras/src/models/functional.py:238: UserWarning: The structure of `inputs` doesn't match the expected structure.\nExpected: ['keras_tensor']\nReceived: inputs=Tensor(shape=(None, 1000, 70, 5))\n  warnings.warn(msg)\n","output_type":"stream"},{"name":"stdout","text":"\u001b[1m 43/319\u001b[0m \u001b[32m━━\u001b[0m\u001b[37m━━━━━━━━━━━━━━━━━━\u001b[0m \u001b[1m1:06:29\u001b[0m 14s/step - loss: 0.2437 - normalized_mae: 0.2838","output_type":"stream"}],"execution_count":null},{"cell_type":"code","source":"import tensorflow as tf\nprint(tf.__version__)","metadata":{"trusted":true,"execution":{"iopub.status.busy":"2025-05-22T06:23:24.71264Z","iopub.execute_input":"2025-05-22T06:23:24.712951Z","iopub.status.idle":"2025-05-22T06:23:28.972686Z","shell.execute_reply.started":"2025-05-22T06:23:24.71289Z","shell.execute_reply":"2025-05-22T06:23:28.967966Z"}},"outputs":[{"name":"stderr","text":"2025-05-22 06:23:25.052655: E external/local_xla/xla/stream_executor/cuda/cuda_fft.cc:467] Unable to register cuFFT factory: Attempting to register factory for plugin cuFFT when one has already been registered\nWARNING: All log messages before absl::InitializeLog() is called are written to STDERR\nE0000 00:00:1747895005.080126    1087 cuda_dnn.cc:8579] Unable to register cuDNN factory: Attempting to register factory for plugin cuDNN when one has already been registered\nE0000 00:00:1747895005.091872    1087 cuda_blas.cc:1407] Unable to register cuBLAS factory: Attempting to register factory for plugin cuBLAS when one has already been registered\nW0000 00:00:1747895005.115600    1087 computation_placer.cc:177] computation placer already registered. Please check linkage and avoid linking the same target more than once.\nW0000 00:00:1747895005.115623    1087 computation_placer.cc:177] computation placer already registered. Please check linkage and avoid linking the same target more than once.\nW0000 00:00:1747895005.115625    1087 computation_placer.cc:177] computation placer already registered. Please check linkage and avoid linking the same target more than once.\nW0000 00:00:1747895005.115640    1087 computation_placer.cc:177] computation placer already registered. Please check linkage and avoid linking the same target more than once.\n","output_type":"stream"},{"name":"stdout","text":"2.19.0\n","output_type":"stream"}],"execution_count":1}]}