skills/cv/progressive-dropout-unet/SKILL.md
Apply lower dropout in shallow/final U-Net layers and higher dropout in deep layers to preserve spatial detail while regularizing abstract features
npx skillsauth add wenmin-wu/ds-skills cv-progressive-dropout-unetInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
Uniform dropout across all U-Net layers either under-regularizes deep layers or over-regularizes shallow ones. Progressive dropout uses lower rates (e.g., 0.25) in early encoder blocks and final decoder blocks where spatial detail matters, and higher rates (e.g., 0.5) in deep/bottleneck layers where features are abstract and prone to overfitting.
from keras.layers import *
def build_unet(input_layer, filters=16, dropout=0.5):
# Encoder: progressive dropout
c1 = conv_block(input_layer, filters)
p1 = Dropout(dropout / 2)(MaxPooling2D((2, 2))(c1)) # 0.25
c2 = conv_block(p1, filters * 2)
p2 = Dropout(dropout)(MaxPooling2D((2, 2))(c2)) # 0.50
c3 = conv_block(p2, filters * 4)
p3 = Dropout(dropout)(MaxPooling2D((2, 2))(c3)) # 0.50
c4 = conv_block(p3, filters * 8)
p4 = Dropout(dropout)(MaxPooling2D((2, 2))(c4)) # 0.50
# Bottleneck
bn = conv_block(p4, filters * 16)
# Decoder: mirror progressive dropout
u4 = Dropout(dropout)(concatenate([Conv2DTranspose(
filters * 8, (3, 3), strides=(2, 2), padding='same')(bn), c4]))
# ... more decoder layers ...
u1 = Dropout(dropout / 2)(concatenate([Conv2DTranspose(
filters, (3, 3), strides=(2, 2), padding='same')(d2), c1]))
return Conv2D(1, (1, 1), activation='sigmoid')(conv_block(u1, filters))
data-ai
Scaled Pinball Loss (SPL) metric for evaluating quantile forecasts, normalized by mean absolute successive differences of training data
data-ai
Walk backward through a time series and multiplicatively rescale segments when jumps exceed a fraction of the running mean to correct data collection anomalies
testing
Transform forecasting target to next/current ratio minus one so that optimizing MAE or squared error implicitly minimizes SMAPE
tools
Convert point forecasts to prediction intervals by scaling with logit-transformed quantile ratios passed through a Normal CDF