In [1]:
import os
import time
import shutil
import numpy as np
import rasterio
from rasterio.windows import from_bounds
import cv2
import ee
import geemap
from google.colab import drive
from sklearn.model_selection import train_test_split
os.system('pip install -q geedim geemap')
drive.mount('/content/drive', force_remount=True)
# CONFIGURATION
MY_PROJECT_ID = '[REDACTED_FOR_SECURITY]' #[REDACTED_FOR_SECURITY]
ASSET_ID = 'projects/[REDACTED_FOR_SECURITY]/assets/WheatMasks/binary_Punjab_Wheat_2024_Sieved'
SAVE_DIR = '/content/drive/MyDrive/SatMAE_PartialFT_Results_1/'
if not os.path.exists(SAVE_DIR):
os.makedirs(SAVE_DIR)
# EARTH ENGINE INIT
try:
ee.Initialize(project=MY_PROJECT_ID)
print("Earth Engine Initialized.")
except Exception as e:
ee.Authenticate()
ee.Initialize(project=MY_PROJECT_ID)
print("Earth Engine Authenticated & Initialized.")
# CONSTANTS
PATCH_SIZE = 224
S2_SCALE = 10000.0
TIME_WINDOWS = [
('2024-10-15', '2024-11-15'),
('2025-01-01', '2025-01-31'),
('2025-02-15', '2025-03-15')
]
def generate_satmae_partial_data():
print("Starting SatMAE Partial FT Data Generation...")
# 1. Mask
mask_img = ee.Image(ASSET_ID)
roi_geom = mask_img.geometry()
mask_file = 'local_mask_satmae.tif'
if not os.path.exists(mask_file):
geemap.download_ee_image(mask_img, mask_file, region=roi_geom, scale=10, crs='EPSG:4326', overwrite=True)
with rasterio.open(mask_file) as src:
b = src.bounds
cx, cy = (b.left + b.right)/2, (b.bottom + b.top)/2
offset = 0.04
window = from_bounds(cx-offset, cy-offset, cx+offset, cy+offset, src.transform)
mask = src.read(1, window=window)
mask = np.where(mask > 0, 1.0, 0.0).astype(np.float32)
target_h, target_w = mask.shape
small_roi = ee.Geometry.BBox(cx-offset, cy-offset, cx+offset, cy+offset)
# 2. Imagery
stack = []
for i, (start, end) in enumerate(TIME_WINDOWS):
fname = f'satmae_time_{i}.tif'
attempts = 0
while not os.path.exists(fname) and attempts < 3:
try:
print(f"Downloading T{i+1}: {start} to {end}...")
img = ee.ImageCollection('COPERNICUS/S2_SR_HARMONIZED').filterBounds(small_roi).filterDate(start, end).median().select(['B2','B3','B4','B8','B11','B12'])
geemap.download_ee_image(img, fname, region=small_roi, scale=10, crs='EPSG:4326', overwrite=True)
except:
attempts += 1
time.sleep(2)
if not os.path.exists(fname):
with rasterio.open(mask_file) as src:
profile = src.profile
profile.update(count=6, dtype=rasterio.float32)
with rasterio.open(fname, 'w', **profile) as dst:
dst.write(np.zeros((6, target_h, target_w), dtype=np.float32))
with rasterio.open(fname) as src:
arr = src.read()
arr = np.transpose(arr, (1, 2, 0))
if arr.shape[:2] != (target_h, target_w):
arr = cv2.resize(arr, (target_w, target_h), interpolation=cv2.INTER_LINEAR)
arr = np.clip(arr / S2_SCALE, 0, 1).astype(np.float32)
stack.append(arr)
# 3. Tiling
full_cube = np.stack(stack, axis=2)
x_out, y_out = [], []
stride = PATCH_SIZE
for y in range(0, target_h, stride):
for x in range(0, target_w, stride):
img_p = full_cube[y:y+stride, x:x+stride]
mask_p = mask[y:y+stride, x:x+stride]
if img_p.shape[0] != PATCH_SIZE or img_p.shape[1] != PATCH_SIZE: continue
if np.mean(mask_p) < 0.01 or np.isnan(img_p).any(): continue
x_out.append(img_p)
y_out.append(mask_p)
X = np.array(x_out, dtype=np.float32).transpose(0, 4, 3, 1, 2)
y = np.array(y_out, dtype=np.float32)[:, None, :, :]
print(f"Dataset Generated. Shape: {X.shape}")
X_train, X_val, y_train, y_val = train_test_split(X, y, test_size=0.2, random_state=42)
np.save(os.path.join(SAVE_DIR, 'train_x.npy'), X_train)
np.save(os.path.join(SAVE_DIR, 'train_y.npy'), y_train)
np.save(os.path.join(SAVE_DIR, 'val_x.npy'), X_val)
np.save(os.path.join(SAVE_DIR, 'val_y.npy'), y_val)
print("Done.")
generate_satmae_partial_data()
Mounted at /content/drive Earth Engine Authenticated & Initialized. Starting SatMAE Partial FT Data Generation...
/usr/local/lib/python3.12/dist-packages/geemap/common.py:12471: FutureWarning: 'BaseImage' is deprecated and will be removed in a future release. Please use the 'ee.Image.gd' accessor instead. img = gd.download.BaseImage(image)
...Masks/binary_Punjab_Wheat_2024_Sieved: 0%| |0/585 tiles [00:00<?]
WARNING:urllib3.connectionpool:Connection pool is full, discarding connection: earthengine.googleapis.com. Connection pool size: 10 WARNING:urllib3.connectionpool:Connection pool is full, discarding connection: earthengine.googleapis.com. Connection pool size: 10 WARNING:urllib3.connectionpool:Connection pool is full, discarding connection: earthengine.googleapis.com. Connection pool size: 10 WARNING:urllib3.connectionpool:Connection pool is full, discarding connection: earthengine.googleapis.com. Connection pool size: 10 WARNING:urllib3.connectionpool:Connection pool is full, discarding connection: earthengine.googleapis.com. Connection pool size: 10 WARNING:urllib3.connectionpool:Connection pool is full, discarding connection: earthengine.googleapis.com. Connection pool size: 10 WARNING:urllib3.connectionpool:Connection pool is full, discarding connection: earthengine.googleapis.com. Connection pool size: 10 WARNING:urllib3.connectionpool:Connection pool is full, discarding connection: earthengine.googleapis.com. Connection pool size: 10 WARNING:urllib3.connectionpool:Connection pool is full, discarding connection: earthengine.googleapis.com. Connection pool size: 10 WARNING:urllib3.connectionpool:Connection pool is full, discarding connection: earthengine.googleapis.com. Connection pool size: 10 WARNING:urllib3.connectionpool:Connection pool is full, discarding connection: earthengine.googleapis.com. Connection pool size: 10 WARNING:urllib3.connectionpool:Connection pool is full, discarding connection: earthengine.googleapis.com. Connection pool size: 10 WARNING:urllib3.connectionpool:Connection pool is full, discarding connection: earthengine.googleapis.com. Connection pool size: 10 WARNING:urllib3.connectionpool:Connection pool is full, discarding connection: earthengine.googleapis.com. Connection pool size: 10 WARNING:urllib3.connectionpool:Connection pool is full, discarding connection: earthengine.googleapis.com. Connection pool size: 10 WARNING:urllib3.connectionpool:Connection pool is full, discarding connection: earthengine.googleapis.com. Connection pool size: 10 WARNING:urllib3.connectionpool:Connection pool is full, discarding connection: earthengine.googleapis.com. Connection pool size: 10 WARNING:urllib3.connectionpool:Connection pool is full, discarding connection: earthengine.googleapis.com. Connection pool size: 10 WARNING:urllib3.connectionpool:Connection pool is full, discarding connection: earthengine.googleapis.com. Connection pool size: 10 WARNING:urllib3.connectionpool:Connection pool is full, discarding connection: earthengine.googleapis.com. Connection pool size: 10 WARNING:urllib3.connectionpool:Connection pool is full, discarding connection: earthengine.googleapis.com. Connection pool size: 10 WARNING:urllib3.connectionpool:Connection pool is full, discarding connection: earthengine.googleapis.com. Connection pool size: 10 WARNING:urllib3.connectionpool:Connection pool is full, discarding connection: earthengine.googleapis.com. Connection pool size: 10 WARNING:urllib3.connectionpool:Connection pool is full, discarding connection: earthengine.googleapis.com. Connection pool size: 10 WARNING:urllib3.connectionpool:Connection pool is full, discarding connection: earthengine.googleapis.com. Connection pool size: 10 WARNING:urllib3.connectionpool:Connection pool is full, discarding connection: earthengine.googleapis.com. Connection pool size: 10 WARNING:urllib3.connectionpool:Connection pool is full, discarding connection: earthengine.googleapis.com. Connection pool size: 10 WARNING:urllib3.connectionpool:Connection pool is full, discarding connection: earthengine.googleapis.com. Connection pool size: 10 WARNING:urllib3.connectionpool:Connection pool is full, discarding connection: earthengine.googleapis.com. Connection pool size: 10 WARNING:urllib3.connectionpool:Connection pool is full, discarding connection: earthengine.googleapis.com. Connection pool size: 10 WARNING:urllib3.connectionpool:Connection pool is full, discarding connection: earthengine.googleapis.com. Connection pool size: 10 WARNING:urllib3.connectionpool:Connection pool is full, discarding connection: earthengine.googleapis.com. Connection pool size: 10 WARNING:urllib3.connectionpool:Connection pool is full, discarding connection: earthengine.googleapis.com. Connection pool size: 10 WARNING:urllib3.connectionpool:Connection pool is full, discarding connection: earthengine.googleapis.com. Connection pool size: 10 WARNING:urllib3.connectionpool:Connection pool is full, discarding connection: earthengine.googleapis.com. Connection pool size: 10 /usr/local/lib/python3.12/dist-packages/geedim/image.py:254: RuntimeWarning: Couldn't find STAC entry for: 'projects/phd0-473604/assets/WheatMasks/binary_Punjab_Wheat_2024_Sieved'. return STACClient().get(self.id)
Downloading T1: 2024-10-15 to 2024-11-15...
0%| |0/12 tiles [00:00<?]
WARNING:urllib3.connectionpool:Connection pool is full, discarding connection: earthengine.googleapis.com. Connection pool size: 10 WARNING:urllib3.connectionpool:Connection pool is full, discarding connection: earthengine.googleapis.com. Connection pool size: 10 /usr/local/lib/python3.12/dist-packages/geedim/image.py:254: RuntimeWarning: Couldn't find STAC entry for: 'None'. return STACClient().get(self.id)
Downloading T2: 2025-01-01 to 2025-01-31...
0%| |0/12 tiles [00:00<?]
WARNING:urllib3.connectionpool:Connection pool is full, discarding connection: earthengine.googleapis.com. Connection pool size: 10 WARNING:urllib3.connectionpool:Connection pool is full, discarding connection: earthengine.googleapis.com. Connection pool size: 10
Downloading T3: 2025-02-15 to 2025-03-15...
0%| |0/12 tiles [00:00<?]
WARNING:urllib3.connectionpool:Connection pool is full, discarding connection: earthengine.googleapis.com. Connection pool size: 10 WARNING:urllib3.connectionpool:Connection pool is full, discarding connection: earthengine.googleapis.com. Connection pool size: 10
Dataset Generated. Shape: (9, 6, 3, 224, 224) Done.
In [ ]:
import torch
import torch.nn as nn
from huggingface_hub import hf_hub_download
class SatMAEPatchEmbed(nn.Module):
def __init__(self, in_chans=6, embed_dim=768, patch_size=16):
super().__init__()
self.proj = nn.Conv2d(in_chans, embed_dim, kernel_size=patch_size, stride=patch_size)
def forward(self, x):
B, C, T, H, W = x.shape
x = x.permute(0, 2, 1, 3, 4).reshape(B * T, C, H, W)
x = self.proj(x).flatten(2).transpose(1, 2)
x = x.reshape(B, T, -1, x.shape[-1])
return x
class SatMAEBackbone(nn.Module):
def __init__(self, num_frames=3, in_chans=6, embed_dim=768, depth=12, num_heads=12):
super().__init__()
self.patch_embed = SatMAEPatchEmbed(in_chans=in_chans, embed_dim=embed_dim)
num_patches = (224 // 16) ** 2
self.pos_embed = nn.Parameter(torch.zeros(1, 1, num_patches + 1, embed_dim))
self.time_embed = nn.Parameter(torch.zeros(1, num_frames, 1, embed_dim))
self.cls_token = nn.Parameter(torch.zeros(1, 1, 1, embed_dim))
encoder_layer = nn.TransformerEncoderLayer(d_model=embed_dim, nhead=num_heads, dim_feedforward=embed_dim*4, activation="gelu", batch_first=True, norm_first=True)
self.blocks = nn.TransformerEncoder(encoder_layer, num_layers=depth)
self.norm = nn.LayerNorm(embed_dim)
def forward(self, x):
x = self.patch_embed(x)
B, T, N, D = x.shape
x = x + self.time_embed
x = x.reshape(B, T*N, D)
spatial_pos = self.pos_embed[:, :, 1:, :].expand(B, T, -1, -1).reshape(B, T*N, D)
x = x + spatial_pos
cls_token = self.cls_token.expand(B, -1, -1, -1).reshape(B, 1, D) + self.pos_embed[:, :, 0, :].expand(B, 1, D)
x = torch.cat((cls_token, x), dim=1)
x = self.blocks(x)
x = self.norm(x)
return x
class SatMAESegmentation(nn.Module):
def __init__(self, num_frames=3, in_chans=6, embed_dim=768):
super().__init__()
print("Initializing SatMAE Partial FT Model...")
self.num_frames = num_frames
self.backbone = SatMAEBackbone(num_frames=num_frames, in_chans=in_chans, embed_dim=embed_dim)
# --- AUTOMATIC WEIGHT LOADING ---
print("Downloading Pretrained MAE Weights (facebook/vit-mae-base)...")
try:
p = hf_hub_download("facebook/vit-mae-base", "pytorch_model.bin")
sd = torch.load(p, map_location='cpu')
new_sd = {}
for k, v in sd.items():
# Adapt Patch Embeddings (3 Ch -> 6 Ch)
if 'patch_embed.proj.weight' in k:
print(f" Adapting Weights: {v.shape} -> 6 Channels")
new_w = torch.zeros(768, in_chans, 16, 16)
new_w[:, :3, :, :] = v # Copy RGB
# Initialize Bands 4-6 with average of RGB
new_w[:, 3:, :, :] = v.mean(dim=1, keepdim=True).repeat(1, in_chans-3, 1, 1)
new_sd['backbone.patch_embed.proj.weight'] = new_w
continue
if 'patch_embed.proj.bias' in k:
new_sd['backbone.patch_embed.proj.bias'] = v
continue
# Backbone Block Mapping
if 'blocks.' in k:
new_k = f"backbone.{k.replace('blocks.', 'blocks.layers.')}"
new_k = new_k.replace('mlp.fc1', 'linear1')
new_k = new_k.replace('mlp.fc2', 'linear2')
new_sd[new_k] = v
elif 'norm.' in k:
new_sd[f"backbone.{k}"] = v
elif 'pos_embed' in k:
if v.shape == self.backbone.pos_embed.shape:
new_sd['backbone.pos_embed'] = v
elif 'cls_token' in k:
new_sd['backbone.cls_token'] = v
missing, unexpected = self.backbone.load_state_dict(new_sd, strict=False)
print(f"Weights Loaded! (Matched {len(new_sd)} keys)")
except Exception as e:
print(f"Weight Download Failed: {e}. Using Random Initialization.")
# --- PARTIAL FREEZE STRATEGY (10 Frozen / 2 Unfrozen) ---
print("Applying Partial Freeze Strategy...")
# 1. Freeze ALL Blocks initially
for param in self.backbone.blocks.parameters():
param.requires_grad = False
# 2. Unfreeze Last 2 Blocks (Layers 10 and 11)
print("Unfreezing Last 2 Encoder Blocks...")
for layer in self.backbone.blocks.layers[-2:]:
for param in layer.parameters():
param.requires_grad = True
# 3. Unfreeze Embeddings & Norms
self.backbone.patch_embed.proj.weight.requires_grad = True
self.backbone.pos_embed.requires_grad = True
self.backbone.time_embed.requires_grad = True
self.backbone.cls_token.requires_grad = True
self.backbone.norm.weight.requires_grad = True
self.backbone.norm.bias.requires_grad = True
# 4. Decoder
self.temporal_agg = nn.Conv2d(embed_dim * num_frames, embed_dim, kernel_size=1)
self.decoder = nn.Sequential(
nn.Upsample(scale_factor=2), nn.Conv2d(embed_dim, 256, 3, 1, 1), nn.BatchNorm2d(256), nn.GELU(),
nn.Upsample(scale_factor=2), nn.Conv2d(256, 128, 3, 1, 1), nn.BatchNorm2d(128), nn.GELU(),
nn.Upsample(scale_factor=2), nn.Conv2d(128, 64, 3, 1, 1), nn.BatchNorm2d(64), nn.GELU(),
nn.Upsample(scale_factor=2), nn.Conv2d(64, 32, 3, 1, 1), nn.BatchNorm2d(32), nn.GELU(),
nn.Conv2d(32, 1, 1)
)
def forward(self, x):
features = self.backbone(x)[:, 1:, :]
B, L, D = features.shape
H_p = 14
features = features.view(B, self.num_frames, H_p, H_p, D)
features = features.permute(0, 1, 4, 2, 3).reshape(B, self.num_frames * D, H_p, H_p)
features = self.temporal_agg(features)
return self.decoder(features)
In [ ]:
import torch.optim as optim
import torch.optim.swa_utils as swa_utils
from torch.utils.data import Dataset, DataLoader
from scipy.ndimage import distance_transform_edt as distance
import numpy as np
import glob
def apply_augmentation(x, y):
if np.random.rand() > 0.5: x = torch.flip(x, [4]); y = torch.flip(y, [3])
if np.random.rand() > 0.5: x = torch.flip(x, [3]); y = torch.flip(y, [2])
return x, y
def manage_rolling_checkpoints(save_dir, keep_k=5):
files = sorted(glob.glob(os.path.join(save_dir, "epoch_*.pth")), key=os.path.getmtime)
if len(files) > keep_k:
for f in files[:-keep_k]: os.remove(f)
class DiceLoss(nn.Module):
def __init__(self, smooth=1e-6): super().__init__(); self.smooth = smooth
def forward(self, inputs, targets):
inputs = torch.sigmoid(inputs).reshape(-1); targets = targets.reshape(-1)
inter = (inputs * targets).sum()
return 1 - (2. * inter + self.smooth) / (inputs.sum() + targets.sum() + self.smooth)
class HausdorffDTLoss(nn.Module):
def __init__(self, alpha=2.0): super().__init__(); self.alpha = alpha
def forward(self, pred, gt):
with torch.no_grad():
gt_np = gt.cpu().numpy(); dist_map = np.zeros_like(gt_np)
for i in range(len(gt_np)):
mask = (gt_np[i, 0] > 0.5).astype(np.uint8)
if mask.sum() == 0: continue
d_in = distance(mask); d_out = distance(1 - mask)
dist_map[i, 0] = (d_out - d_in)
dist_map = torch.tensor(dist_map, device=pred.device, dtype=torch.float32)
return torch.mean((torch.sigmoid(pred) - gt) ** 2 * (1 + self.alpha * torch.abs(dist_map)))
class CompoundLoss(nn.Module):
def __init__(self): super().__init__(); self.dice = DiceLoss(); self.boundary = HausdorffDTLoss()
def forward(self, p, t): return 0.7*self.dice(p, t) + 0.3*self.boundary(p, t)
In [ ]:
import torch
import torch.nn as nn
import torch.optim as optim
import torch.optim.swa_utils as swa_utils
from torch.utils.data import Dataset, DataLoader
import numpy as np
import os
import glob
import re
from google.colab import auth
from googleapiclient.discovery import build
from googleapiclient.errors import HttpError
from huggingface_hub import hf_hub_download
# ==========================================
# 1. TRASH CLEANER SETUP
# ==========================================
try:
print("Authenticating for Trash Cleaner...")
auth.authenticate_user()
except:
print(" Authentication skipped/failed. Trash cleaning might not work.")
def empty_trash_specific(keyword="epoch"):
"""Permanently deletes files from Drive Trash matching the keyword."""
try:
service = build('drive', 'v3')
query = f"trashed = true and name contains '{keyword}'"
results = service.files().list(q=query, fields="files(id, name)").execute()
items = results.get('files', [])
if not items:
print(f" Trash is clean.")
return
print(f" Deleting {len(items)} '{keyword}' files from Trash...")
for item in items:
try:
service.files().delete(fileId=item['id']).execute()
except:
pass
print(" Trash Purged.")
except Exception as e:
print(f" Trash Error: {e}")
# ==========================================
# 2. MODEL DEFINITION (PARTIAL FINE-TUNE)
# ==========================================
class SatMAEPatchEmbed(nn.Module):
def __init__(self, in_chans=6, embed_dim=768, patch_size=16):
super().__init__()
self.proj = nn.Conv2d(in_chans, embed_dim, kernel_size=patch_size, stride=patch_size)
def forward(self, x):
B, C, T, H, W = x.shape
x = x.permute(0, 2, 1, 3, 4).reshape(B * T, C, H, W)
x = self.proj(x).flatten(2).transpose(1, 2)
x = x.reshape(B, T, -1, x.shape[-1])
return x
class SatMAEBackbone(nn.Module):
def __init__(self, num_frames=3, in_chans=6, embed_dim=768, depth=12, num_heads=12):
super().__init__()
self.patch_embed = SatMAEPatchEmbed(in_chans=in_chans, embed_dim=embed_dim)
num_patches = (224 // 16) ** 2
self.pos_embed = nn.Parameter(torch.zeros(1, 1, num_patches + 1, embed_dim))
self.time_embed = nn.Parameter(torch.zeros(1, num_frames, 1, embed_dim))
self.cls_token = nn.Parameter(torch.zeros(1, 1, 1, embed_dim))
encoder_layer = nn.TransformerEncoderLayer(d_model=embed_dim, nhead=num_heads, dim_feedforward=embed_dim*4, activation="gelu", batch_first=True, norm_first=True)
self.blocks = nn.TransformerEncoder(encoder_layer, num_layers=depth)
self.norm = nn.LayerNorm(embed_dim)
def forward(self, x):
x = self.patch_embed(x)
B, T, N, D = x.shape
x = x + self.time_embed
x = x.reshape(B, T*N, D)
spatial_pos = self.pos_embed[:, :, 1:, :].expand(B, T, -1, -1).reshape(B, T*N, D)
x = x + spatial_pos
cls_token = self.cls_token.expand(B, -1, -1, -1).reshape(B, 1, D) + self.pos_embed[:, :, 0, :].expand(B, 1, D)
x = torch.cat((cls_token, x), dim=1)
x = self.blocks(x)
x = self.norm(x)
return x
class SatMAESegmentation(nn.Module):
def __init__(self, num_frames=3, in_chans=6, embed_dim=768):
super().__init__()
print(" Initializing SatMAE Partial FT Model...")
self.num_frames = num_frames
self.backbone = SatMAEBackbone(num_frames=num_frames, in_chans=in_chans, embed_dim=embed_dim)
# --- AUTOMATIC WEIGHT LOADING ---
print(" Downloading Pretrained MAE Weights (facebook/vit-mae-base)...")
try:
p = hf_hub_download("facebook/vit-mae-base", "pytorch_model.bin")
sd = torch.load(p, map_location='cpu')
new_sd = {}
for k, v in sd.items():
if 'patch_embed.proj.weight' in k:
new_w = torch.zeros(768, in_chans, 16, 16)
new_w[:, :3, :, :] = v # Copy RGB
new_w[:, 3:, :, :] = v.mean(dim=1, keepdim=True).repeat(1, in_chans-3, 1, 1)
new_sd['backbone.patch_embed.proj.weight'] = new_w
elif 'patch_embed.proj.bias' in k:
new_sd['backbone.patch_embed.proj.bias'] = v
elif 'blocks.' in k:
new_k = f"backbone.{k.replace('blocks.', 'blocks.layers.')}"
new_k = new_k.replace('mlp.fc1', 'linear1').replace('mlp.fc2', 'linear2')
new_sd[new_k] = v
elif 'norm.' in k: new_sd[f"backbone.{k}"] = v
elif 'pos_embed' in k:
if v.shape == self.backbone.pos_embed.shape: new_sd['backbone.pos_embed'] = v
elif 'cls_token' in k: new_sd['backbone.cls_token'] = v
self.backbone.load_state_dict(new_sd, strict=False)
print(f" Weights Loaded!")
except Exception as e:
print(f" Weight Download Failed: {e}. Random Init.")
# --- PARTIAL FREEZE STRATEGY (10 Frozen / 2 Unfrozen) ---
print("Applying Partial Freeze Strategy...")
# 1. Freeze ALL Blocks initially
for param in self.backbone.blocks.parameters():
param.requires_grad = False
# 2. Unfreeze Last 2 Blocks (Layers 10 and 11)
print(" Unfreezing Last 2 Encoder Blocks...")
for layer in self.backbone.blocks.layers[-2:]:
for param in layer.parameters():
param.requires_grad = True
# 3. Unfreeze Embeddings & Norms
self.backbone.patch_embed.proj.weight.requires_grad = True
self.backbone.pos_embed.requires_grad = True
self.backbone.time_embed.requires_grad = True
self.backbone.cls_token.requires_grad = True
self.backbone.norm.weight.requires_grad = True
self.backbone.norm.bias.requires_grad = True
# 4. Decoder
self.temporal_agg = nn.Conv2d(embed_dim * num_frames, embed_dim, kernel_size=1)
self.decoder = nn.Sequential(
nn.Upsample(scale_factor=2), nn.Conv2d(embed_dim, 256, 3, 1, 1), nn.BatchNorm2d(256), nn.GELU(),
nn.Upsample(scale_factor=2), nn.Conv2d(256, 128, 3, 1, 1), nn.BatchNorm2d(128), nn.GELU(),
nn.Upsample(scale_factor=2), nn.Conv2d(128, 64, 3, 1, 1), nn.BatchNorm2d(64), nn.GELU(),
nn.Upsample(scale_factor=2), nn.Conv2d(64, 32, 3, 1, 1), nn.BatchNorm2d(32), nn.GELU(),
nn.Conv2d(32, 1, 1)
)
def forward(self, x):
features = self.backbone(x)[:, 1:, :]
B, L, D = features.shape
features = features.view(B, self.num_frames, 14, 14, D)
features = features.permute(0, 1, 4, 2, 3).reshape(B, self.num_frames * D, 14, 14)
features = self.temporal_agg(features)
return self.decoder(features)
# ==========================================
# 3. CONFIGURATION & SETUP
# ==========================================
SAVE_DIR = '/content/drive/MyDrive/SatMAE_PartialFT_Results_1/'
CHECKPOINT_PATH = os.path.join(SAVE_DIR, "checkpoint_satmae_partial.pth")
BATCH_SIZE = 8
EPOCHS = 5000
PATIENCE_TRIGGER = 150
SWA_DURATION = 50
device = torch.device('cuda' if torch.cuda.is_available() else 'cpu')
print(f"Device: {device}")
model = SatMAESegmentation(num_frames=3, in_chans=6).to(device)
criterion = CompoundLoss()
optimizer = optim.AdamW(filter(lambda p: p.requires_grad, model.parameters()), lr=1e-4)
scheduler = optim.lr_scheduler.CosineAnnealingWarmRestarts(optimizer, T_0=50, T_mult=2)
swa_model = swa_utils.AveragedModel(model)
swa_scheduler = swa_utils.SWALR(optimizer, swa_lr=5e-5)
class MmapDataset(Dataset):
def __init__(self, x_path, y_path):
self.data = np.load(x_path, mmap_mode='r')
self.target = np.load(y_path, mmap_mode='r')
def __len__(self): return len(self.data)
def __getitem__(self, index):
return torch.from_numpy(self.data[index].copy()), torch.from_numpy(self.target[index].copy())
if not os.path.exists(SAVE_DIR): os.makedirs(SAVE_DIR)
train_ds = MmapDataset(os.path.join(SAVE_DIR, 'train_x.npy'), os.path.join(SAVE_DIR, 'train_y.npy'))
val_ds = MmapDataset(os.path.join(SAVE_DIR, 'val_x.npy'), os.path.join(SAVE_DIR, 'val_y.npy'))
train_loader = DataLoader(train_ds, BATCH_SIZE, shuffle=True)
val_loader = DataLoader(val_ds, BATCH_SIZE, shuffle=False)
# ==========================================
# 4. ROBUST RESUME LOGIC
# ==========================================
start_epoch = 0; best_loss = float('inf'); patience_counter = 0; swa_active = False; swa_epoch_counter = 0
if os.path.exists(CHECKPOINT_PATH):
try:
print(f"Attempting to load main checkpoint: {CHECKPOINT_PATH}")
ckpt = torch.load(CHECKPOINT_PATH, map_location=device)
model.load_state_dict(ckpt['model_state_dict'])
optimizer.load_state_dict(ckpt['optimizer_state_dict'])
start_epoch = ckpt['epoch'] + 1
best_loss = ckpt['best_loss']
patience_counter = ckpt.get('patience_counter', 0)
swa_active = ckpt.get('swa_active', False)
swa_epoch_counter = ckpt.get('swa_epoch_counter', 0)
print(" Main checkpoint loaded successfully.")
except Exception as e:
print(f" Main checkpoint corrupted. Searching for backups...")
epoch_files = glob.glob(os.path.join(SAVE_DIR, "epoch_*.pth"))
if epoch_files:
latest_file = max(epoch_files, key=os.path.getmtime)
print(f" Rescuing from backup: {latest_file}")
try:
ckpt = torch.load(latest_file, map_location=device)
model.load_state_dict(ckpt)
match = re.search(r'epoch_(\d+).pth', latest_file)
start_epoch = int(match.group(1)) if match else 0
print(f"Rescue successful. Resuming from Epoch {start_epoch}.")
except:
print("Backup failed. Starting from Scratch.")
else:
print(" No backups found. Starting from Scratch.")
# ==========================================
# 5. TRAINING LOOP
# ==========================================
print(f" Starting Training. Max Epochs: {EPOCHS}")
for ep in range(start_epoch, EPOCHS):
model.train(); train_loss = 0
for x, y in train_loader:
x, y = x.to(device), y.to(device)
x, y = apply_augmentation(x, y)
optimizer.zero_grad()
loss = criterion(model(x), y)
loss.backward(); optimizer.step()
train_loss += loss.item()
model.eval(); val_loss = 0
with torch.no_grad():
for x, y in val_loader:
x, y = x.to(device), y.to(device)
val_loss += criterion(model(x), y).item()
avg_t = train_loss / len(train_loader); avg_v = val_loss / len(val_loader)
status_msg = ""
if swa_active:
swa_model.update_parameters(model); swa_scheduler.step()
swa_epoch_counter += 1; status_msg = f"SWA Phase ({swa_epoch_counter}/{SWA_DURATION})"
if swa_epoch_counter >= SWA_DURATION:
print(" SWA Complete. Saving & Stopping.")
swa_utils.update_bn(train_loader, swa_model, device=device)
torch.save(swa_model.state_dict(), os.path.join(SAVE_DIR, "satmae_partial_swa_final.pth"))
break
else:
scheduler.step()
if avg_v < best_loss:
best_loss = avg_v; patience_counter = 0; status_msg = "New Best Model!"
torch.save(model.state_dict(), os.path.join(SAVE_DIR, "best_model.pth"))
else:
patience_counter += 1; status_msg = f"No Improvement ({patience_counter}/{PATIENCE_TRIGGER})"
if patience_counter >= PATIENCE_TRIGGER:
print(f" Patience limit reached. Triggering SWA.")
swa_active = True; swa_epoch_counter = 0
print(f"Epoch {ep+1} | Train: {avg_t:.4f} | Val: {avg_v:.4f} | {status_msg}")
# Save Epoch Checkpoint
epoch_ckpt = os.path.join(SAVE_DIR, f"epoch_{ep+1}.pth")
torch.save(model.state_dict(), epoch_ckpt)
# Maintenance
manage_rolling_checkpoints(SAVE_DIR, keep_k=5)
if (ep + 1) % 10 == 0:
print(" Maintenance: Emptying 'epoch' files from Drive Trash...")
empty_trash_specific(keyword="epoch")
# Save Resume State
torch.save({
'epoch': ep,
'model_state_dict': model.state_dict(),
'optimizer_state_dict': optimizer.state_dict(),
'best_loss': best_loss,
'patience_counter': patience_counter,
'swa_active': swa_active,
'swa_epoch_counter': swa_epoch_counter
}, CHECKPOINT_PATH)
Authenticating for Trash Cleaner... Device: cuda Initializing SatMAE Partial FT Model... Downloading Pretrained MAE Weights (facebook/vit-mae-base)... Weights Loaded! Applying Partial Freeze Strategy... Unfreezing Last 2 Encoder Blocks... Attempting to load main checkpoint: /content/drive/MyDrive/SatMAE_PartialFT_Results_1/checkpoint_satmae_partial.pth Main checkpoint corrupted. Searching for backups... Rescuing from backup: /content/drive/MyDrive/SatMAE_PartialFT_Results_1/epoch_121.pth Rescue successful. Resuming from Epoch 121. Starting Training. Max Epochs: 5000 Epoch 122 | Train: 0.3627 | Val: 0.6601 | New Best Model! Epoch 123 | Train: 0.4789 | Val: 4.2347 | No Improvement (1/150) Epoch 124 | Train: 0.3872 | Val: 4.2443 | No Improvement (2/150) Epoch 125 | Train: 0.3794 | Val: 3.4719 | No Improvement (3/150) Epoch 126 | Train: 0.3666 | Val: 0.4990 | New Best Model! Epoch 127 | Train: 0.3661 | Val: 0.2869 | New Best Model! Epoch 128 | Train: 0.3667 | Val: 0.3365 | No Improvement (1/150) Epoch 129 | Train: 0.3614 | Val: 0.3680 | No Improvement (2/150) Epoch 130 | Train: 0.3578 | Val: 0.3907 | No Improvement (3/150)
WARNING:google_auth_httplib2:httplib2 transport does not support per-request timeout. Set the timeout when constructing the httplib2.Http instance. WARNING:google_auth_httplib2:httplib2 transport does not support per-request timeout. Set the timeout when constructing the httplib2.Http instance.
Maintenance: Emptying 'epoch' files from Drive Trash...
Deleting 8 'epoch' files from Trash...
Trash Purged.
Epoch 131 | Train: 0.3573 | Val: 0.4085 | No Improvement (4/150)
Epoch 132 | Train: 0.3565 | Val: 0.4167 | No Improvement (5/150)
Epoch 133 | Train: 0.3562 | Val: 0.4043 | No Improvement (6/150)
Epoch 134 | Train: 0.3529 | Val: 0.3796 | No Improvement (7/150)
Epoch 135 | Train: 0.3549 | Val: 0.3592 | No Improvement (8/150)
Epoch 136 | Train: 0.3533 | Val: 0.3494 | No Improvement (9/150)
Epoch 137 | Train: 0.3483 | Val: 0.3384 | No Improvement (10/150)
Epoch 138 | Train: 0.3512 | Val: 0.3212 | No Improvement (11/150)
Epoch 139 | Train: 0.3499 | Val: 0.3071 | No Improvement (12/150)
Epoch 140 | Train: 0.3487 | Val: 0.2961 | No Improvement (13/150)
WARNING:google_auth_httplib2:httplib2 transport does not support per-request timeout. Set the timeout when constructing the httplib2.Http instance. WARNING:google_auth_httplib2:httplib2 transport does not support per-request timeout. Set the timeout when constructing the httplib2.Http instance.
Maintenance: Emptying 'epoch' files from Drive Trash...
Deleting 11 'epoch' files from Trash...
Trash Purged.
Epoch 141 | Train: 0.3441 | Val: 0.2913 | No Improvement (14/150)
Epoch 142 | Train: 0.3477 | Val: 0.2945 | No Improvement (15/150)
Epoch 143 | Train: 0.3445 | Val: 0.3013 | No Improvement (16/150)
Epoch 144 | Train: 0.3405 | Val: 0.3099 | No Improvement (17/150)
Epoch 145 | Train: 0.3427 | Val: 0.3141 | No Improvement (18/150)
Epoch 146 | Train: 0.3402 | Val: 0.3201 | No Improvement (19/150)
Epoch 147 | Train: 0.3437 | Val: 0.3234 | No Improvement (20/150)
Epoch 148 | Train: 0.3419 | Val: 0.3338 | No Improvement (21/150)
Epoch 149 | Train: 0.3421 | Val: 0.3346 | No Improvement (22/150)
Epoch 150 | Train: 0.3364 | Val: 0.3322 | No Improvement (23/150)
WARNING:google_auth_httplib2:httplib2 transport does not support per-request timeout. Set the timeout when constructing the httplib2.Http instance. WARNING:google_auth_httplib2:httplib2 transport does not support per-request timeout. Set the timeout when constructing the httplib2.Http instance.
Maintenance: Emptying 'epoch' files from Drive Trash...
Deleting 10 'epoch' files from Trash...
Trash Purged.
Epoch 151 | Train: 0.3386 | Val: 0.3287 | No Improvement (24/150)
Epoch 152 | Train: 0.3377 | Val: 0.3190 | No Improvement (25/150)
Epoch 153 | Train: 0.3393 | Val: 0.3070 | No Improvement (26/150)
Epoch 154 | Train: 0.3393 | Val: 0.2969 | No Improvement (27/150)
Epoch 155 | Train: 0.3355 | Val: 0.2927 | No Improvement (28/150)
Epoch 156 | Train: 0.3360 | Val: 0.2920 | No Improvement (29/150)
Epoch 157 | Train: 0.3367 | Val: 0.2944 | No Improvement (30/150)
Epoch 158 | Train: 0.3377 | Val: 0.3001 | No Improvement (31/150)
Epoch 159 | Train: 0.3385 | Val: 0.3078 | No Improvement (32/150)
Epoch 160 | Train: 0.3348 | Val: 0.3150 | No Improvement (33/150)
WARNING:google_auth_httplib2:httplib2 transport does not support per-request timeout. Set the timeout when constructing the httplib2.Http instance. WARNING:google_auth_httplib2:httplib2 transport does not support per-request timeout. Set the timeout when constructing the httplib2.Http instance.
Maintenance: Emptying 'epoch' files from Drive Trash...
Deleting 10 'epoch' files from Trash...
Trash Purged.
Epoch 161 | Train: 0.3368 | Val: 0.3210 | No Improvement (34/150)
Epoch 162 | Train: 0.3373 | Val: 0.3269 | No Improvement (35/150)
Epoch 163 | Train: 0.3345 | Val: 0.3302 | No Improvement (36/150)
Epoch 164 | Train: 0.3349 | Val: 0.3301 | No Improvement (37/150)
Epoch 165 | Train: 0.3353 | Val: 0.3296 | No Improvement (38/150)
Epoch 166 | Train: 0.3326 | Val: 0.3280 | No Improvement (39/150)
Epoch 167 | Train: 0.3339 | Val: 0.3261 | No Improvement (40/150)
Epoch 168 | Train: 0.3354 | Val: 0.3242 | No Improvement (41/150)
Epoch 169 | Train: 0.3357 | Val: 0.3226 | No Improvement (42/150)
Epoch 170 | Train: 0.3321 | Val: 0.3210 | No Improvement (43/150)
WARNING:google_auth_httplib2:httplib2 transport does not support per-request timeout. Set the timeout when constructing the httplib2.Http instance. WARNING:google_auth_httplib2:httplib2 transport does not support per-request timeout. Set the timeout when constructing the httplib2.Http instance.
Maintenance: Emptying 'epoch' files from Drive Trash...
Deleting 10 'epoch' files from Trash...
Trash Purged.
Epoch 171 | Train: 0.3344 | Val: 0.3201 | No Improvement (44/150)
Epoch 172 | Train: 0.3364 | Val: 0.2895 | No Improvement (45/150)
Epoch 173 | Train: 0.3379 | Val: 0.3293 | No Improvement (46/150)
Epoch 174 | Train: 0.3328 | Val: 0.4919 | No Improvement (47/150)
Epoch 175 | Train: 0.3354 | Val: 0.5183 | No Improvement (48/150)
Epoch 176 | Train: 0.3344 | Val: 0.3510 | No Improvement (49/150)
Epoch 177 | Train: 0.3320 | Val: 0.2547 | New Best Model!
Epoch 178 | Train: 0.3277 | Val: 0.2380 | New Best Model!
Epoch 179 | Train: 0.3326 | Val: 0.2476 | No Improvement (1/150)
Epoch 180 | Train: 0.3299 | Val: 0.3114 | No Improvement (2/150)
WARNING:google_auth_httplib2:httplib2 transport does not support per-request timeout. Set the timeout when constructing the httplib2.Http instance. WARNING:google_auth_httplib2:httplib2 transport does not support per-request timeout. Set the timeout when constructing the httplib2.Http instance.
Maintenance: Emptying 'epoch' files from Drive Trash...
Deleting 10 'epoch' files from Trash...
Trash Purged.
Epoch 181 | Train: 0.3253 | Val: 0.4451 | No Improvement (3/150)
Epoch 182 | Train: 0.3257 | Val: 0.4320 | No Improvement (4/150)
Epoch 183 | Train: 0.3264 | Val: 0.3117 | No Improvement (5/150)
Epoch 184 | Train: 0.3260 | Val: 0.2716 | No Improvement (6/150)
Epoch 185 | Train: 0.3240 | Val: 0.2617 | No Improvement (7/150)
Epoch 186 | Train: 0.3221 | Val: 0.2700 | No Improvement (8/150)
Epoch 187 | Train: 0.3206 | Val: 0.3244 | No Improvement (9/150)
Epoch 188 | Train: 0.3188 | Val: 0.3573 | No Improvement (10/150)
Epoch 189 | Train: 0.3201 | Val: 0.3335 | No Improvement (11/150)
Epoch 190 | Train: 0.3230 | Val: 0.3370 | No Improvement (12/150)
WARNING:google_auth_httplib2:httplib2 transport does not support per-request timeout. Set the timeout when constructing the httplib2.Http instance. WARNING:google_auth_httplib2:httplib2 transport does not support per-request timeout. Set the timeout when constructing the httplib2.Http instance.
Maintenance: Emptying 'epoch' files from Drive Trash...
Deleting 10 'epoch' files from Trash...
Trash Purged.
Epoch 191 | Train: 0.3213 | Val: 0.3504 | No Improvement (13/150)
Epoch 192 | Train: 0.3188 | Val: 0.3276 | No Improvement (14/150)
Epoch 193 | Train: 0.3178 | Val: 0.3315 | No Improvement (15/150)
Epoch 194 | Train: 0.3174 | Val: 0.3312 | No Improvement (16/150)
Epoch 195 | Train: 0.3159 | Val: 0.3207 | No Improvement (17/150)
Epoch 196 | Train: 0.3172 | Val: 0.3451 | No Improvement (18/150)
Epoch 197 | Train: 0.3154 | Val: 0.3643 | No Improvement (19/150)
Epoch 198 | Train: 0.3145 | Val: 0.3819 | No Improvement (20/150)
Epoch 199 | Train: 0.3120 | Val: 0.3666 | No Improvement (21/150)
Epoch 200 | Train: 0.3115 | Val: 0.3548 | No Improvement (22/150)
WARNING:google_auth_httplib2:httplib2 transport does not support per-request timeout. Set the timeout when constructing the httplib2.Http instance. WARNING:google_auth_httplib2:httplib2 transport does not support per-request timeout. Set the timeout when constructing the httplib2.Http instance.
Maintenance: Emptying 'epoch' files from Drive Trash...
Deleting 9 'epoch' files from Trash...
Trash Purged.
Epoch 201 | Train: 0.3109 | Val: 0.3612 | No Improvement (23/150)
Epoch 202 | Train: 0.3103 | Val: 0.4297 | No Improvement (24/150)
Epoch 203 | Train: 0.3074 | Val: 0.4460 | No Improvement (25/150)
Epoch 204 | Train: 0.3124 | Val: 0.4107 | No Improvement (26/150)
Epoch 205 | Train: 0.3090 | Val: 0.3524 | No Improvement (27/150)
Epoch 206 | Train: 0.3077 | Val: 0.3063 | No Improvement (28/150)
Epoch 207 | Train: 0.3080 | Val: 0.2871 | No Improvement (29/150)
Epoch 208 | Train: 0.3097 | Val: 0.2868 | No Improvement (30/150)
Epoch 209 | Train: 0.3044 | Val: 0.3250 | No Improvement (31/150)
Epoch 210 | Train: 0.3095 | Val: 0.3972 | No Improvement (32/150)
WARNING:google_auth_httplib2:httplib2 transport does not support per-request timeout. Set the timeout when constructing the httplib2.Http instance. WARNING:google_auth_httplib2:httplib2 transport does not support per-request timeout. Set the timeout when constructing the httplib2.Http instance.
Maintenance: Emptying 'epoch' files from Drive Trash...
Deleting 11 'epoch' files from Trash...
Trash Purged.
Epoch 211 | Train: 0.3035 | Val: 0.3959 | No Improvement (33/150)
Epoch 212 | Train: 0.3022 | Val: 0.3274 | No Improvement (34/150)
Epoch 213 | Train: 0.3043 | Val: 0.2752 | No Improvement (35/150)
Epoch 214 | Train: 0.3082 | Val: 0.2688 | No Improvement (36/150)
Epoch 215 | Train: 0.3038 | Val: 0.2747 | No Improvement (37/150)
Epoch 216 | Train: 0.3039 | Val: 0.2947 | No Improvement (38/150)
Epoch 217 | Train: 0.3007 | Val: 0.3164 | No Improvement (39/150)
Epoch 218 | Train: 0.3043 | Val: 0.3187 | No Improvement (40/150)
Epoch 219 | Train: 0.3042 | Val: 0.3155 | No Improvement (41/150)
Epoch 220 | Train: 0.3009 | Val: 0.3067 | No Improvement (42/150)
WARNING:google_auth_httplib2:httplib2 transport does not support per-request timeout. Set the timeout when constructing the httplib2.Http instance.
Maintenance: Emptying 'epoch' files from Drive Trash...
WARNING:google_auth_httplib2:httplib2 transport does not support per-request timeout. Set the timeout when constructing the httplib2.Http instance.
Deleting 10 'epoch' files from Trash...
Trash Purged.
Epoch 221 | Train: 0.2983 | Val: 0.3020 | No Improvement (43/150)
Epoch 222 | Train: 0.3024 | Val: 0.3065 | No Improvement (44/150)
Epoch 223 | Train: 0.2990 | Val: 0.3028 | No Improvement (45/150)
Epoch 224 | Train: 0.2978 | Val: 0.3001 | No Improvement (46/150)
Epoch 225 | Train: 0.3007 | Val: 0.3138 | No Improvement (47/150)
Epoch 226 | Train: 0.3000 | Val: 0.3319 | No Improvement (48/150)
Epoch 227 | Train: 0.2989 | Val: 0.3324 | No Improvement (49/150)
Epoch 228 | Train: 0.2970 | Val: 0.3178 | No Improvement (50/150)
Epoch 229 | Train: 0.2993 | Val: 0.2946 | No Improvement (51/150)
Epoch 230 | Train: 0.2982 | Val: 0.2876 | No Improvement (52/150)
WARNING:google_auth_httplib2:httplib2 transport does not support per-request timeout. Set the timeout when constructing the httplib2.Http instance.
Maintenance: Emptying 'epoch' files from Drive Trash...
WARNING:google_auth_httplib2:httplib2 transport does not support per-request timeout. Set the timeout when constructing the httplib2.Http instance.
Deleting 10 'epoch' files from Trash...
Trash Purged.
Epoch 231 | Train: 0.3011 | Val: 0.2763 | No Improvement (53/150)
Epoch 232 | Train: 0.2997 | Val: 0.2723 | No Improvement (54/150)
Epoch 233 | Train: 0.2976 | Val: 0.2758 | No Improvement (55/150)
Epoch 234 | Train: 0.2961 | Val: 0.2863 | No Improvement (56/150)
Epoch 235 | Train: 0.2965 | Val: 0.3041 | No Improvement (57/150)
Epoch 236 | Train: 0.2962 | Val: 0.3236 | No Improvement (58/150)
Epoch 237 | Train: 0.2947 | Val: 0.3282 | No Improvement (59/150)
Epoch 238 | Train: 0.2972 | Val: 0.3138 | No Improvement (60/150)
Epoch 239 | Train: 0.2945 | Val: 0.3051 | No Improvement (61/150)
Epoch 240 | Train: 0.2941 | Val: 0.2987 | No Improvement (62/150)
WARNING:google_auth_httplib2:httplib2 transport does not support per-request timeout. Set the timeout when constructing the httplib2.Http instance. WARNING:google_auth_httplib2:httplib2 transport does not support per-request timeout. Set the timeout when constructing the httplib2.Http instance.
Maintenance: Emptying 'epoch' files from Drive Trash...
Deleting 10 'epoch' files from Trash...
Trash Purged.
Epoch 241 | Train: 0.2945 | Val: 0.3005 | No Improvement (63/150)
Epoch 242 | Train: 0.2930 | Val: 0.2985 | No Improvement (64/150)
Epoch 243 | Train: 0.2930 | Val: 0.2930 | No Improvement (65/150)
Epoch 244 | Train: 0.2938 | Val: 0.2929 | No Improvement (66/150)
Epoch 245 | Train: 0.2929 | Val: 0.2905 | No Improvement (67/150)
Epoch 246 | Train: 0.2934 | Val: 0.2920 | No Improvement (68/150)
Epoch 247 | Train: 0.2931 | Val: 0.2964 | No Improvement (69/150)
Epoch 248 | Train: 0.2960 | Val: 0.2956 | No Improvement (70/150)
Epoch 249 | Train: 0.2969 | Val: 0.2965 | No Improvement (71/150)
Epoch 250 | Train: 0.2957 | Val: 0.3000 | No Improvement (72/150)
WARNING:google_auth_httplib2:httplib2 transport does not support per-request timeout. Set the timeout when constructing the httplib2.Http instance.
Maintenance: Emptying 'epoch' files from Drive Trash...
WARNING:google_auth_httplib2:httplib2 transport does not support per-request timeout. Set the timeout when constructing the httplib2.Http instance.
Deleting 10 'epoch' files from Trash...
Trash Purged.
Epoch 251 | Train: 0.2947 | Val: 0.3030 | No Improvement (73/150)
Epoch 252 | Train: 0.2946 | Val: 0.3016 | No Improvement (74/150)
Epoch 253 | Train: 0.2944 | Val: 0.2999 | No Improvement (75/150)
Epoch 254 | Train: 0.2941 | Val: 0.2979 | No Improvement (76/150)
Epoch 255 | Train: 0.2917 | Val: 0.2967 | No Improvement (77/150)
Epoch 256 | Train: 0.2921 | Val: 0.2944 | No Improvement (78/150)
Epoch 257 | Train: 0.2943 | Val: 0.2916 | No Improvement (79/150)
Epoch 258 | Train: 0.2941 | Val: 0.2900 | No Improvement (80/150)
Epoch 259 | Train: 0.2919 | Val: 0.2876 | No Improvement (81/150)
Epoch 260 | Train: 0.2923 | Val: 0.2853 | No Improvement (82/150)
WARNING:google_auth_httplib2:httplib2 transport does not support per-request timeout. Set the timeout when constructing the httplib2.Http instance.
Maintenance: Emptying 'epoch' files from Drive Trash...
WARNING:google_auth_httplib2:httplib2 transport does not support per-request timeout. Set the timeout when constructing the httplib2.Http instance.
Deleting 10 'epoch' files from Trash...
Trash Purged.
Epoch 261 | Train: 0.2953 | Val: 0.2837 | No Improvement (83/150)
Epoch 262 | Train: 0.2918 | Val: 0.2827 | No Improvement (84/150)
Epoch 263 | Train: 0.2949 | Val: 0.2820 | No Improvement (85/150)
Epoch 264 | Train: 0.2926 | Val: 0.2817 | No Improvement (86/150)
Epoch 265 | Train: 0.2949 | Val: 0.2820 | No Improvement (87/150)
Epoch 266 | Train: 0.2910 | Val: 0.2823 | No Improvement (88/150)
Epoch 267 | Train: 0.2912 | Val: 0.2828 | No Improvement (89/150)
Epoch 268 | Train: 0.2933 | Val: 0.2834 | No Improvement (90/150)
Epoch 269 | Train: 0.2913 | Val: 0.2842 | No Improvement (91/150)
Epoch 270 | Train: 0.2960 | Val: 0.2847 | No Improvement (92/150)
WARNING:google_auth_httplib2:httplib2 transport does not support per-request timeout. Set the timeout when constructing the httplib2.Http instance. WARNING:google_auth_httplib2:httplib2 transport does not support per-request timeout. Set the timeout when constructing the httplib2.Http instance.
Maintenance: Emptying 'epoch' files from Drive Trash...
Deleting 9 'epoch' files from Trash...
Trash Purged.
Epoch 271 | Train: 0.2921 | Val: 0.2853 | No Improvement (93/150)
Epoch 272 | Train: 0.2910 | Val: 0.3177 | No Improvement (94/150)
Epoch 273 | Train: 0.2985 | Val: 0.3767 | No Improvement (95/150)
Epoch 274 | Train: 0.2933 | Val: 0.3584 | No Improvement (96/150)
Epoch 275 | Train: 0.2948 | Val: 0.3221 | No Improvement (97/150)
Epoch 276 | Train: 0.2918 | Val: 0.2974 | No Improvement (98/150)
Epoch 277 | Train: 0.2910 | Val: 0.3031 | No Improvement (99/150)
Epoch 278 | Train: 0.2895 | Val: 0.2779 | No Improvement (100/150)
Epoch 279 | Train: 0.2946 | Val: 0.2408 | No Improvement (101/150)
Epoch 280 | Train: 0.2917 | Val: 0.2504 | No Improvement (102/150)
WARNING:google_auth_httplib2:httplib2 transport does not support per-request timeout. Set the timeout when constructing the httplib2.Http instance.
Maintenance: Emptying 'epoch' files from Drive Trash...
WARNING:google_auth_httplib2:httplib2 transport does not support per-request timeout. Set the timeout when constructing the httplib2.Http instance.
Deleting 11 'epoch' files from Trash...
Trash Purged.
Epoch 281 | Train: 0.2912 | Val: 0.2899 | No Improvement (103/150)
Epoch 282 | Train: 0.2891 | Val: 0.2961 | No Improvement (104/150)
Epoch 283 | Train: 0.2869 | Val: 0.3130 | No Improvement (105/150)
Epoch 284 | Train: 0.2869 | Val: 0.3129 | No Improvement (106/150)
Epoch 285 | Train: 0.2861 | Val: 0.3344 | No Improvement (107/150)
Epoch 286 | Train: 0.2900 | Val: 0.3838 | No Improvement (108/150)
Epoch 287 | Train: 0.2866 | Val: 0.3436 | No Improvement (109/150)
Epoch 288 | Train: 0.2883 | Val: 0.3023 | No Improvement (110/150)
Epoch 289 | Train: 0.2858 | Val: 0.3589 | No Improvement (111/150)
Epoch 290 | Train: 0.2862 | Val: 0.4738 | No Improvement (112/150)
WARNING:google_auth_httplib2:httplib2 transport does not support per-request timeout. Set the timeout when constructing the httplib2.Http instance. WARNING:google_auth_httplib2:httplib2 transport does not support per-request timeout. Set the timeout when constructing the httplib2.Http instance.
Maintenance: Emptying 'epoch' files from Drive Trash...
Deleting 9 'epoch' files from Trash...
Trash Purged.
Epoch 291 | Train: 0.2851 | Val: 0.3493 | No Improvement (113/150)
Epoch 292 | Train: 0.2872 | Val: 0.3624 | No Improvement (114/150)
Epoch 293 | Train: 0.2827 | Val: 0.3507 | No Improvement (115/150)
Epoch 294 | Train: 0.2827 | Val: 0.2824 | No Improvement (116/150)
Epoch 295 | Train: 0.2786 | Val: 0.3416 | No Improvement (117/150)
Epoch 296 | Train: 0.2830 | Val: 0.3233 | No Improvement (118/150)
Epoch 297 | Train: 0.2815 | Val: 0.2765 | No Improvement (119/150)
Epoch 298 | Train: 0.2807 | Val: 0.2658 | No Improvement (120/150)
Epoch 299 | Train: 0.2786 | Val: 0.2585 | No Improvement (121/150)
Epoch 300 | Train: 0.2781 | Val: 0.2699 | No Improvement (122/150)
WARNING:google_auth_httplib2:httplib2 transport does not support per-request timeout. Set the timeout when constructing the httplib2.Http instance.
Maintenance: Emptying 'epoch' files from Drive Trash...
WARNING:google_auth_httplib2:httplib2 transport does not support per-request timeout. Set the timeout when constructing the httplib2.Http instance.
Deleting 11 'epoch' files from Trash...
Trash Purged.
Epoch 301 | Train: 0.2817 | Val: 0.3098 | No Improvement (123/150)
Epoch 302 | Train: 0.2762 | Val: 0.3389 | No Improvement (124/150)
Epoch 303 | Train: 0.2755 | Val: 0.3261 | No Improvement (125/150)
Epoch 304 | Train: 0.2756 | Val: 0.3018 | No Improvement (126/150)
Epoch 305 | Train: 0.2765 | Val: 0.2689 | No Improvement (127/150)
Epoch 306 | Train: 0.2722 | Val: 0.2576 | No Improvement (128/150)
Epoch 307 | Train: 0.2781 | Val: 0.2461 | No Improvement (129/150)
Epoch 308 | Train: 0.2715 | Val: 0.2330 | New Best Model!
Epoch 309 | Train: 0.2742 | Val: 0.2479 | No Improvement (1/150)
Epoch 310 | Train: 0.2694 | Val: 0.2941 | No Improvement (2/150)
WARNING:google_auth_httplib2:httplib2 transport does not support per-request timeout. Set the timeout when constructing the httplib2.Http instance.
Maintenance: Emptying 'epoch' files from Drive Trash...
WARNING:google_auth_httplib2:httplib2 transport does not support per-request timeout. Set the timeout when constructing the httplib2.Http instance.
Deleting 10 'epoch' files from Trash...
Trash Purged.
Epoch 311 | Train: 0.2704 | Val: 0.3626 | No Improvement (3/150)
Epoch 312 | Train: 0.2678 | Val: 0.3726 | No Improvement (4/150)
Epoch 313 | Train: 0.2665 | Val: 0.3473 | No Improvement (5/150)
Epoch 314 | Train: 0.2654 | Val: 0.3142 | No Improvement (6/150)
Epoch 315 | Train: 0.2643 | Val: 0.2922 | No Improvement (7/150)
Epoch 316 | Train: 0.2736 | Val: 0.2659 | No Improvement (8/150)
Epoch 317 | Train: 0.2695 | Val: 0.2643 | No Improvement (9/150)
Epoch 318 | Train: 0.2694 | Val: 0.2713 | No Improvement (10/150)
Epoch 319 | Train: 0.2697 | Val: 0.2718 | No Improvement (11/150)
Epoch 320 | Train: 0.2624 | Val: 0.2781 | No Improvement (12/150)
WARNING:google_auth_httplib2:httplib2 transport does not support per-request timeout. Set the timeout when constructing the httplib2.Http instance. WARNING:google_auth_httplib2:httplib2 transport does not support per-request timeout. Set the timeout when constructing the httplib2.Http instance.
Maintenance: Emptying 'epoch' files from Drive Trash...
Deleting 9 'epoch' files from Trash...
Trash Purged.
Epoch 321 | Train: 0.2599 | Val: 0.2905 | No Improvement (13/150)
Epoch 322 | Train: 0.2648 | Val: 0.2819 | No Improvement (14/150)
Epoch 323 | Train: 0.2597 | Val: 0.2708 | No Improvement (15/150)
Epoch 324 | Train: 0.2593 | Val: 0.2667 | No Improvement (16/150)
Epoch 325 | Train: 0.2677 | Val: 0.2467 | No Improvement (17/150)
Epoch 326 | Train: 0.2622 | Val: 0.2615 | No Improvement (18/150)
Epoch 327 | Train: 0.2654 | Val: 0.2992 | No Improvement (19/150)
Epoch 328 | Train: 0.2635 | Val: 0.3147 | No Improvement (20/150)
Epoch 329 | Train: 0.2591 | Val: 0.3235 | No Improvement (21/150)
Epoch 330 | Train: 0.2612 | Val: 0.3283 | No Improvement (22/150)
WARNING:google_auth_httplib2:httplib2 transport does not support per-request timeout. Set the timeout when constructing the httplib2.Http instance. WARNING:google_auth_httplib2:httplib2 transport does not support per-request timeout. Set the timeout when constructing the httplib2.Http instance.
Maintenance: Emptying 'epoch' files from Drive Trash...
Deleting 11 'epoch' files from Trash...
Trash Purged.
Epoch 331 | Train: 0.2633 | Val: 0.2806 | No Improvement (23/150)
Epoch 332 | Train: 0.2617 | Val: 0.2450 | No Improvement (24/150)
Epoch 333 | Train: 0.2596 | Val: 0.2334 | No Improvement (25/150)
Epoch 334 | Train: 0.2570 | Val: 0.2416 | No Improvement (26/150)
Epoch 335 | Train: 0.2617 | Val: 0.2592 | No Improvement (27/150)
Epoch 336 | Train: 0.2562 | Val: 0.2931 | No Improvement (28/150)
Epoch 337 | Train: 0.2572 | Val: 0.3014 | No Improvement (29/150)
Epoch 338 | Train: 0.2590 | Val: 0.2854 | No Improvement (30/150)
Epoch 339 | Train: 0.2554 | Val: 0.2624 | No Improvement (31/150)
Epoch 340 | Train: 0.2591 | Val: 0.2469 | No Improvement (32/150)
WARNING:google_auth_httplib2:httplib2 transport does not support per-request timeout. Set the timeout when constructing the httplib2.Http instance. WARNING:google_auth_httplib2:httplib2 transport does not support per-request timeout. Set the timeout when constructing the httplib2.Http instance.
Maintenance: Emptying 'epoch' files from Drive Trash...
Deleting 10 'epoch' files from Trash...
Trash Purged.
Epoch 341 | Train: 0.2587 | Val: 0.2430 | No Improvement (33/150)
Epoch 342 | Train: 0.2581 | Val: 0.2452 | No Improvement (34/150)
Epoch 343 | Train: 0.2573 | Val: 0.2698 | No Improvement (35/150)
Epoch 344 | Train: 0.2541 | Val: 0.3199 | No Improvement (36/150)
Epoch 345 | Train: 0.2584 | Val: 0.3247 | No Improvement (37/150)
Epoch 346 | Train: 0.2582 | Val: 0.2988 | No Improvement (38/150)
Epoch 347 | Train: 0.2545 | Val: 0.2754 | No Improvement (39/150)
Epoch 348 | Train: 0.2548 | Val: 0.2637 | No Improvement (40/150)
Epoch 349 | Train: 0.2520 | Val: 0.2601 | No Improvement (41/150)
Epoch 350 | Train: 0.2532 | Val: 0.2751 | No Improvement (42/150)
WARNING:google_auth_httplib2:httplib2 transport does not support per-request timeout. Set the timeout when constructing the httplib2.Http instance. WARNING:google_auth_httplib2:httplib2 transport does not support per-request timeout. Set the timeout when constructing the httplib2.Http instance.
Maintenance: Emptying 'epoch' files from Drive Trash...
Deleting 10 'epoch' files from Trash...
Trash Purged.
Epoch 351 | Train: 0.2502 | Val: 0.2878 | No Improvement (43/150)
Epoch 352 | Train: 0.2505 | Val: 0.2833 | No Improvement (44/150)
Epoch 353 | Train: 0.2501 | Val: 0.2761 | No Improvement (45/150)
Epoch 354 | Train: 0.2497 | Val: 0.2635 | No Improvement (46/150)
Epoch 355 | Train: 0.2481 | Val: 0.2528 | No Improvement (47/150)
Epoch 356 | Train: 0.2476 | Val: 0.2586 | No Improvement (48/150)
Epoch 357 | Train: 0.2471 | Val: 0.2708 | No Improvement (49/150)
Epoch 358 | Train: 0.2449 | Val: 0.2722 | No Improvement (50/150)
Epoch 359 | Train: 0.2531 | Val: 0.2486 | No Improvement (51/150)
Epoch 360 | Train: 0.2442 | Val: 0.2434 | No Improvement (52/150)
WARNING:google_auth_httplib2:httplib2 transport does not support per-request timeout. Set the timeout when constructing the httplib2.Http instance. WARNING:google_auth_httplib2:httplib2 transport does not support per-request timeout. Set the timeout when constructing the httplib2.Http instance.
Maintenance: Emptying 'epoch' files from Drive Trash...
Deleting 10 'epoch' files from Trash...
Trash Purged.
Epoch 361 | Train: 0.2427 | Val: 0.2500 | No Improvement (53/150)
Epoch 362 | Train: 0.2465 | Val: 0.2455 | No Improvement (54/150)
Epoch 363 | Train: 0.2464 | Val: 0.2367 | No Improvement (55/150)
Epoch 364 | Train: 0.2452 | Val: 0.2401 | No Improvement (56/150)
Epoch 365 | Train: 0.2526 | Val: 0.2467 | No Improvement (57/150)
Epoch 366 | Train: 0.2432 | Val: 0.2544 | No Improvement (58/150)
Epoch 367 | Train: 0.2431 | Val: 0.2486 | No Improvement (59/150)
Epoch 368 | Train: 0.2504 | Val: 0.2366 | No Improvement (60/150)
Epoch 369 | Train: 0.2496 | Val: 0.2343 | No Improvement (61/150)
Epoch 370 | Train: 0.2412 | Val: 0.2475 | No Improvement (62/150)
WARNING:google_auth_httplib2:httplib2 transport does not support per-request timeout. Set the timeout when constructing the httplib2.Http instance.
Maintenance: Emptying 'epoch' files from Drive Trash...
WARNING:google_auth_httplib2:httplib2 transport does not support per-request timeout. Set the timeout when constructing the httplib2.Http instance.
Deleting 10 'epoch' files from Trash...
Trash Purged.
Epoch 371 | Train: 0.2462 | Val: 0.2561 | No Improvement (63/150)
Epoch 372 | Train: 0.2462 | Val: 0.2436 | No Improvement (64/150)
Epoch 373 | Train: 0.2402 | Val: 0.2345 | No Improvement (65/150)
Epoch 374 | Train: 0.2448 | Val: 0.2425 | No Improvement (66/150)
Epoch 375 | Train: 0.2444 | Val: 0.2611 | No Improvement (67/150)
Epoch 376 | Train: 0.2430 | Val: 0.2700 | No Improvement (68/150)
Epoch 377 | Train: 0.2420 | Val: 0.2643 | No Improvement (69/150)
Epoch 378 | Train: 0.2414 | Val: 0.2544 | No Improvement (70/150)
Epoch 379 | Train: 0.2417 | Val: 0.2484 | No Improvement (71/150)
Epoch 380 | Train: 0.2418 | Val: 0.2501 | No Improvement (72/150)
WARNING:google_auth_httplib2:httplib2 transport does not support per-request timeout. Set the timeout when constructing the httplib2.Http instance. WARNING:google_auth_httplib2:httplib2 transport does not support per-request timeout. Set the timeout when constructing the httplib2.Http instance.
Maintenance: Emptying 'epoch' files from Drive Trash...
Deleting 9 'epoch' files from Trash...
Trash Purged.
Epoch 381 | Train: 0.2421 | Val: 0.2505 | No Improvement (73/150)
Epoch 382 | Train: 0.2411 | Val: 0.2505 | No Improvement (74/150)
Epoch 383 | Train: 0.2402 | Val: 0.2499 | No Improvement (75/150)
Epoch 384 | Train: 0.2393 | Val: 0.2532 | No Improvement (76/150)
Epoch 385 | Train: 0.2426 | Val: 0.2522 | No Improvement (77/150)
Epoch 386 | Train: 0.2380 | Val: 0.2526 | No Improvement (78/150)
Epoch 387 | Train: 0.2394 | Val: 0.2476 | No Improvement (79/150)
Epoch 388 | Train: 0.2400 | Val: 0.2489 | No Improvement (80/150)
Epoch 389 | Train: 0.2393 | Val: 0.2509 | No Improvement (81/150)
Epoch 390 | Train: 0.2372 | Val: 0.2548 | No Improvement (82/150)
WARNING:google_auth_httplib2:httplib2 transport does not support per-request timeout. Set the timeout when constructing the httplib2.Http instance.
Maintenance: Emptying 'epoch' files from Drive Trash...
WARNING:google_auth_httplib2:httplib2 transport does not support per-request timeout. Set the timeout when constructing the httplib2.Http instance.
Deleting 10 'epoch' files from Trash...
Trash Purged.
Epoch 391 | Train: 0.2385 | Val: 0.2639 | No Improvement (83/150)
Epoch 392 | Train: 0.2382 | Val: 0.2716 | No Improvement (84/150)
Epoch 393 | Train: 0.2376 | Val: 0.2722 | No Improvement (85/150)
Epoch 394 | Train: 0.2374 | Val: 0.2593 | No Improvement (86/150)
Epoch 395 | Train: 0.2382 | Val: 0.2457 | No Improvement (87/150)
Epoch 396 | Train: 0.2379 | Val: 0.2367 | No Improvement (88/150)
Epoch 397 | Train: 0.2374 | Val: 0.2362 | No Improvement (89/150)
Epoch 398 | Train: 0.2365 | Val: 0.2411 | No Improvement (90/150)
Epoch 399 | Train: 0.2357 | Val: 0.2479 | No Improvement (91/150)
Epoch 400 | Train: 0.2371 | Val: 0.2529 | No Improvement (92/150)
WARNING:google_auth_httplib2:httplib2 transport does not support per-request timeout. Set the timeout when constructing the httplib2.Http instance.
Maintenance: Emptying 'epoch' files from Drive Trash...
WARNING:google_auth_httplib2:httplib2 transport does not support per-request timeout. Set the timeout when constructing the httplib2.Http instance.
Deleting 11 'epoch' files from Trash...
Trash Purged.
Epoch 401 | Train: 0.2340 | Val: 0.2524 | No Improvement (93/150)
Epoch 402 | Train: 0.2335 | Val: 0.2486 | No Improvement (94/150)
Epoch 403 | Train: 0.2370 | Val: 0.2414 | No Improvement (95/150)
Epoch 404 | Train: 0.2330 | Val: 0.2424 | No Improvement (96/150)
Epoch 405 | Train: 0.2360 | Val: 0.2467 | No Improvement (97/150)
Epoch 406 | Train: 0.2326 | Val: 0.2532 | No Improvement (98/150)
Epoch 407 | Train: 0.2366 | Val: 0.2542 | No Improvement (99/150)
Epoch 408 | Train: 0.2338 | Val: 0.2495 | No Improvement (100/150)
Epoch 409 | Train: 0.2334 | Val: 0.2421 | No Improvement (101/150)
Epoch 410 | Train: 0.2350 | Val: 0.2366 | No Improvement (102/150)
WARNING:google_auth_httplib2:httplib2 transport does not support per-request timeout. Set the timeout when constructing the httplib2.Http instance.
Maintenance: Emptying 'epoch' files from Drive Trash...
WARNING:google_auth_httplib2:httplib2 transport does not support per-request timeout. Set the timeout when constructing the httplib2.Http instance.
Deleting 9 'epoch' files from Trash...
Trash Purged.
Epoch 411 | Train: 0.2339 | Val: 0.2349 | No Improvement (103/150)
Epoch 412 | Train: 0.2329 | Val: 0.2377 | No Improvement (104/150)
Epoch 413 | Train: 0.2319 | Val: 0.2444 | No Improvement (105/150)
Epoch 414 | Train: 0.2346 | Val: 0.2472 | No Improvement (106/150)
Epoch 415 | Train: 0.2349 | Val: 0.2471 | No Improvement (107/150)
Epoch 416 | Train: 0.2302 | Val: 0.2467 | No Improvement (108/150)
Epoch 417 | Train: 0.2342 | Val: 0.2451 | No Improvement (109/150)
Epoch 418 | Train: 0.2354 | Val: 0.2447 | No Improvement (110/150)
Epoch 419 | Train: 0.2346 | Val: 0.2478 | No Improvement (111/150)
Epoch 420 | Train: 0.2328 | Val: 0.2539 | No Improvement (112/150)
WARNING:google_auth_httplib2:httplib2 transport does not support per-request timeout. Set the timeout when constructing the httplib2.Http instance.
Maintenance: Emptying 'epoch' files from Drive Trash...
WARNING:google_auth_httplib2:httplib2 transport does not support per-request timeout. Set the timeout when constructing the httplib2.Http instance.
Deleting 11 'epoch' files from Trash...
Trash Purged.
Epoch 421 | Train: 0.2324 | Val: 0.2590 | No Improvement (113/150)
Epoch 422 | Train: 0.2342 | Val: 0.2603 | No Improvement (114/150)
Epoch 423 | Train: 0.2334 | Val: 0.2566 | No Improvement (115/150)
Epoch 424 | Train: 0.2334 | Val: 0.2480 | No Improvement (116/150)
Epoch 425 | Train: 0.2320 | Val: 0.2401 | No Improvement (117/150)
Epoch 426 | Train: 0.2325 | Val: 0.2335 | No Improvement (118/150)
Epoch 427 | Train: 0.2320 | Val: 0.2287 | New Best Model!
Epoch 428 | Train: 0.2321 | Val: 0.2265 | New Best Model!
Epoch 429 | Train: 0.2314 | Val: 0.2270 | No Improvement (1/150)
Epoch 430 | Train: 0.2304 | Val: 0.2313 | No Improvement (2/150)
WARNING:google_auth_httplib2:httplib2 transport does not support per-request timeout. Set the timeout when constructing the httplib2.Http instance. WARNING:google_auth_httplib2:httplib2 transport does not support per-request timeout. Set the timeout when constructing the httplib2.Http instance.
Maintenance: Emptying 'epoch' files from Drive Trash...
Deleting 10 'epoch' files from Trash...
Trash Purged.
Epoch 431 | Train: 0.2321 | Val: 0.2385 | No Improvement (3/150)
Epoch 432 | Train: 0.2319 | Val: 0.2467 | No Improvement (4/150)
Epoch 433 | Train: 0.2304 | Val: 0.2532 | No Improvement (5/150)
Epoch 434 | Train: 0.2303 | Val: 0.2571 | No Improvement (6/150)
Epoch 435 | Train: 0.2297 | Val: 0.2582 | No Improvement (7/150)
Epoch 436 | Train: 0.2318 | Val: 0.2564 | No Improvement (8/150)
Epoch 437 | Train: 0.2294 | Val: 0.2539 | No Improvement (9/150)
Epoch 438 | Train: 0.2323 | Val: 0.2516 | No Improvement (10/150)
Epoch 439 | Train: 0.2317 | Val: 0.2497 | No Improvement (11/150)
Epoch 440 | Train: 0.2311 | Val: 0.2486 | No Improvement (12/150)
WARNING:google_auth_httplib2:httplib2 transport does not support per-request timeout. Set the timeout when constructing the httplib2.Http instance. WARNING:google_auth_httplib2:httplib2 transport does not support per-request timeout. Set the timeout when constructing the httplib2.Http instance.
Maintenance: Emptying 'epoch' files from Drive Trash...
Deleting 10 'epoch' files from Trash...
Trash Purged.
Epoch 441 | Train: 0.2319 | Val: 0.2481 | No Improvement (13/150)
Epoch 442 | Train: 0.2316 | Val: 0.2484 | No Improvement (14/150)
Epoch 443 | Train: 0.2308 | Val: 0.2485 | No Improvement (15/150)
Epoch 444 | Train: 0.2312 | Val: 0.2488 | No Improvement (16/150)
Epoch 445 | Train: 0.2290 | Val: 0.2491 | No Improvement (17/150)
Epoch 446 | Train: 0.2306 | Val: 0.2488 | No Improvement (18/150)
Epoch 447 | Train: 0.2310 | Val: 0.2480 | No Improvement (19/150)
Epoch 448 | Train: 0.2316 | Val: 0.2467 | No Improvement (20/150)
Epoch 449 | Train: 0.2308 | Val: 0.2454 | No Improvement (21/150)
Epoch 450 | Train: 0.2285 | Val: 0.2437 | No Improvement (22/150)
WARNING:google_auth_httplib2:httplib2 transport does not support per-request timeout. Set the timeout when constructing the httplib2.Http instance.
Maintenance: Emptying 'epoch' files from Drive Trash...
WARNING:google_auth_httplib2:httplib2 transport does not support per-request timeout. Set the timeout when constructing the httplib2.Http instance.
Deleting 10 'epoch' files from Trash...
Trash Purged.
Epoch 451 | Train: 0.2314 | Val: 0.2423 | No Improvement (23/150)
Epoch 452 | Train: 0.2287 | Val: 0.2414 | No Improvement (24/150)
Epoch 453 | Train: 0.2284 | Val: 0.2408 | No Improvement (25/150)
Epoch 454 | Train: 0.2307 | Val: 0.2406 | No Improvement (26/150)
Epoch 455 | Train: 0.2309 | Val: 0.2403 | No Improvement (27/150)
Epoch 456 | Train: 0.2305 | Val: 0.2402 | No Improvement (28/150)
Epoch 457 | Train: 0.2311 | Val: 0.2401 | No Improvement (29/150)
Epoch 458 | Train: 0.2301 | Val: 0.2401 | No Improvement (30/150)
Epoch 459 | Train: 0.2307 | Val: 0.2403 | No Improvement (31/150)
Epoch 460 | Train: 0.2305 | Val: 0.2403 | No Improvement (32/150)
WARNING:google_auth_httplib2:httplib2 transport does not support per-request timeout. Set the timeout when constructing the httplib2.Http instance.
Maintenance: Emptying 'epoch' files from Drive Trash...
WARNING:google_auth_httplib2:httplib2 transport does not support per-request timeout. Set the timeout when constructing the httplib2.Http instance.
Deleting 10 'epoch' files from Trash...
Trash Purged.
Epoch 461 | Train: 0.2306 | Val: 0.2406 | No Improvement (33/150)
Epoch 462 | Train: 0.2313 | Val: 0.2410 | No Improvement (34/150)
Epoch 463 | Train: 0.2306 | Val: 0.2414 | No Improvement (35/150)
Epoch 464 | Train: 0.2302 | Val: 0.2417 | No Improvement (36/150)
Epoch 465 | Train: 0.2308 | Val: 0.2420 | No Improvement (37/150)
Epoch 466 | Train: 0.2307 | Val: 0.2422 | No Improvement (38/150)
Epoch 467 | Train: 0.2283 | Val: 0.2424 | No Improvement (39/150)
Epoch 468 | Train: 0.2304 | Val: 0.2425 | No Improvement (40/150)
Epoch 469 | Train: 0.2305 | Val: 0.2428 | No Improvement (41/150)
Epoch 470 | Train: 0.2301 | Val: 0.2429 | No Improvement (42/150)
WARNING:google_auth_httplib2:httplib2 transport does not support per-request timeout. Set the timeout when constructing the httplib2.Http instance. WARNING:google_auth_httplib2:httplib2 transport does not support per-request timeout. Set the timeout when constructing the httplib2.Http instance.
Maintenance: Emptying 'epoch' files from Drive Trash...
Deleting 8 'epoch' files from Trash...
Trash Purged.
Epoch 471 | Train: 0.2305 | Val: 0.2431 | No Improvement (43/150)
Epoch 472 | Train: 0.2303 | Val: 0.4298 | No Improvement (44/150)
Epoch 473 | Train: 0.2347 | Val: 0.3535 | No Improvement (45/150)
Epoch 474 | Train: 0.2325 | Val: 0.2685 | No Improvement (46/150)
Epoch 475 | Train: 0.2347 | Val: 0.2876 | No Improvement (47/150)
Epoch 476 | Train: 0.2336 | Val: 0.2328 | No Improvement (48/150)
Epoch 477 | Train: 0.2329 | Val: 0.2413 | No Improvement (49/150)
Epoch 478 | Train: 0.2301 | Val: 0.2961 | No Improvement (50/150)
Epoch 479 | Train: 0.2284 | Val: 0.2866 | No Improvement (51/150)
Epoch 480 | Train: 0.2269 | Val: 0.2378 | No Improvement (52/150)
WARNING:google_auth_httplib2:httplib2 transport does not support per-request timeout. Set the timeout when constructing the httplib2.Http instance.
Maintenance: Emptying 'epoch' files from Drive Trash...
WARNING:google_auth_httplib2:httplib2 transport does not support per-request timeout. Set the timeout when constructing the httplib2.Http instance.
Deleting 11 'epoch' files from Trash...
Trash Purged.
Epoch 481 | Train: 0.2252 | Val: 0.2627 | No Improvement (53/150)
Epoch 482 | Train: 0.2287 | Val: 0.2488 | No Improvement (54/150)
Epoch 483 | Train: 0.2279 | Val: 0.2370 | No Improvement (55/150)
Epoch 484 | Train: 0.2251 | Val: 0.2169 | New Best Model!
Epoch 485 | Train: 0.2346 | Val: 0.2316 | No Improvement (1/150)
Epoch 486 | Train: 0.2251 | Val: 0.2509 | No Improvement (2/150)
Epoch 487 | Train: 0.2311 | Val: 0.2859 | No Improvement (3/150)
Epoch 488 | Train: 0.2292 | Val: 0.2495 | No Improvement (4/150)
Epoch 489 | Train: 0.2314 | Val: 0.2588 | No Improvement (5/150)
Epoch 490 | Train: 0.2306 | Val: 0.2920 | No Improvement (6/150)
WARNING:google_auth_httplib2:httplib2 transport does not support per-request timeout. Set the timeout when constructing the httplib2.Http instance.
Maintenance: Emptying 'epoch' files from Drive Trash...
WARNING:google_auth_httplib2:httplib2 transport does not support per-request timeout. Set the timeout when constructing the httplib2.Http instance.
Deleting 11 'epoch' files from Trash...
Trash Purged.
Epoch 491 | Train: 0.2266 | Val: 0.2745 | No Improvement (7/150)
Epoch 492 | Train: 0.2235 | Val: 0.2874 | No Improvement (8/150)
Epoch 493 | Train: 0.2196 | Val: 0.2748 | No Improvement (9/150)
Epoch 494 | Train: 0.2273 | Val: 0.2980 | No Improvement (10/150)
Epoch 495 | Train: 0.2296 | Val: 0.3445 | No Improvement (11/150)
Epoch 496 | Train: 0.2231 | Val: 0.2936 | No Improvement (12/150)
Epoch 497 | Train: 0.2263 | Val: 0.2717 | No Improvement (13/150)
Epoch 498 | Train: 0.2211 | Val: 0.2624 | No Improvement (14/150)
Epoch 499 | Train: 0.2233 | Val: 0.2607 | No Improvement (15/150)
Epoch 500 | Train: 0.2223 | Val: 0.2738 | No Improvement (16/150)
WARNING:google_auth_httplib2:httplib2 transport does not support per-request timeout. Set the timeout when constructing the httplib2.Http instance.
Maintenance: Emptying 'epoch' files from Drive Trash...
WARNING:google_auth_httplib2:httplib2 transport does not support per-request timeout. Set the timeout when constructing the httplib2.Http instance.
Deleting 10 'epoch' files from Trash...
Trash Purged.
Epoch 501 | Train: 0.2228 | Val: 0.2575 | No Improvement (17/150)
Epoch 502 | Train: 0.2199 | Val: 0.2409 | No Improvement (18/150)
Epoch 503 | Train: 0.2180 | Val: 0.2458 | No Improvement (19/150)
Epoch 504 | Train: 0.2175 | Val: 0.2508 | No Improvement (20/150)
Epoch 505 | Train: 0.2167 | Val: 0.2566 | No Improvement (21/150)
Epoch 506 | Train: 0.2240 | Val: 0.2423 | No Improvement (22/150)
Epoch 507 | Train: 0.2148 | Val: 0.2458 | No Improvement (23/150)
Epoch 508 | Train: 0.2205 | Val: 0.2703 | No Improvement (24/150)
Epoch 509 | Train: 0.2206 | Val: 0.2255 | No Improvement (25/150)
Epoch 510 | Train: 0.2138 | Val: 0.2389 | No Improvement (26/150)
WARNING:google_auth_httplib2:httplib2 transport does not support per-request timeout. Set the timeout when constructing the httplib2.Http instance. WARNING:google_auth_httplib2:httplib2 transport does not support per-request timeout. Set the timeout when constructing the httplib2.Http instance.
Maintenance: Emptying 'epoch' files from Drive Trash...
Deleting 10 'epoch' files from Trash...
Trash Purged.
Epoch 511 | Train: 0.2190 | Val: 0.2793 | No Improvement (27/150)
Epoch 512 | Train: 0.2215 | Val: 0.2425 | No Improvement (28/150)
Epoch 513 | Train: 0.2110 | Val: 0.2228 | No Improvement (29/150)
Epoch 514 | Train: 0.2172 | Val: 0.2427 | No Improvement (30/150)
Epoch 515 | Train: 0.2098 | Val: 0.2524 | No Improvement (31/150)
Epoch 516 | Train: 0.2162 | Val: 0.2377 | No Improvement (32/150)
Epoch 517 | Train: 0.2145 | Val: 0.2271 | No Improvement (33/150)
Epoch 518 | Train: 0.2136 | Val: 0.2317 | No Improvement (34/150)
Epoch 519 | Train: 0.2126 | Val: 0.2309 | No Improvement (35/150)
Epoch 520 | Train: 0.2103 | Val: 0.2177 | No Improvement (36/150)
WARNING:google_auth_httplib2:httplib2 transport does not support per-request timeout. Set the timeout when constructing the httplib2.Http instance.
Maintenance: Emptying 'epoch' files from Drive Trash...
WARNING:google_auth_httplib2:httplib2 transport does not support per-request timeout. Set the timeout when constructing the httplib2.Http instance.
Deleting 10 'epoch' files from Trash...
Trash Purged.
Epoch 521 | Train: 0.2118 | Val: 0.2246 | No Improvement (37/150)
Epoch 522 | Train: 0.2082 | Val: 0.2379 | No Improvement (38/150)
Epoch 523 | Train: 0.2073 | Val: 0.2471 | No Improvement (39/150)
Epoch 524 | Train: 0.2151 | Val: 0.2624 | No Improvement (40/150)
Epoch 525 | Train: 0.2120 | Val: 0.2599 | No Improvement (41/150)
Epoch 526 | Train: 0.2122 | Val: 0.2416 | No Improvement (42/150)
Epoch 527 | Train: 0.2170 | Val: 0.2349 | No Improvement (43/150)
Epoch 528 | Train: 0.2067 | Val: 0.2646 | No Improvement (44/150)
Epoch 529 | Train: 0.2121 | Val: 0.2697 | No Improvement (45/150)
Epoch 530 | Train: 0.2105 | Val: 0.2549 | No Improvement (46/150)
WARNING:google_auth_httplib2:httplib2 transport does not support per-request timeout. Set the timeout when constructing the httplib2.Http instance.
Maintenance: Emptying 'epoch' files from Drive Trash...
WARNING:google_auth_httplib2:httplib2 transport does not support per-request timeout. Set the timeout when constructing the httplib2.Http instance.
Deleting 8 'epoch' files from Trash...
Trash Purged.
Epoch 531 | Train: 0.2087 | Val: 0.2428 | No Improvement (47/150)
Epoch 532 | Train: 0.2110 | Val: 0.2655 | No Improvement (48/150)
Epoch 533 | Train: 0.2105 | Val: 0.2502 | No Improvement (49/150)
Epoch 534 | Train: 0.2098 | Val: 0.2236 | No Improvement (50/150)
Epoch 535 | Train: 0.2056 | Val: 0.2356 | No Improvement (51/150)
Epoch 536 | Train: 0.2097 | Val: 0.2369 | No Improvement (52/150)
Epoch 537 | Train: 0.2078 | Val: 0.2203 | No Improvement (53/150)
Epoch 538 | Train: 0.2086 | Val: 0.2080 | New Best Model!
Epoch 539 | Train: 0.2052 | Val: 0.2262 | No Improvement (1/150)
Epoch 540 | Train: 0.2047 | Val: 0.2486 | No Improvement (2/150)
WARNING:google_auth_httplib2:httplib2 transport does not support per-request timeout. Set the timeout when constructing the httplib2.Http instance. WARNING:google_auth_httplib2:httplib2 transport does not support per-request timeout. Set the timeout when constructing the httplib2.Http instance.
Maintenance: Emptying 'epoch' files from Drive Trash...
Deleting 12 'epoch' files from Trash...
Trash Purged.
Epoch 541 | Train: 0.2056 | Val: 0.2398 | No Improvement (3/150)
Epoch 542 | Train: 0.2053 | Val: 0.2418 | No Improvement (4/150)
Epoch 543 | Train: 0.2038 | Val: 0.2537 | No Improvement (5/150)
Epoch 544 | Train: 0.2043 | Val: 0.2697 | No Improvement (6/150)
Epoch 545 | Train: 0.2018 | Val: 0.2799 | No Improvement (7/150)
Epoch 546 | Train: 0.2017 | Val: 0.2553 | No Improvement (8/150)
Epoch 547 | Train: 0.2013 | Val: 0.2358 | No Improvement (9/150)
Epoch 548 | Train: 0.2001 | Val: 0.2332 | No Improvement (10/150)
Epoch 549 | Train: 0.2012 | Val: 0.2265 | No Improvement (11/150)
Epoch 550 | Train: 0.1988 | Val: 0.2332 | No Improvement (12/150)
WARNING:google_auth_httplib2:httplib2 transport does not support per-request timeout. Set the timeout when constructing the httplib2.Http instance.
Maintenance: Emptying 'epoch' files from Drive Trash...
WARNING:google_auth_httplib2:httplib2 transport does not support per-request timeout. Set the timeout when constructing the httplib2.Http instance.
Deleting 10 'epoch' files from Trash...
Trash Purged.
Epoch 551 | Train: 0.2013 | Val: 0.2356 | No Improvement (13/150)
Epoch 552 | Train: 0.1982 | Val: 0.2311 | No Improvement (14/150)
Epoch 553 | Train: 0.1983 | Val: 0.2350 | No Improvement (15/150)
Epoch 554 | Train: 0.1964 | Val: 0.2464 | No Improvement (16/150)
Epoch 555 | Train: 0.2012 | Val: 0.2560 | No Improvement (17/150)
Epoch 556 | Train: 0.1971 | Val: 0.2409 | No Improvement (18/150)
Epoch 557 | Train: 0.1952 | Val: 0.2339 | No Improvement (19/150)
Epoch 558 | Train: 0.1994 | Val: 0.2290 | No Improvement (20/150)
Epoch 559 | Train: 0.1959 | Val: 0.2533 | No Improvement (21/150)
Epoch 560 | Train: 0.1973 | Val: 0.2483 | No Improvement (22/150)
WARNING:google_auth_httplib2:httplib2 transport does not support per-request timeout. Set the timeout when constructing the httplib2.Http instance.
Maintenance: Emptying 'epoch' files from Drive Trash...
WARNING:google_auth_httplib2:httplib2 transport does not support per-request timeout. Set the timeout when constructing the httplib2.Http instance.
Deleting 8 'epoch' files from Trash...
Trash Purged.
Epoch 561 | Train: 0.1962 | Val: 0.2303 | No Improvement (23/150)
Epoch 562 | Train: 0.1935 | Val: 0.2239 | No Improvement (24/150)
Epoch 563 | Train: 0.1945 | Val: 0.2241 | No Improvement (25/150)
Epoch 564 | Train: 0.1946 | Val: 0.2194 | No Improvement (26/150)
Epoch 565 | Train: 0.1929 | Val: 0.2195 | No Improvement (27/150)
Epoch 566 | Train: 0.1931 | Val: 0.2297 | No Improvement (28/150)
Epoch 567 | Train: 0.1977 | Val: 0.2414 | No Improvement (29/150)
Epoch 568 | Train: 0.1909 | Val: 0.2318 | No Improvement (30/150)
Epoch 569 | Train: 0.1949 | Val: 0.2151 | No Improvement (31/150)
Epoch 570 | Train: 0.1954 | Val: 0.2220 | No Improvement (32/150)
WARNING:google_auth_httplib2:httplib2 transport does not support per-request timeout. Set the timeout when constructing the httplib2.Http instance.
Maintenance: Emptying 'epoch' files from Drive Trash...
WARNING:google_auth_httplib2:httplib2 transport does not support per-request timeout. Set the timeout when constructing the httplib2.Http instance.
Deleting 12 'epoch' files from Trash...
Trash Purged.
Epoch 571 | Train: 0.1932 | Val: 0.2426 | No Improvement (33/150)
Epoch 572 | Train: 0.1955 | Val: 0.2358 | No Improvement (34/150)
Epoch 573 | Train: 0.1922 | Val: 0.2169 | No Improvement (35/150)
Epoch 574 | Train: 0.1888 | Val: 0.2121 | No Improvement (36/150)
Epoch 575 | Train: 0.1897 | Val: 0.2162 | No Improvement (37/150)
Epoch 576 | Train: 0.1907 | Val: 0.2310 | No Improvement (38/150)
Epoch 577 | Train: 0.1887 | Val: 0.2238 | No Improvement (39/150)
Epoch 578 | Train: 0.1892 | Val: 0.2123 | No Improvement (40/150)
Epoch 579 | Train: 0.1884 | Val: 0.2148 | No Improvement (41/150)
Epoch 580 | Train: 0.1877 | Val: 0.2379 | No Improvement (42/150)
WARNING:google_auth_httplib2:httplib2 transport does not support per-request timeout. Set the timeout when constructing the httplib2.Http instance. WARNING:google_auth_httplib2:httplib2 transport does not support per-request timeout. Set the timeout when constructing the httplib2.Http instance.
Maintenance: Emptying 'epoch' files from Drive Trash...
Deleting 10 'epoch' files from Trash...
Trash Purged.
Epoch 581 | Train: 0.1878 | Val: 0.2466 | No Improvement (43/150)
Epoch 582 | Train: 0.1924 | Val: 0.2216 | No Improvement (44/150)
Epoch 583 | Train: 0.1867 | Val: 0.2325 | No Improvement (45/150)
Epoch 584 | Train: 0.1873 | Val: 0.2409 | No Improvement (46/150)
Epoch 585 | Train: 0.1863 | Val: 0.2324 | No Improvement (47/150)
Epoch 586 | Train: 0.1915 | Val: 0.2263 | No Improvement (48/150)
Epoch 587 | Train: 0.1870 | Val: 0.2199 | No Improvement (49/150)
Epoch 588 | Train: 0.1863 | Val: 0.2251 | No Improvement (50/150)
Epoch 589 | Train: 0.1886 | Val: 0.2200 | No Improvement (51/150)
Epoch 590 | Train: 0.1883 | Val: 0.2169 | No Improvement (52/150)
WARNING:google_auth_httplib2:httplib2 transport does not support per-request timeout. Set the timeout when constructing the httplib2.Http instance. WARNING:google_auth_httplib2:httplib2 transport does not support per-request timeout. Set the timeout when constructing the httplib2.Http instance.
Maintenance: Emptying 'epoch' files from Drive Trash...
Deleting 10 'epoch' files from Trash...
Trash Purged.
Epoch 591 | Train: 0.1843 | Val: 0.2148 | No Improvement (53/150)
Epoch 592 | Train: 0.1840 | Val: 0.2206 | No Improvement (54/150)
Epoch 593 | Train: 0.1869 | Val: 0.2233 | No Improvement (55/150)
Epoch 594 | Train: 0.1842 | Val: 0.2203 | No Improvement (56/150)
Epoch 595 | Train: 0.1833 | Val: 0.2129 | No Improvement (57/150)
Epoch 596 | Train: 0.1852 | Val: 0.2167 | No Improvement (58/150)
Epoch 597 | Train: 0.1844 | Val: 0.2175 | No Improvement (59/150)
Epoch 598 | Train: 0.1828 | Val: 0.2055 | New Best Model!
Epoch 599 | Train: 0.1814 | Val: 0.2085 | No Improvement (1/150)
Epoch 600 | Train: 0.1830 | Val: 0.2295 | No Improvement (2/150)
WARNING:google_auth_httplib2:httplib2 transport does not support per-request timeout. Set the timeout when constructing the httplib2.Http instance. WARNING:google_auth_httplib2:httplib2 transport does not support per-request timeout. Set the timeout when constructing the httplib2.Http instance.
Maintenance: Emptying 'epoch' files from Drive Trash...
Deleting 9 'epoch' files from Trash...
Trash Purged.
Epoch 601 | Train: 0.1831 | Val: 0.2368 | No Improvement (3/150)
Epoch 602 | Train: 0.1847 | Val: 0.2253 | No Improvement (4/150)
Epoch 603 | Train: 0.1822 | Val: 0.2245 | No Improvement (5/150)
Epoch 604 | Train: 0.1835 | Val: 0.2340 | No Improvement (6/150)
Epoch 605 | Train: 0.1821 | Val: 0.2265 | No Improvement (7/150)
Epoch 606 | Train: 0.1812 | Val: 0.2236 | No Improvement (8/150)
Epoch 607 | Train: 0.1809 | Val: 0.2177 | No Improvement (9/150)
Epoch 608 | Train: 0.1802 | Val: 0.2103 | No Improvement (10/150)
Epoch 609 | Train: 0.1803 | Val: 0.2109 | No Improvement (11/150)
Epoch 610 | Train: 0.1792 | Val: 0.2154 | No Improvement (12/150)
WARNING:google_auth_httplib2:httplib2 transport does not support per-request timeout. Set the timeout when constructing the httplib2.Http instance.
Maintenance: Emptying 'epoch' files from Drive Trash...
WARNING:google_auth_httplib2:httplib2 transport does not support per-request timeout. Set the timeout when constructing the httplib2.Http instance.
Deleting 11 'epoch' files from Trash...
Trash Purged.
Epoch 611 | Train: 0.1819 | Val: 0.2276 | No Improvement (13/150)
Epoch 612 | Train: 0.1797 | Val: 0.2305 | No Improvement (14/150)
Epoch 613 | Train: 0.1790 | Val: 0.2273 | No Improvement (15/150)
Epoch 614 | Train: 0.1774 | Val: 0.2289 | No Improvement (16/150)
Epoch 615 | Train: 0.1784 | Val: 0.2226 | No Improvement (17/150)
Epoch 616 | Train: 0.1804 | Val: 0.2158 | No Improvement (18/150)
Epoch 617 | Train: 0.1778 | Val: 0.2082 | No Improvement (19/150)
Epoch 618 | Train: 0.1766 | Val: 0.2213 | No Improvement (20/150)
Epoch 619 | Train: 0.1787 | Val: 0.2314 | No Improvement (21/150)
Epoch 620 | Train: 0.1766 | Val: 0.2175 | No Improvement (22/150)
Maintenance: Emptying 'epoch' files from Drive Trash...
WARNING:google_auth_httplib2:httplib2 transport does not support per-request timeout. Set the timeout when constructing the httplib2.Http instance. WARNING:google_auth_httplib2:httplib2 transport does not support per-request timeout. Set the timeout when constructing the httplib2.Http instance.
Deleting 9 'epoch' files from Trash...
Trash Purged.
Epoch 621 | Train: 0.1756 | Val: 0.2241 | No Improvement (23/150)
Epoch 622 | Train: 0.1764 | Val: 0.2274 | No Improvement (24/150)
Epoch 623 | Train: 0.1746 | Val: 0.2293 | No Improvement (25/150)
Epoch 624 | Train: 0.1774 | Val: 0.2292 | No Improvement (26/150)
Epoch 625 | Train: 0.1752 | Val: 0.2101 | No Improvement (27/150)
Epoch 626 | Train: 0.1741 | Val: 0.2117 | No Improvement (28/150)
Epoch 627 | Train: 0.1765 | Val: 0.2163 | No Improvement (29/150)
Epoch 628 | Train: 0.1732 | Val: 0.2150 | No Improvement (30/150)
Epoch 629 | Train: 0.1790 | Val: 0.2101 | No Improvement (31/150)
Epoch 630 | Train: 0.1778 | Val: 0.2126 | No Improvement (32/150)
Maintenance: Emptying 'epoch' files from Drive Trash...
WARNING:google_auth_httplib2:httplib2 transport does not support per-request timeout. Set the timeout when constructing the httplib2.Http instance. WARNING:google_auth_httplib2:httplib2 transport does not support per-request timeout. Set the timeout when constructing the httplib2.Http instance.
Deleting 11 'epoch' files from Trash...
Trash Purged.
Epoch 631 | Train: 0.1776 | Val: 0.2127 | No Improvement (33/150)
Epoch 632 | Train: 0.1725 | Val: 0.2146 | No Improvement (34/150)
Epoch 633 | Train: 0.1722 | Val: 0.2165 | No Improvement (35/150)
Epoch 634 | Train: 0.1749 | Val: 0.2232 | No Improvement (36/150)
Epoch 635 | Train: 0.1763 | Val: 0.2326 | No Improvement (37/150)
Epoch 636 | Train: 0.1723 | Val: 0.2254 | No Improvement (38/150)
Epoch 637 | Train: 0.1752 | Val: 0.2079 | No Improvement (39/150)
Epoch 638 | Train: 0.1744 | Val: 0.2033 | New Best Model!
Epoch 639 | Train: 0.1735 | Val: 0.2168 | No Improvement (1/150)
Epoch 640 | Train: 0.1712 | Val: 0.2325 | No Improvement (2/150)
WARNING:google_auth_httplib2:httplib2 transport does not support per-request timeout. Set the timeout when constructing the httplib2.Http instance.
Maintenance: Emptying 'epoch' files from Drive Trash...
WARNING:google_auth_httplib2:httplib2 transport does not support per-request timeout. Set the timeout when constructing the httplib2.Http instance.
Deleting 10 'epoch' files from Trash...
Trash Purged.
Epoch 641 | Train: 0.1753 | Val: 0.2287 | No Improvement (3/150)
Epoch 642 | Train: 0.1745 | Val: 0.2204 | No Improvement (4/150)
Epoch 643 | Train: 0.1737 | Val: 0.2244 | No Improvement (5/150)
Epoch 644 | Train: 0.1730 | Val: 0.2299 | No Improvement (6/150)
Epoch 645 | Train: 0.1748 | Val: 0.2252 | No Improvement (7/150)
Epoch 646 | Train: 0.1742 | Val: 0.2177 | No Improvement (8/150)
Epoch 647 | Train: 0.1741 | Val: 0.2123 | No Improvement (9/150)
Epoch 648 | Train: 0.1724 | Val: 0.2157 | No Improvement (10/150)
Epoch 649 | Train: 0.1708 | Val: 0.2284 | No Improvement (11/150)
Epoch 650 | Train: 0.1735 | Val: 0.2236 | No Improvement (12/150)
WARNING:google_auth_httplib2:httplib2 transport does not support per-request timeout. Set the timeout when constructing the httplib2.Http instance.
Maintenance: Emptying 'epoch' files from Drive Trash...
WARNING:google_auth_httplib2:httplib2 transport does not support per-request timeout. Set the timeout when constructing the httplib2.Http instance.
Deleting 10 'epoch' files from Trash...
Trash Purged.
Epoch 651 | Train: 0.1702 | Val: 0.2098 | No Improvement (13/150)
Epoch 652 | Train: 0.1714 | Val: 0.2131 | No Improvement (14/150)
Epoch 653 | Train: 0.1723 | Val: 0.2121 | No Improvement (15/150)
Epoch 654 | Train: 0.1715 | Val: 0.2155 | No Improvement (16/150)
Epoch 655 | Train: 0.1721 | Val: 0.2227 | No Improvement (17/150)
Epoch 656 | Train: 0.1712 | Val: 0.2215 | No Improvement (18/150)
Epoch 657 | Train: 0.1708 | Val: 0.2232 | No Improvement (19/150)
Epoch 658 | Train: 0.1708 | Val: 0.2273 | No Improvement (20/150)
Epoch 659 | Train: 0.1697 | Val: 0.2126 | No Improvement (21/150)
Epoch 660 | Train: 0.1696 | Val: 0.2042 | No Improvement (22/150)
WARNING:google_auth_httplib2:httplib2 transport does not support per-request timeout. Set the timeout when constructing the httplib2.Http instance. WARNING:google_auth_httplib2:httplib2 transport does not support per-request timeout. Set the timeout when constructing the httplib2.Http instance.
Maintenance: Emptying 'epoch' files from Drive Trash...
Deleting 10 'epoch' files from Trash...
Trash Purged.
Epoch 661 | Train: 0.1698 | Val: 0.2140 | No Improvement (23/150)
Epoch 662 | Train: 0.1687 | Val: 0.2221 | No Improvement (24/150)
Epoch 663 | Train: 0.1679 | Val: 0.2227 | No Improvement (25/150)
Epoch 664 | Train: 0.1675 | Val: 0.2160 | No Improvement (26/150)
Epoch 665 | Train: 0.1698 | Val: 0.2149 | No Improvement (27/150)
Epoch 666 | Train: 0.1684 | Val: 0.2167 | No Improvement (28/150)
Epoch 667 | Train: 0.1702 | Val: 0.2150 | No Improvement (29/150)
Epoch 668 | Train: 0.1686 | Val: 0.2158 | No Improvement (30/150)
Epoch 669 | Train: 0.1695 | Val: 0.2224 | No Improvement (31/150)
Epoch 670 | Train: 0.1662 | Val: 0.2236 | No Improvement (32/150)
WARNING:google_auth_httplib2:httplib2 transport does not support per-request timeout. Set the timeout when constructing the httplib2.Http instance. WARNING:google_auth_httplib2:httplib2 transport does not support per-request timeout. Set the timeout when constructing the httplib2.Http instance.
Maintenance: Emptying 'epoch' files from Drive Trash...
Deleting 9 'epoch' files from Trash...
Trash Purged.
Epoch 671 | Train: 0.1677 | Val: 0.2177 | No Improvement (33/150)
Epoch 672 | Train: 0.1686 | Val: 0.2092 | No Improvement (34/150)
Epoch 673 | Train: 0.1656 | Val: 0.2036 | No Improvement (35/150)
Epoch 674 | Train: 0.1658 | Val: 0.2116 | No Improvement (36/150)
Epoch 675 | Train: 0.1680 | Val: 0.2260 | No Improvement (37/150)
Epoch 676 | Train: 0.1674 | Val: 0.2313 | No Improvement (38/150)
Epoch 677 | Train: 0.1670 | Val: 0.2206 | No Improvement (39/150)
Epoch 678 | Train: 0.1666 | Val: 0.2087 | No Improvement (40/150)
Epoch 679 | Train: 0.1673 | Val: 0.2041 | No Improvement (41/150)
Epoch 680 | Train: 0.1665 | Val: 0.2030 | New Best Model!
WARNING:google_auth_httplib2:httplib2 transport does not support per-request timeout. Set the timeout when constructing the httplib2.Http instance. WARNING:google_auth_httplib2:httplib2 transport does not support per-request timeout. Set the timeout when constructing the httplib2.Http instance.
Maintenance: Emptying 'epoch' files from Drive Trash...
Deleting 11 'epoch' files from Trash...
Trash Purged.
Epoch 681 | Train: 0.1665 | Val: 0.2064 | No Improvement (1/150)
Epoch 682 | Train: 0.1662 | Val: 0.2092 | No Improvement (2/150)
Epoch 683 | Train: 0.1656 | Val: 0.2096 | No Improvement (3/150)
Epoch 684 | Train: 0.1640 | Val: 0.2137 | No Improvement (4/150)
Epoch 685 | Train: 0.1641 | Val: 0.2133 | No Improvement (5/150)
Epoch 686 | Train: 0.1657 | Val: 0.2097 | No Improvement (6/150)
Epoch 687 | Train: 0.1632 | Val: 0.2129 | No Improvement (7/150)
Epoch 688 | Train: 0.1649 | Val: 0.2162 | No Improvement (8/150)
Epoch 689 | Train: 0.1649 | Val: 0.2155 | No Improvement (9/150)
Epoch 690 | Train: 0.1646 | Val: 0.2146 | No Improvement (10/150)
WARNING:google_auth_httplib2:httplib2 transport does not support per-request timeout. Set the timeout when constructing the httplib2.Http instance.
Maintenance: Emptying 'epoch' files from Drive Trash...
WARNING:google_auth_httplib2:httplib2 transport does not support per-request timeout. Set the timeout when constructing the httplib2.Http instance.
Deleting 10 'epoch' files from Trash...
Trash Purged.
Epoch 691 | Train: 0.1644 | Val: 0.2159 | No Improvement (11/150)
Epoch 692 | Train: 0.1642 | Val: 0.2198 | No Improvement (12/150)
Epoch 693 | Train: 0.1644 | Val: 0.2237 | No Improvement (13/150)
Epoch 694 | Train: 0.1642 | Val: 0.2186 | No Improvement (14/150)
Epoch 695 | Train: 0.1626 | Val: 0.2102 | No Improvement (15/150)
Epoch 696 | Train: 0.1636 | Val: 0.2101 | No Improvement (16/150)
Epoch 697 | Train: 0.1646 | Val: 0.2134 | No Improvement (17/150)
Epoch 698 | Train: 0.1635 | Val: 0.2144 | No Improvement (18/150)
Epoch 699 | Train: 0.1630 | Val: 0.2162 | No Improvement (19/150)
Epoch 700 | Train: 0.1639 | Val: 0.2112 | No Improvement (20/150)
WARNING:google_auth_httplib2:httplib2 transport does not support per-request timeout. Set the timeout when constructing the httplib2.Http instance. WARNING:google_auth_httplib2:httplib2 transport does not support per-request timeout. Set the timeout when constructing the httplib2.Http instance.
Maintenance: Emptying 'epoch' files from Drive Trash...
Deleting 10 'epoch' files from Trash...
Trash Purged.
Epoch 701 | Train: 0.1624 | Val: 0.2062 | No Improvement (21/150)
Epoch 702 | Train: 0.1624 | Val: 0.2033 | No Improvement (22/150)
Epoch 703 | Train: 0.1622 | Val: 0.2059 | No Improvement (23/150)
Epoch 704 | Train: 0.1630 | Val: 0.2100 | No Improvement (24/150)
Epoch 705 | Train: 0.1626 | Val: 0.2148 | No Improvement (25/150)
Epoch 706 | Train: 0.1623 | Val: 0.2154 | No Improvement (26/150)
Epoch 707 | Train: 0.1619 | Val: 0.2082 | No Improvement (27/150)
Epoch 708 | Train: 0.1613 | Val: 0.2065 | No Improvement (28/150)
Epoch 709 | Train: 0.1608 | Val: 0.2095 | No Improvement (29/150)
Epoch 710 | Train: 0.1622 | Val: 0.2125 | No Improvement (30/150)
WARNING:google_auth_httplib2:httplib2 transport does not support per-request timeout. Set the timeout when constructing the httplib2.Http instance.
Maintenance: Emptying 'epoch' files from Drive Trash...
WARNING:google_auth_httplib2:httplib2 transport does not support per-request timeout. Set the timeout when constructing the httplib2.Http instance.
Deleting 8 'epoch' files from Trash...
Trash Purged.
Epoch 711 | Train: 0.1627 | Val: 0.2159 | No Improvement (31/150)
Epoch 712 | Train: 0.1622 | Val: 0.2157 | No Improvement (32/150)
Epoch 713 | Train: 0.1606 | Val: 0.2111 | No Improvement (33/150)
Epoch 714 | Train: 0.1602 | Val: 0.2114 | No Improvement (34/150)
Epoch 715 | Train: 0.1617 | Val: 0.2147 | No Improvement (35/150)
Epoch 716 | Train: 0.1615 | Val: 0.2131 | No Improvement (36/150)
Epoch 717 | Train: 0.1612 | Val: 0.2111 | No Improvement (37/150)
Epoch 718 | Train: 0.1596 | Val: 0.2069 | No Improvement (38/150)
Epoch 719 | Train: 0.1595 | Val: 0.2034 | No Improvement (39/150)
Epoch 720 | Train: 0.1587 | Val: 0.2062 | No Improvement (40/150)
WARNING:google_auth_httplib2:httplib2 transport does not support per-request timeout. Set the timeout when constructing the httplib2.Http instance. WARNING:google_auth_httplib2:httplib2 transport does not support per-request timeout. Set the timeout when constructing the httplib2.Http instance.
Maintenance: Emptying 'epoch' files from Drive Trash...
Deleting 10 'epoch' files from Trash...
Trash Purged.
Epoch 721 | Train: 0.1609 | Val: 0.2137 | No Improvement (41/150)
Epoch 722 | Train: 0.1617 | Val: 0.2175 | No Improvement (42/150)
Epoch 723 | Train: 0.1613 | Val: 0.2176 | No Improvement (43/150)
Epoch 724 | Train: 0.1600 | Val: 0.2160 | No Improvement (44/150)
Epoch 725 | Train: 0.1611 | Val: 0.2149 | No Improvement (45/150)
Epoch 726 | Train: 0.1615 | Val: 0.2094 | No Improvement (46/150)
Epoch 727 | Train: 0.1585 | Val: 0.2065 | No Improvement (47/150)
Epoch 728 | Train: 0.1608 | Val: 0.2082 | No Improvement (48/150)
Epoch 729 | Train: 0.1579 | Val: 0.2103 | No Improvement (49/150)
Epoch 730 | Train: 0.1595 | Val: 0.2141 | No Improvement (50/150)
WARNING:google_auth_httplib2:httplib2 transport does not support per-request timeout. Set the timeout when constructing the httplib2.Http instance.
Maintenance: Emptying 'epoch' files from Drive Trash...
WARNING:google_auth_httplib2:httplib2 transport does not support per-request timeout. Set the timeout when constructing the httplib2.Http instance.
Deleting 12 'epoch' files from Trash...
Trash Purged.
Epoch 731 | Train: 0.1607 | Val: 0.2141 | No Improvement (51/150)
Epoch 732 | Train: 0.1576 | Val: 0.2118 | No Improvement (52/150)
Epoch 733 | Train: 0.1606 | Val: 0.2085 | No Improvement (53/150)
Epoch 734 | Train: 0.1592 | Val: 0.2060 | No Improvement (54/150)
Epoch 735 | Train: 0.1573 | Val: 0.2059 | No Improvement (55/150)
Epoch 736 | Train: 0.1571 | Val: 0.2092 | No Improvement (56/150)
Epoch 737 | Train: 0.1602 | Val: 0.2119 | No Improvement (57/150)
Epoch 738 | Train: 0.1587 | Val: 0.2114 | No Improvement (58/150)
Epoch 739 | Train: 0.1598 | Val: 0.2113 | No Improvement (59/150)
Epoch 740 | Train: 0.1586 | Val: 0.2105 | No Improvement (60/150)
WARNING:google_auth_httplib2:httplib2 transport does not support per-request timeout. Set the timeout when constructing the httplib2.Http instance.
Maintenance: Emptying 'epoch' files from Drive Trash...
WARNING:google_auth_httplib2:httplib2 transport does not support per-request timeout. Set the timeout when constructing the httplib2.Http instance.
Deleting 10 'epoch' files from Trash...
Trash Purged.
Epoch 741 | Train: 0.1567 | Val: 0.2075 | No Improvement (61/150)
Epoch 742 | Train: 0.1584 | Val: 0.2048 | No Improvement (62/150)
Epoch 743 | Train: 0.1595 | Val: 0.2031 | No Improvement (63/150)
Epoch 744 | Train: 0.1596 | Val: 0.2047 | No Improvement (64/150)
Epoch 745 | Train: 0.1578 | Val: 0.2076 | No Improvement (65/150)
Epoch 746 | Train: 0.1591 | Val: 0.2096 | No Improvement (66/150)
Epoch 747 | Train: 0.1592 | Val: 0.2091 | No Improvement (67/150)
Epoch 748 | Train: 0.1592 | Val: 0.2080 | No Improvement (68/150)
Epoch 749 | Train: 0.1584 | Val: 0.2085 | No Improvement (69/150)
Epoch 750 | Train: 0.1565 | Val: 0.2098 | No Improvement (70/150)
WARNING:google_auth_httplib2:httplib2 transport does not support per-request timeout. Set the timeout when constructing the httplib2.Http instance. WARNING:google_auth_httplib2:httplib2 transport does not support per-request timeout. Set the timeout when constructing the httplib2.Http instance.
Maintenance: Emptying 'epoch' files from Drive Trash...
Deleting 9 'epoch' files from Trash...
Trash Purged.
Epoch 751 | Train: 0.1591 | Val: 0.2116 | No Improvement (71/150)
Epoch 752 | Train: 0.1564 | Val: 0.2123 | No Improvement (72/150)
Epoch 753 | Train: 0.1576 | Val: 0.2122 | No Improvement (73/150)
Epoch 754 | Train: 0.1580 | Val: 0.2102 | No Improvement (74/150)
Epoch 755 | Train: 0.1574 | Val: 0.2072 | No Improvement (75/150)
Epoch 756 | Train: 0.1581 | Val: 0.2039 | No Improvement (76/150)
Epoch 757 | Train: 0.1572 | Val: 0.2035 | No Improvement (77/150)
Epoch 758 | Train: 0.1588 | Val: 0.2045 | No Improvement (78/150)
Epoch 759 | Train: 0.1564 | Val: 0.2056 | No Improvement (79/150)
Epoch 760 | Train: 0.1574 | Val: 0.2048 | No Improvement (80/150)
WARNING:google_auth_httplib2:httplib2 transport does not support per-request timeout. Set the timeout when constructing the httplib2.Http instance.
Maintenance: Emptying 'epoch' files from Drive Trash...
WARNING:google_auth_httplib2:httplib2 transport does not support per-request timeout. Set the timeout when constructing the httplib2.Http instance.
Deleting 11 'epoch' files from Trash...
Trash Purged.
Epoch 761 | Train: 0.1582 | Val: 0.2044 | No Improvement (81/150)
Epoch 762 | Train: 0.1568 | Val: 0.2046 | No Improvement (82/150)
Epoch 763 | Train: 0.1554 | Val: 0.2045 | No Improvement (83/150)
Epoch 764 | Train: 0.1579 | Val: 0.2050 | No Improvement (84/150)
Epoch 765 | Train: 0.1581 | Val: 0.2069 | No Improvement (85/150)
Epoch 766 | Train: 0.1560 | Val: 0.2062 | No Improvement (86/150)
Epoch 767 | Train: 0.1578 | Val: 0.2050 | No Improvement (87/150)
Epoch 768 | Train: 0.1577 | Val: 0.2048 | No Improvement (88/150)
Epoch 769 | Train: 0.1556 | Val: 0.2052 | No Improvement (89/150)
Epoch 770 | Train: 0.1567 | Val: 0.2055 | No Improvement (90/150)
WARNING:google_auth_httplib2:httplib2 transport does not support per-request timeout. Set the timeout when constructing the httplib2.Http instance. WARNING:google_auth_httplib2:httplib2 transport does not support per-request timeout. Set the timeout when constructing the httplib2.Http instance.
Maintenance: Emptying 'epoch' files from Drive Trash...
Deleting 9 'epoch' files from Trash...
Trash Purged.
Epoch 771 | Train: 0.1572 | Val: 0.2052 | No Improvement (91/150)
Epoch 772 | Train: 0.1552 | Val: 0.2044 | No Improvement (92/150)
Epoch 773 | Train: 0.1573 | Val: 0.2036 | No Improvement (93/150)
Epoch 774 | Train: 0.1564 | Val: 0.2040 | No Improvement (94/150)
Epoch 775 | Train: 0.1564 | Val: 0.2047 | No Improvement (95/150)
Epoch 776 | Train: 0.1551 | Val: 0.2054 | No Improvement (96/150)
Epoch 777 | Train: 0.1551 | Val: 0.2061 | No Improvement (97/150)
Epoch 778 | Train: 0.1568 | Val: 0.2066 | No Improvement (98/150)
Epoch 779 | Train: 0.1551 | Val: 0.2070 | No Improvement (99/150)
Epoch 780 | Train: 0.1549 | Val: 0.2070 | No Improvement (100/150)
WARNING:google_auth_httplib2:httplib2 transport does not support per-request timeout. Set the timeout when constructing the httplib2.Http instance.
Maintenance: Emptying 'epoch' files from Drive Trash...
WARNING:google_auth_httplib2:httplib2 transport does not support per-request timeout. Set the timeout when constructing the httplib2.Http instance.
Deleting 11 'epoch' files from Trash...
Trash Purged.
Epoch 781 | Train: 0.1569 | Val: 0.2070 | No Improvement (101/150)
Epoch 782 | Train: 0.1560 | Val: 0.2064 | No Improvement (102/150)
Epoch 783 | Train: 0.1543 | Val: 0.2060 | No Improvement (103/150)
Epoch 784 | Train: 0.1569 | Val: 0.2056 | No Improvement (104/150)
Epoch 785 | Train: 0.1571 | Val: 0.2058 | No Improvement (105/150)
Epoch 786 | Train: 0.1543 | Val: 0.2055 | No Improvement (106/150)
Epoch 787 | Train: 0.1546 | Val: 0.2047 | No Improvement (107/150)
Epoch 788 | Train: 0.1544 | Val: 0.2045 | No Improvement (108/150)
Epoch 789 | Train: 0.1568 | Val: 0.2047 | No Improvement (109/150)
Epoch 790 | Train: 0.1564 | Val: 0.2056 | No Improvement (110/150)
WARNING:google_auth_httplib2:httplib2 transport does not support per-request timeout. Set the timeout when constructing the httplib2.Http instance.
Maintenance: Emptying 'epoch' files from Drive Trash...
WARNING:google_auth_httplib2:httplib2 transport does not support per-request timeout. Set the timeout when constructing the httplib2.Http instance.
Deleting 10 'epoch' files from Trash...
Trash Purged.
Epoch 791 | Train: 0.1561 | Val: 0.2068 | No Improvement (111/150)
Epoch 792 | Train: 0.1566 | Val: 0.2076 | No Improvement (112/150)
Epoch 793 | Train: 0.1567 | Val: 0.2078 | No Improvement (113/150)
Epoch 794 | Train: 0.1564 | Val: 0.2078 | No Improvement (114/150)
Epoch 795 | Train: 0.1565 | Val: 0.2078 | No Improvement (115/150)
Epoch 796 | Train: 0.1564 | Val: 0.2070 | No Improvement (116/150)
Epoch 797 | Train: 0.1561 | Val: 0.2061 | No Improvement (117/150)
Epoch 798 | Train: 0.1557 | Val: 0.2057 | No Improvement (118/150)
Epoch 799 | Train: 0.1540 | Val: 0.2057 | No Improvement (119/150)
Epoch 800 | Train: 0.1542 | Val: 0.2053 | No Improvement (120/150)
WARNING:google_auth_httplib2:httplib2 transport does not support per-request timeout. Set the timeout when constructing the httplib2.Http instance.
Maintenance: Emptying 'epoch' files from Drive Trash...
WARNING:google_auth_httplib2:httplib2 transport does not support per-request timeout. Set the timeout when constructing the httplib2.Http instance.
Deleting 10 'epoch' files from Trash...
Trash Purged.
Epoch 801 | Train: 0.1563 | Val: 0.2057 | No Improvement (121/150)
Epoch 802 | Train: 0.1560 | Val: 0.2062 | No Improvement (122/150)
Epoch 803 | Train: 0.1557 | Val: 0.2062 | No Improvement (123/150)
Epoch 804 | Train: 0.1538 | Val: 0.2063 | No Improvement (124/150)
Epoch 805 | Train: 0.1539 | Val: 0.2057 | No Improvement (125/150)
Epoch 806 | Train: 0.1558 | Val: 0.2052 | No Improvement (126/150)
Epoch 807 | Train: 0.1569 | Val: 0.2047 | No Improvement (127/150)
Epoch 808 | Train: 0.1556 | Val: 0.2047 | No Improvement (128/150)
Epoch 809 | Train: 0.1557 | Val: 0.2047 | No Improvement (129/150)
Epoch 810 | Train: 0.1551 | Val: 0.2047 | No Improvement (130/150)
WARNING:google_auth_httplib2:httplib2 transport does not support per-request timeout. Set the timeout when constructing the httplib2.Http instance.
Maintenance: Emptying 'epoch' files from Drive Trash...
WARNING:google_auth_httplib2:httplib2 transport does not support per-request timeout. Set the timeout when constructing the httplib2.Http instance.
Deleting 9 'epoch' files from Trash...
Trash Purged.
Epoch 811 | Train: 0.1559 | Val: 0.2049 | No Improvement (131/150)
Epoch 812 | Train: 0.1554 | Val: 0.2051 | No Improvement (132/150)
Epoch 813 | Train: 0.1550 | Val: 0.2055 | No Improvement (133/150)
Epoch 814 | Train: 0.1558 | Val: 0.2056 | No Improvement (134/150)
Epoch 815 | Train: 0.1537 | Val: 0.2055 | No Improvement (135/150)
Epoch 816 | Train: 0.1557 | Val: 0.2056 | No Improvement (136/150)
Epoch 817 | Train: 0.1549 | Val: 0.2058 | No Improvement (137/150)
Epoch 818 | Train: 0.1535 | Val: 0.2058 | No Improvement (138/150)
--------------------------------------------------------------------------- KeyboardInterrupt Traceback (most recent call last) /tmp/ipython-input-144100968.py in <cell line: 0>() 288 289 # Save Resume State --> 290 torch.save({ 291 'epoch': ep, 292 'model_state_dict': model.state_dict(), /usr/local/lib/python3.12/dist-packages/torch/serialization.py in save(obj, f, pickle_module, pickle_protocol, _use_new_zipfile_serialization, _disable_byteorder_record) 965 if _use_new_zipfile_serialization: 966 with _open_zipfile_writer(f) as opened_zipfile: --> 967 _save( 968 obj, 969 opened_zipfile, /usr/local/lib/python3.12/dist-packages/torch/serialization.py in _save(obj, zip_file, pickle_module, pickle_protocol, _disable_byteorder_record) 1266 storage = storage.cpu() 1267 # Now that it is on the CPU we can directly copy it into the zip file -> 1268 zip_file.write_record(name, storage, num_bytes) 1269 1270 KeyboardInterrupt:
In [ ]:
import torch
import torch.nn as nn
import numpy as np
import matplotlib.pyplot as plt
import os
import time
import cv2
from scipy.spatial.distance import directed_hausdorff
from sklearn.metrics import precision_score, recall_score, f1_score, accuracy_score, jaccard_score
from torch.utils.data import DataLoader, Dataset
from google.colab import drive
# 1. PATHS AND DEVICE SETUP
if not os.path.exists('/content/drive'):
drive.mount('/content/drive', force_remount=True)
# TARGET DIRECTORY FOR PARTIAL FINETUNING
SAVE_DIR = '/content/drive/MyDrive/SatMAE_PartialFT_Results_1/'
CHECKPOINT_PATH = os.path.join(SAVE_DIR, "checkpoint_satmae_partial.pth")
DEVICE = torch.device('cuda' if torch.cuda.is_available() else 'cpu')
# 2. DATA LOADER (MMAP for memory efficiency)
class MmapDataset(Dataset):
def __init__(self, x_path, y_path):
self.data = np.load(x_path, mmap_mode='r')
self.target = np.load(y_path, mmap_mode='r')
def __len__(self): return len(self.data)
def __getitem__(self, index):
return torch.from_numpy(self.data[index].copy()), torch.from_numpy(self.target[index].copy())
# 3. ADVANCED METRIC HELPERS
def calculate_boundary_iou(gt_mask, pred_mask):
# Detect edges to calculate IoU specifically on the boundaries
gt_edges = cv2.Canny(gt_mask.astype(np.uint8)*255, 100, 200) > 0
pred_edges = cv2.Canny(pred_mask.astype(np.uint8)*255, 100, 200) > 0
intersection = np.logical_and(gt_edges, pred_edges).sum()
union = np.logical_or(gt_edges, pred_edges).sum()
return intersection / union if union > 0 else 0.0
def calculate_hausdorff(gt_mask, pred_mask):
# Measure the maximum distance between the predicted boundary and the ground truth boundary
gt_coords = np.argwhere(gt_mask)
pred_coords = np.argwhere(pred_mask)
if len(gt_coords) == 0 or len(pred_coords) == 0: return 0.0
return max(directed_hausdorff(gt_coords, pred_coords)[0], directed_hausdorff(pred_coords, gt_coords)[0])
# 4. EXECUTION FUNCTION
def evaluate_partial_ft(model_dir, checkpoint_path, num_samples=3):
# Load Validation Data
val_x = os.path.join(model_dir, 'val_x.npy')
val_y = os.path.join(model_dir, 'val_y.npy')
val_ds = MmapDataset(val_x, val_y)
val_loader = DataLoader(val_ds, batch_size=8, shuffle=False)
# Initialize Model
model = SatMAESegmentation(num_frames=3, in_chans=6).to(DEVICE)
# Load Weights
if os.path.exists(checkpoint_path):
print(f" Loading Checkpoint: {checkpoint_path}")
ckpt = torch.load(checkpoint_path, map_location=DEVICE)
model.load_state_dict(ckpt['model_state_dict'])
else:
print(" Error: Checkpoint file not found.")
return
model.eval()
all_preds, all_targets = [], []
boundary_ious, hausdorff_dists = [], []
total_frames = 0
start_time = time.time()
print(" Calculating metrics...")
with torch.no_grad():
for x, y in val_loader:
x = x.to(DEVICE)
probs = torch.sigmoid(model(x))
preds_bin = (probs > 0.5).cpu().numpy().astype(np.uint8)
targets_bin = y.numpy().astype(np.uint8)
total_frames += x.size(0)
for i in range(preds_bin.shape[0]):
p, t = preds_bin[i, 0], targets_bin[i, 0]
boundary_ious.append(calculate_boundary_iou(t, p))
hausdorff_dists.append(calculate_hausdorff(t, p))
all_preds.append(p.flatten())
all_targets.append(t.flatten())
# Final Report Calculation
fps = total_frames / (time.time() - start_time)
y_p, y_t = np.concatenate(all_preds), np.concatenate(all_targets)
print("\n" + "="*50)
print(" SATMAE PARTIAL FT - PERFORMANCE ")
print("="*50)
print(f"Pixel Accuracy: {accuracy_score(y_t, y_p):.4f}")
print(f"IoU (Jaccard): {jaccard_score(y_t, y_p):.4f}")
print(f"F1-Score (Dice): {f1_score(y_t, y_p):.4f}")
print(f"Precision: {precision_score(y_t, y_p):.4f}")
print(f"Recall: {recall_score(y_t, y_p):.4f}")
print("-" * 30)
print(f"Boundary IoU: {np.mean(boundary_ious):.4f}")
print(f"Hausdorff Dist (px): {np.mean(hausdorff_dists):.2f}")
print(f"Inference Speed: {fps:.2f} FPS")
print("="*50 + "\n")
# VISUAL SAMPLES
print(" Plotting Samples...")
x_batch, y_batch = next(iter(val_loader))
with torch.no_grad():
vis_preds = (torch.sigmoid(model(x_batch.to(DEVICE))) > 0.5).cpu().numpy()
x_np = x_batch.numpy()
y_np = y_batch.numpy()
fig, axs = plt.subplots(num_samples, 3, figsize=(15, 5 * num_samples))
for i in range(num_samples):
# Extract RGB at Time Step 0 to avoid IndexErrors
# x_np shape: (Batch, Channels, Time, H, W)
try:
r, g, b = x_np[i, 2, 0], x_np[i, 1, 0], x_np[i, 0, 0]
img = np.stack([r, g, b], axis=2)
except:
img = x_np[i, 0, 0] # Fallback to single band
img = np.stack([img, img, img], axis=2)
# Normalize 0-1
img = (img - img.min()) / (img.max() - img.min() + 1e-6)
axs[i, 0].imshow(img)
axs[i, 0].set_title(f"Input Sample {i+1}")
axs[i, 1].imshow(y_np[i, 0], cmap='gray')
axs[i, 1].set_title("Ground Truth")
axs[i, 2].imshow(vis_preds[i, 0], cmap='gray')
iou = jaccard_score(y_np[i,0].flatten(), vis_preds[i,0].flatten())
axs[i, 2].set_title(f"Prediction (IoU: {iou:.2f})")
for ax in axs[i]: ax.axis('off')
plt.tight_layout()
plt.show()
# RUN EVALUATION
evaluate_partial_ft(SAVE_DIR, CHECKPOINT_PATH)
Initializing SatMAE Partial FT Model... Downloading Pretrained MAE Weights (facebook/vit-mae-base)... Weights Loaded! Applying Partial Freeze Strategy... Unfreezing Last 2 Encoder Blocks... Loading Checkpoint: /content/drive/MyDrive/SatMAE_PartialFT_Results_1/checkpoint_satmae_partial.pth
--------------------------------------------------------------------------- RuntimeError Traceback (most recent call last) /tmp/ipython-input-2482868117.py in <cell line: 0>() 143 144 # RUN EVALUATION --> 145 evaluate_partial_ft(SAVE_DIR, CHECKPOINT_PATH) /tmp/ipython-input-2482868117.py in evaluate_partial_ft(model_dir, checkpoint_path, num_samples) 59 if os.path.exists(checkpoint_path): 60 print(f" Loading Checkpoint: {checkpoint_path}") ---> 61 ckpt = torch.load(checkpoint_path, map_location=DEVICE) 62 model.load_state_dict(ckpt['model_state_dict']) 63 else: /usr/local/lib/python3.12/dist-packages/torch/serialization.py in load(f, map_location, pickle_module, weights_only, mmap, **pickle_load_args) 1519 if weights_only: 1520 try: -> 1521 return _load( 1522 opened_zipfile, 1523 map_location, /usr/local/lib/python3.12/dist-packages/torch/serialization.py in _load(zip_file, map_location, pickle_module, pickle_file, overall_storage, **pickle_load_args) 2120 global _serialization_tls 2121 _serialization_tls.map_location = map_location -> 2122 result = unpickler.load() 2123 _serialization_tls.map_location = None 2124 /usr/local/lib/python3.12/dist-packages/torch/_weights_only_unpickler.py in load(self) 533 f"Only persistent_load of storage is allowed, but got {pid[0]}" 534 ) --> 535 self.append(self.persistent_load(pid)) 536 elif key[0] in [BINGET[0], LONG_BINGET[0]]: 537 idx = (read(1) if key[0] == BINGET[0] else unpack("<I", read(4)))[0] /usr/local/lib/python3.12/dist-packages/torch/serialization.py in persistent_load(saved_id) 2084 else: 2085 nbytes = numel * torch._utils._element_size(dtype) -> 2086 typed_storage = load_tensor( 2087 dtype, nbytes, key, _maybe_decode_ascii(location) 2088 ) /usr/local/lib/python3.12/dist-packages/torch/serialization.py in load_tensor(dtype, numel, key, location) 2037 ) 2038 storage = ( -> 2039 zip_file.get_storage_from_record(name, numel, torch.UntypedStorage) 2040 ._typed_storage() 2041 ._untyped_storage RuntimeError: PytorchStreamReader failed locating file data/44: file not found
In [ ]:
import torch
import torch.nn as nn
import numpy as np
import matplotlib.pyplot as plt
import os
import time
import cv2
import glob
import re
from scipy.spatial.distance import directed_hausdorff
from sklearn.metrics import precision_score, recall_score, f1_score, accuracy_score, jaccard_score
from torch.utils.data import DataLoader, Dataset
from google.colab import drive
# 1. SETUP
if not os.path.exists('/content/drive'):
drive.mount('/content/drive', force_remount=True)
SAVE_DIR = '/content/drive/MyDrive/SatMAE_PartialFT_Results_1/'
DEVICE = torch.device('cuda' if torch.cuda.is_available() else 'cpu')
# 2. DATA LOADER
class MmapDataset(Dataset):
def __init__(self, x_path, y_path):
self.data = np.load(x_path, mmap_mode='r')
self.target = np.load(y_path, mmap_mode='r')
def __len__(self): return len(self.data)
def __getitem__(self, index):
return torch.from_numpy(self.data[index].copy()), torch.from_numpy(self.target[index].copy())
# 3. METRIC HELPERS
def calculate_boundary_iou(gt_mask, pred_mask):
gt_edges = cv2.Canny(gt_mask.astype(np.uint8)*255, 100, 200) > 0
pred_edges = cv2.Canny(pred_mask.astype(np.uint8)*255, 100, 200) > 0
inter = np.logical_and(gt_edges, pred_edges).sum()
union = np.logical_or(gt_edges, pred_edges).sum()
return inter / union if union > 0 else 0.0
def calculate_hausdorff(gt_mask, pred_mask):
gt_coords = np.argwhere(gt_mask)
pred_coords = np.argwhere(pred_mask)
if len(gt_coords) == 0 or len(pred_coords) == 0: return 0.0
return max(directed_hausdorff(gt_coords, pred_coords)[0], directed_hausdorff(pred_coords, gt_coords)[0])
# 4. ROBUST LOAD FUNCTION
def get_best_available_weights(model_dir):
# Order of preference: 1. Best Model, 2. Latest Epoch backup
best_path = os.path.join(model_dir, "best_model.pth")
if os.path.exists(best_path):
return best_path
epoch_files = glob.glob(os.path.join(model_dir, "epoch_*.pth"))
if epoch_files:
return max(epoch_files, key=os.path.getmtime)
return None
# 5. EXECUTION
def run_evaluation(model_dir):
weights_path = get_best_available_weights(model_dir)
if not weights_path:
print(" No weights found in directory.")
return
print(f" Loading weights from: {weights_path}")
# Init Model
model = SatMAESegmentation(num_frames=3, in_chans=6).to(DEVICE)
model.load_state_dict(torch.load(weights_path, map_location=DEVICE))
model.eval()
# Data
val_ds = MmapDataset(os.path.join(model_dir, 'val_x.npy'), os.path.join(model_dir, 'val_y.npy'))
val_loader = DataLoader(val_ds, batch_size=8, shuffle=False)
all_preds, all_targets = [], []
boundary_ious, hausdorff_dists = [], []
total_frames = 0
start_time = time.time()
print(" Evaluating...")
with torch.no_grad():
for x, y in val_loader:
x = x.to(DEVICE)
preds = torch.sigmoid(model(x))
preds_bin = (preds > 0.5).cpu().numpy().astype(np.uint8)
targets_bin = y.numpy().astype(np.uint8)
total_frames += x.size(0)
for i in range(preds_bin.shape[0]):
p, t = preds_bin[i, 0], targets_bin[i, 0]
boundary_ious.append(calculate_boundary_iou(t, p))
hausdorff_dists.append(calculate_hausdorff(t, p))
all_preds.append(p.flatten()); all_targets.append(t.flatten())
# Report
fps = total_frames / (time.time() - start_time)
y_p, y_t = np.concatenate(all_preds), np.concatenate(all_targets)
print("\n" + "="*50)
print(f"Pixel Accuracy: {accuracy_score(y_t, y_p):.4f}")
print(f"IoU (Jaccard): {jaccard_score(y_t, y_p):.4f}")
print(f"F1-Score (Dice): {f1_score(y_t, y_p):.4f}")
print(f"Boundary IoU: {np.mean(boundary_ious):.4f}")
print(f"Hausdorff Dist: {np.mean(hausdorff_dists):.2f}")
print(f"Speed: {fps:.2f} FPS")
print("="*50)
# Visualization
x_batch, y_batch = next(iter(val_loader))
with torch.no_grad():
vis_preds = (torch.sigmoid(model(x_batch.to(DEVICE))) > 0.5).cpu().numpy()
fig, axs = plt.subplots(3, 3, figsize=(15, 15))
for i in range(3):
# RGB extraction from (B, C, T, H, W) -> Using T=0
img = x_batch[i, [2, 1, 0], 0].permute(1, 2, 0).numpy()
img = (img - img.min()) / (img.max() - img.min() + 1e-6)
axs[i, 0].imshow(img)
axs[i, 0].set_title("Input RGB")
axs[i, 1].imshow(y_batch[i, 0], cmap='gray')
axs[i, 1].set_title("Ground Truth")
axs[i, 2].imshow(vis_preds[i, 0], cmap='gray')
axs[i, 2].set_title("Prediction")
for ax in axs[i]: ax.axis('off')
plt.show()
run_evaluation(SAVE_DIR)
🚀 Loading weights from: /content/drive/MyDrive/SatMAE_PartialFT_Results_1/best_model.pth Initializing SatMAE Partial FT Model... Downloading Pretrained MAE Weights (facebook/vit-mae-base)... Weights Loaded! Applying Partial Freeze Strategy... Unfreezing Last 2 Encoder Blocks... 📊 Evaluating... ================================================== Pixel Accuracy: 0.9143 IoU (Jaccard): 0.8858 F1-Score (Dice): 0.9394 Boundary IoU: 0.1070 Hausdorff Dist: 12.86 Speed: 1.49 FPS ==================================================
--------------------------------------------------------------------------- IndexError Traceback (most recent call last) /tmp/ipython-input-458025177.py in <cell line: 0>() 127 plt.show() 128 --> 129 run_evaluation(SAVE_DIR) /tmp/ipython-input-458025177.py in run_evaluation(model_dir) 115 for i in range(3): 116 # RGB extraction from (B, C, T, H, W) -> Using T=0 --> 117 img = x_batch[i, [2, 1, 0], 0].permute(1, 2, 0).numpy() 118 img = (img - img.min()) / (img.max() - img.min() + 1e-6) 119 IndexError: index 2 is out of bounds for dimension 0 with size 2
In [ ]:
import torch
import torch.nn as nn
import numpy as np
import matplotlib.pyplot as plt
import os
import time
import cv2
from scipy.spatial.distance import directed_hausdorff
from sklearn.metrics import (precision_score, recall_score, f1_score, accuracy_score,
jaccard_score, matthews_corrcoef, confusion_matrix,
roc_auc_score, precision_recall_curve, auc, fbeta_score)
from torch.utils.data import DataLoader, Dataset
from google.colab import drive
# 1. SETUP & PATHS
SAVE_DIR = '/content/drive/MyDrive/SatMAE_PartialFT_Results_1/'
DEVICE = torch.device('cuda' if torch.cuda.is_available() else 'cpu')
# 2. METRIC HELPERS
def calculate_boundary_iou(gt_mask, pred_mask):
gt_edges = cv2.Canny(gt_mask.astype(np.uint8)*255, 100, 200) > 0
pred_edges = cv2.Canny(pred_mask.astype(np.uint8)*255, 100, 200) > 0
inter = np.logical_and(gt_edges, pred_edges).sum()
union = np.logical_or(gt_edges, pred_edges).sum()
return inter / union if union > 0 else 0.0
def calculate_hausdorff(gt_mask, pred_mask):
gt_coords = np.argwhere(gt_mask)
pred_coords = np.argwhere(pred_mask)
if len(gt_coords) == 0 or len(pred_coords) == 0: return 0.0
return max(directed_hausdorff(gt_coords, pred_coords)[0], directed_hausdorff(pred_coords, gt_coords)[0])
# 3. COMPREHENSIVE EVALUATION FUNCTION
def run_final_metrics_report(model_dir):
# Load Model Weights
weights_path = os.path.join(model_dir, "best_model.pth")
if not os.path.exists(weights_path):
weights_path = os.path.join(model_dir, "satmae_finetune_swa_final.pth")
print(f" Loading weights: {weights_path}")
model = SatMAESegmentation(num_frames=3, in_chans=6).to(DEVICE)
model.load_state_dict(torch.load(weights_path, map_location=DEVICE))
model.eval()
# Load Data
val_ds = MmapDataset(os.path.join(model_dir, 'val_x.npy'), os.path.join(model_dir, 'val_y.npy'))
val_loader = DataLoader(val_ds, batch_size=8, shuffle=False)
all_preds, all_targets, all_probs = [], [], []
boundary_ious, hausdorff_dists = [], []
total_frames = 0
start_time = time.time()
print(" Evaluating Validation Set...")
with torch.no_grad():
for x, y in val_loader:
x = x.to(DEVICE)
outputs = model(x)
probs = torch.sigmoid(outputs).cpu().numpy()
preds_bin = (probs > 0.5).astype(np.uint8)
targets_bin = y.numpy().astype(np.uint8)
total_frames += x.size(0)
for i in range(preds_bin.shape[0]):
p, t = preds_bin[i, 0], targets_bin[i, 0]
boundary_ious.append(calculate_boundary_iou(t, p))
hausdorff_dists.append(calculate_hausdorff(t, p))
all_preds.append(p.flatten())
all_targets.append(t.flatten())
all_probs.append(probs[i, 0].flatten())
# Consolidate Data
y_p = np.concatenate(all_preds)
y_t = np.concatenate(all_targets)
y_prob = np.concatenate(all_probs)
# Advanced Statistical Calculations
tn, fp, fn, tp = confusion_matrix(y_t, y_p).ravel()
prec_pts, rec_pts, _ = precision_recall_curve(y_t, y_prob)
pr_auc_val = auc(rec_pts, prec_pts)
fps_val = total_frames / (time.time() - start_time)
# PRINT DETAILED REPORT
print("\n" + "="*60)
print(" SATMAE FULL FINETUNE - IN-DEPTH METRICS REPORT ")
print("="*60)
print(f"{'Metric':<28} | {'Value':<10}")
print("-" * 45)
print(f"{'Pixel Accuracy':<28} | {accuracy_score(y_t, y_p):.4f}")
print(f"{'IoU (Jaccard Index)':<28} | {jaccard_score(y_t, y_p):.4f}")
print(f"{'F1-Score (Dice)':<28} | {f1_score(y_t, y_p):.4f}")
print(f"{'F2-Score (Recall Focus)':<28} | {fbeta_score(y_t, y_p, beta=2):.4f}")
print(f"{'MCC (Matthews Corr)':<28} | {matthews_corrcoef(y_t, y_p):.4f}")
print(f"{'ROC-AUC':<28} | {roc_auc_score(y_t, y_prob):.4f}")
print(f"{'PR-AUC':<28} | {pr_auc_val:.4f}")
print("-" * 45)
print(f"{'Precision':<28} | {precision_score(y_t, y_p):.4f}")
print(f"{'Recall (Sensitivity)':<28} | {recall_score(y_t, y_p):.4f}")
print(f"{'Specificity':<28} | {tn / (tn + fp):.4f}")
print(f"{'False Positive Rate':<28} | {fp / (fp + tn):.4f}")
print("-" * 45)
print(f"{'Boundary IoU':<28} | {np.mean(boundary_ious):.4f}")
print(f"{'Hausdorff Distance (px)':<28} | {np.mean(hausdorff_dists):.2f}")
print(f"{'Inference Speed':<28} | {fps_val:.2f} FPS")
print("="*60 + "\n")
# 4. PLOTTING BLOCK
fig, (ax1, ax2) = plt.subplots(1, 2, figsize=(14, 5))
# Confusion Matrix
cm = confusion_matrix(y_t, y_p)
im = ax1.imshow(cm, interpolation='nearest', cmap=plt.cm.Blues)
ax1.set_title("Confusion Matrix")
fig.colorbar(im, ax=ax1)
ax1.set_xticks([0, 1])
ax1.set_yticks([0, 1])
ax1.set_xticklabels(['Background', 'Target'])
ax1.set_yticklabels(['Background', 'Target'])
ax1.set_xlabel('Predicted Label')
ax1.set_ylabel('True Label')
# PR Curve
ax2.plot(rec_pts, prec_pts, color='darkgreen', lw=2, label=f'PR Curve (AUC = {pr_auc_val:.2f})')
ax2.set_xlabel('Recall')
ax2.set_ylabel('Precision')
ax2.set_title('Precision-Recall Curve')
ax2.legend(loc="lower left")
ax2.grid(True, linestyle='--', alpha=0.5)
plt.tight_layout()
plt.show()
# Run the complete analysis
run_final_metrics_report(SAVE_DIR)
📥 Loading weights: /content/drive/MyDrive/SatMAE_PartialFT_Results_1/best_model.pth
Initializing SatMAE Partial FT Model...
Downloading Pretrained MAE Weights (facebook/vit-mae-base)...
Weights Loaded!
Applying Partial Freeze Strategy...
Unfreezing Last 2 Encoder Blocks...
📊 Evaluating Validation Set...
============================================================
SATMAE FULL FINETUNE - IN-DEPTH METRICS REPORT
============================================================
Metric | Value
---------------------------------------------
Pixel Accuracy | 0.9143
IoU (Jaccard Index) | 0.8858
F1-Score (Dice) | 0.9394
F2-Score (Recall Focus) | 0.9387
MCC (Matthews Corr) | 0.7927
ROC-AUC | 0.9637
PR-AUC | 0.9830
---------------------------------------------
Precision | 0.9406
Recall (Sensitivity) | 0.9383
Specificity | 0.8558
False Positive Rate | 0.1442
---------------------------------------------
Boundary IoU | 0.1070
Hausdorff Distance (px) | 12.86
Inference Speed | 2.69 FPS
============================================================