Semantic segmentation: a class for every pixel
语义分割
Train a small dense pixel classifier, derive masked loss and gradients, and learn why accuracy, image-average IoU and dataset IoU can disagree.
semantic-segmentationA road outline needs more than a box
A bounding box can locate a car, but a driving scene also needs to distinguish road, sidewalk and sky along their actual outlines. Semantic segmentation assigns a category to each evaluated pixel. Its answer is a class map, not one class for the entire image and not a list of rectangles.
If two cars touch in the picture, their pixels may all carry the same “car” label. That map alone does not say which pixel belongs to which car. Separating individual objects requires instance segmentation. A connected component is not automatically an object: one object can be occluded into several regions, while two objects can touch.
The difficult part is often deciding what a good result means. Suppose 99 of 100 pixels are background. A model that always predicts background achieves 99% pixel accuracy while missing the only foreground pixel. Later we will compute its mean intersection over union: just 0.495 when both classes count. The number is a hand-built example, not a benchmark result.
Fully convolutional networks provide a way to produce these dense outputs while sharing computation across image locations. Long, Shelhamer and Darrell’s FCN preprint first appeared on 14 November 2014; the v2 method read here is dated 8 March 2015. The paper discusses earlier fully convolutional work, so this date is not the invention date of every form of convolutional dense prediction. Method and related work, version history
From image tensors to a meaningful score
Define the labels before building the network
Let an image have height H, width W and F input channels. For each location (i,j), a model outputs K class logits . A logit is an unrestricted score, not a probability. This chapter uses one mutually exclusive class per valid pixel; overlapping multilabel masks would require a different output and loss contract. Softmax and a maximum-score decision give
Class 0 can mean background and is still a supervised class. An ignored pixel means that its target is excluded from the loss or evaluation. It is not evidence for background. The example reserves integer 255 for ignored labels, outside the valid indices 0 through K−1. A visualization palette merely colors the label integers; colors are not the class IDs themselves. FCN loss/ignored-label discussion, p.5, class-index loss contract
Spatial alignment is part of that contract. A random crop or flip must transform the image and its label map together. Class IDs should not be bilinearly interpolated as ordinary numbers: halfway between labels 0 and 2 is not evidence for class 1. Nearest-label resampling preserves IDs, while continuous logits or probabilities can be interpolated with a stated coordinate convention. Smaller output maps also need a specified crop or alignment before comparison with labels.
Why fully convolutional computation helps
A classifier’s fully connected layer can be expressed as a convolution whose kernel covers the input region that originally fed the layer. On a larger feature map it can evaluate the same local rule at multiple locations. Earlier convolutional calculations are shared instead of recomputed for every overlapping image patch. This is the FCN paper’s useful computational perspective; it does not make the pixels independent training examples. FCN §3.1
Downsampling creates a tradeoff. Coarse features contain wider context, but an output stride of 32 does not directly preserve every fine boundary. The paper uses in-network upsampling and combines coarse predictions with predictions from finer layers. Its FCN-16s fuses an upsampled deep score map with a pool4 score map by addition; FCN-8s also brings in pool3. Upsampling raises spatial resolution but cannot uniquely invert information lost by pooling. A transposed-convolution operation is not an inverse for arbitrary convolution. FCN §§3.3 and 4.2
Our small implementation keeps full resolution throughout. It is a genuine fully convolutional classifier, but does not reproduce the VGG backbone, learned upsampling or skip fusion of FCN-8s. It applies one zero-padded 3×3 spatial layer, ReLU, then a 1×1 class head. With M hidden channels, write its hidden preactivation A, hidden feature T, spatial kernel W and class-head matrix U as
Here is the image extended with zeros outside its boundaries. The operation is cross-correlation, as is common in neural-network convolution APIs: the kernel is not reversed. The 1×1 head mixes channels without enlarging the spatial receptive field. Thus every output in this example depends on at most a 3×3 input neighborhood. Its shared weights allow different positive image dimensions while keeping the same channel count.
Masked, weighted cross-entropy
Let V be the set of valid pixel locations and let be a positive class weight. We use a weighted mean of the negative log probability assigned to each true class:
When weights are all one, S is the number of valid pixels. With unequal weights, dividing by the number of pixels is a different normalization. For two valid pixels with true-class probabilities 0.8 and 0.6, weights 1 and 3 give loss −[log(0.8)+3log(0.6)]/4. Multiplying both class weights by seven leaves this weighted mean unchanged. It is their relative size that matters. Fixed PyTorch 2.2 weighted-mean definition
The denominator vanishes when all pixels are ignored. The mathematical mean is then undefined. Our teaching implementation explicitly skips supervision by returning zero loss, zero gradient and a valid-pixel count of zero. This is a chosen training policy, not a claim that every framework handles that case identically. Evaluation below returns an undefined score for an empty set instead of turning “no evidence” into a success.
For a valid location, differentiating log-softmax gives a particularly useful error signal; ignored locations receive zero:
The factor 1/S includes the whole valid image. Class weights change how errors contribute; they do not create information about a class absent from the labels. The implementation computes log-softmax after subtracting the largest logit, avoiding exponential overflow for ordinary large scores.
Follow the error back to all model parameters
For the 1×1 head, each location contributes its hidden feature multiplied by the class-logit error. Biases collect those errors:
Backpropagate through the channel mixing and ReLU to obtain . The same spatial weight was used at every location, so its gradient must sum contributions from every place it was used:
At a ReLU input of exactly zero, the program chooses derivative zero. Input gradients scatter each output’s contribution back through the same kernel into its receptive field; overlapping contributions add. The code implements both input and parameter gradients, and finite differences check every parameter and input coordinate on a small case away from the ReLU corner.
An ignored pixel has no direct loss at its output location, but its input value can still affect neighboring valid predictions. Consequently its input gradient need not be zero. A test isolates this case. Confusing a label mask with an input mask would silently change what the network can learn.
Count errors with a confusion matrix
Accumulate a K×K matrix C across all evaluated pixels: row a is the true class, column b the predicted class. Ignored targets add no count. For class k, the diagonal counts true positives; its row total counts all true pixels of that class, and its column total counts all predictions of that class. Therefore
The IoU denominator is the union: row plus column double-counts the true positives, so subtract the diagonal once. Define A as the set of classes with a positive union. Our reported mean is
Both background and foreground are eligible. A class absent from truth and predictions has union zero and is omitted, not assigned IoU 1. A class absent from truth but present as false positives has positive union and IoU zero, so it remains in the mean. When there are no evaluated pixels, accuracy and mean IoU are undefined; the program represents them with None. These conventions follow the fixed author’s evaluation code’s confusion-matrix and non-NaN class averaging for nonempty data, with an explicit empty-data representation. Fixed FCN evaluation code
For the opening all-background prediction, C=[[99,0],[1,0]]. Accuracy is 99/100, background IoU is 99/100, foreground IoU is zero, and mean IoU is (0.99+0)/2=0.495. A high score on the abundant class did not solve the task of finding the scarce one.
Aggregate before taking ratios when reporting dataset IoU
The fixed FCN evaluator adds confusion matrices over the dataset and then calculates metrics. It does not average each image’s mean IoU. Consider these two images:
| Image | Confusion matrix, truth rows | Image mean IoU |
|---|---|---|
| A | [[50,0],[0,50]] | 1 |
| B | [[0,0],[2,0]] | 0 |
The average of the last column is 0.5. The summed matrix is [[50,0],[2,50]], giving each class IoU 50/52 and dataset mean IoU 25/26≈0.961538. The first statistic weights images equally after taking class ratios; the second pools pixel counts before taking ratios. Neither can be substituted for the other without changing the question. Report which you used, including the background and absent-class conventions. Dataset accumulation
Train a complete small pixel classifier
Save the following as semantic_segmentation.py and run python semantic_segmentation.py in Python 3.12 with NumPy 1.26.4. It generates a 9×10 noisy image of a bright rectangle and a second image with different noise and rectangle position. Class 0 is background, class 1 is the rectangle, and the first row’s labels are ignored. There are 80 valid pixels per image. These are synthetic labels generated from the construction, not expert annotations.
The network has one input channel, four hidden channels and two classes: 36 spatial weights, four hidden biases, eight class-head weights and two output biases, totaling 50 parameters. Seed 4 initializes the model; seeds 11 and 29 generate the two scenes. It takes 120 gradient steps of size 0.15 on the first image with class weights [1,3]. All parameters receive gradients through the whole model. The second scene is held out from these updates; one such scene is still insufficient evidence of generalization.
"""Original small fully convolutional pixel classifier, loss, gradients and metrics."""
import numpy as np
def initialize(channels=1,hidden=4,classes=2,seed=4):
if any(type(n) is not int or n < 1 for n in [channels,hidden,classes]) or classes < 2:
raise ValueError('positive channel widths and at least two classes required')
rng=np.random.default_rng(seed)
return {'kernel':rng.normal(0,np.sqrt(2/(9*channels)),(3,3,channels,hidden)),
'bias':np.zeros(hidden),'head':rng.normal(0,1/np.sqrt(hidden),(hidden,classes)),
'head_bias':np.zeros(classes)}
def forward(image,parameters):
"""HWC image -> HWC class logits; zero-padded 3x3 cross-correlation then 1x1 head."""
x=np.asarray(image,float)
if x.ndim != 3 or min(x.shape) < 1 or not np.isfinite(x).all():
raise ValueError('nonempty finite HWC image required')
kernel,bias,head,head_bias=[np.asarray(parameters[k],float) for k in ['kernel','bias','head','head_bias']]
if kernel.ndim != 4 or kernel.shape[:3] != (3,3,x.shape[2]) or kernel.shape[3] < 1:
raise ValueError('3x3 input-by-hidden kernel required')
hidden=kernel.shape[3]
if bias.shape != (hidden,) or head.ndim != 2 or head.shape[0] != hidden or head.shape[1] < 2 or head_bias.shape != (head.shape[1],):
raise ValueError('compatible hidden and class-head shapes required')
if not all(np.isfinite(a).all() for a in [kernel,bias,head,head_bias]):
raise ValueError('finite parameters required')
height,width=x.shape[:2]
padded=np.pad(x,((1,1),(1,1),(0,0)))
activation=np.broadcast_to(bias,(height,width,hidden)).copy()
for dy in range(3):
for dx in range(3):
activation+=padded[dy:dy+height,dx:dx+width] @ kernel[dy,dx]
features=np.maximum(activation,0)
logits=features @ head+head_bias
return logits,(padded,activation,features)
def pixel_loss(logits,labels,class_weights=None,ignore=255):
"""Weighted mean CE; all-ignored images explicitly return zero loss/gradient."""
z,y=np.asarray(logits,float),np.asarray(labels)
if z.ndim != 3 or min(z.shape) < 1 or z.shape[-1] < 2 or not np.isfinite(z).all():
raise ValueError('finite HWC logits with at least two classes required')
if y.shape != z.shape[:2] or y.dtype.kind not in 'iu':
raise ValueError('integer HW labels required')
classes=z.shape[-1]
if type(ignore) is not int or 0 <= ignore < classes:
raise ValueError('ignore label must be outside the class indices')
valid=y != ignore
if ((y[valid] < 0) | (y[valid] >= classes)).any():
raise ValueError('nonignored targets must be valid class indices')
weights=np.ones(classes) if class_weights is None else np.asarray(class_weights,float)
if weights.shape != (classes,) or not np.isfinite(weights).all() or (weights <= 0).any():
raise ValueError('one positive finite weight per class required')
gradient=np.zeros_like(z)
if not valid.any():return 0.,gradient,0
selected=z[valid];truth=y[valid].astype(int)
shifted=selected-selected.max(axis=1,keepdims=True)
logp=shifted-np.log(np.exp(shifted).sum(axis=1,keepdims=True))
pixel_weights=weights[truth];denominator=pixel_weights.sum()
loss=-np.sum(pixel_weights*logp[np.arange(len(truth)),truth])/denominator
residual=np.exp(logp);residual[np.arange(len(truth)),truth]-=1
gradient[valid]=residual*pixel_weights[:,None]/denominator
return float(loss),gradient,int(valid.sum())
def backward(cache,parameters,logit_gradient):
"""All parameter gradients plus input gradient; ReLU derivative is zero at zero."""
padded,activation,features=cache
dz=np.asarray(logit_gradient,float)
if dz.shape != (*features.shape[:2],parameters['head'].shape[1]) or not np.isfinite(dz).all():
raise ValueError('finite logit gradient matching the forward shape required')
dh=(dz @ parameters['head'].T)*(activation > 0)
height,width=features.shape[:2]
grads={'head':np.einsum('hwf,hwc->fc',features,dz),'head_bias':dz.sum(axis=(0,1)),
'bias':dh.sum(axis=(0,1)),'kernel':np.zeros_like(parameters['kernel'])}
dpadded=np.zeros_like(padded)
for dy in range(3):
for dx in range(3):
patch=padded[dy:dy+height,dx:dx+width]
grads['kernel'][dy,dx]=np.einsum('hwc,hwf->cf',patch,dh)
dpadded[dy:dy+height,dx:dx+width]+=dh @ parameters['kernel'][dy,dx].T
return grads,dpadded[1:-1,1:-1]
def confusion(truth,prediction,classes,ignore=255):
"""Rows=true class, columns=predicted class; ignored truth contributes no count."""
y,p=np.asarray(truth),np.asarray(prediction)
if type(classes) is not int or classes < 1 or type(ignore) is not int or 0 <= ignore < classes:
raise ValueError('positive class count and out-of-range ignore label required')
if y.shape != p.shape or y.dtype.kind not in 'iu' or p.dtype.kind not in 'iu':
raise ValueError('same-shape integer truth and predictions required')
if ((p < 0) | (p >= classes)).any():raise ValueError('predictions must be valid class indices')
valid=y != ignore
if ((y[valid] < 0) | (y[valid] >= classes)).any():raise ValueError('invalid nonignored truth')
return np.bincount(classes*y[valid].astype(np.int64)+p[valid].astype(np.int64),minlength=classes**2).reshape(classes,classes)
def metrics(histogram):
"""Omit zero-union classes; keep an absent truth class with false positives."""
h=np.asarray(histogram,float)
if h.ndim != 2 or h.shape[0] != h.shape[1] or len(h) == 0 or not np.isfinite(h).all() or (h < 0).any() or (h != np.floor(h)).any():
raise ValueError('nonempty square nonnegative integer counts required')
union=h.sum(axis=1)+h.sum(axis=0)-np.diag(h)
iou=np.divide(np.diag(h),union,out=np.full(len(h),np.nan),where=union > 0)
total=h.sum()
return {'accuracy':float(np.trace(h)/total) if total else None,
'class_iou':[float(v) if np.isfinite(v) else None for v in iou],
'mean_iou':float(iou[union > 0].mean()) if (union > 0).any() else None}
def scene(seed,top,left):
"""Synthetic bright rectangle in noise; labels are generated, not human annotations."""
mask=np.zeros((9,10),dtype=int);mask[top:top+3,left:left+4]=1
image=(.1+.8*mask+np.random.default_rng(seed).normal(0,.18,mask.shape))[...,None]
labels=mask.copy();labels[0]=255
return image,labels
if __name__ == '__main__':
image,labels=scene(11,3,3)
test_image,test_labels=scene(29,4,2)
parameters=initialize()
weights=np.array([1.,3.])
first=pixel_loss(forward(image,parameters)[0],labels,weights)[0]
for _ in range(120):
logits,cache=forward(image,parameters)
loss,dz,count=pixel_loss(logits,labels,weights)
grads,_=backward(cache,parameters,dz)
for name in parameters:parameters[name]-=.15*grads[name]
last=pixel_loss(forward(image,parameters)[0],labels,weights)[0]
predicted=forward(test_image,parameters)[0].argmax(axis=-1)
learned=metrics(confusion(test_labels,predicted,2))
majority=metrics(confusion(test_labels,np.zeros_like(test_labels),2))
threshold=metrics(confusion(test_labels,(test_image[...,0] > .5).astype(int),2))
print('training valid pixels:',count,'parameters:',sum(v.size for v in parameters.values()))
print('weighted training CE:',round(first,6),'->',round(last,6))
print('held-out confusion:',confusion(test_labels,predicted,2).tolist())
print('held-out mean IoU:',round(learned['mean_iou'],6))
print('all-background mean IoU:',round(majority['mean_iou'],6))
print('intensity-threshold mean IoU:',round(threshold['mean_iou'],6))
Actual output:
training valid pixels: 80 parameters: 50
weighted training CE: 0.679344 -> 0.084996
held-out confusion: [[65, 3], [1, 11]]
held-out mean IoU: 0.837681
all-background mean IoU: 0.425
intensity-threshold mean IoU: 0.913866
The training loss falls from 0.679344 to 0.084996. On the second image, the network labels three background pixels as foreground and misses one foreground pixel. Its class IoUs are 65/69 and 11/15, averaging to 0.837681. The all-background baseline gets 0.425. But the fixed intensity threshold at 0.5 does better than the network, with mean IoU 0.913866. The synthetic data were built from a bright shape against a dark background, so that simple rule has an advantage worth checking before training anything. There is no evidence here that a neural model is the best choice for this construction.
Changing resolution does not change the number of weights. Forward and backward arithmetic scale as O(HW(9FM+MK)); stored image, feature and score arrays scale as O(HW(F+M+K)), plus parameters. Confusion-matrix accumulation costs O(HW+K²) with the dense K×K representation. This small model keeps every pixel at full resolution, so it has no FCN-8s upsampling or alignment behavior to reproduce.
The checks compare dense output with independent scalar patch calculations, verify an asymmetric kernel’s orientation and receptive field, and use finite differences for all parameters, inputs and logits. They also cover class-weight rescaling, ignored labels versus input influence, unsigned label arrays, empty supervision, confusion counts, absent classes and both aggregation conventions. The tests are checks of the stated program, not a benchmark evaluation on natural images.
The errors a mean score can hide
A mean IoU does not say whether an error lies on a dangerous boundary, a tiny rare structure or an unimportant background patch. Inspect per-class scores, confusion and actual masks alongside the mean. Pixel-level evaluation also does not establish that separate instances were found or that a region’s topology is correct.
Split data at the unit where leakage can occur. Adjacent patches from one image or frames from one recording can share most of their information. A random pixel split can therefore test familiar context rather than a new scene. Whole-image computation is efficient, but it does not turn correlated pixels into independent observations. Deployment also requires an annotation policy for ambiguous boundaries, class definitions and ignored regions.
Predicting a mask from a new camera, lighting condition or tissue preparation can be different from the training task. The small model’s 3×3 receptive field cannot use distant context. Raising class weights may shift which errors it prefers, but cannot repair missing information or inconsistent labels. More capable backbones, learned upsampling and U-Net-style feature reuse address different representation choices and require their own tests.
The author repository’s fixed README describes models with training choices that differ from the initial paper profile. This chapter reads the paper’s method and the fixed evaluator separately; it does not mix repository model scores with the original paper or claim to have reproduced either training run. Fixed repository profile
Make the score answer the right question
1. Understanding: background or unknown?
An annotation marks an uncertain boundary with 255. Why is replacing those labels with background a change to the task?
Answer: Background is a supervised class and contributes to both loss and confusion. Ignored labels provide no target at those locations. Replacing them asserts that the boundary belongs to background and can reward predictions that the annotator never confirmed. The input pixels may still provide context for neighboring valid labels.
2. Calculation: 99% accuracy
There are 99 true background pixels and one true foreground pixel. All predictions are background. Compute the confusion matrix and mean IoU including background.
Answer: With truth rows and prediction columns, C=[[99,0],[1,0]]. The background union is 100 and its intersection is 99; the foreground union is 1 and its intersection is zero. Accuracy is 0.99, but mean IoU is (0.99+0)/2=0.495. The high pixel accuracy conceals total foreground failure.
3. Boundary: absent classes and empty images
A third class is absent from both truth and predictions. In another image it is absent from truth but appears in one false-positive prediction. How should the two IoUs enter this chapter’s mean? What if every label is ignored?
Answer: The first class has zero union, so its IoU is undefined and omitted. The second has positive union and zero intersection, so IoU zero is included. An entirely ignored evaluation set has no accuracy or mean IoU; the code returns None. During training the explicit all-ignored policy returns zero loss and gradients with count zero, meaning no supervision, not a perfect prediction.
4. Transfer: choosing a model and an aggregation rule
Image A has matrix [[50,0],[0,50]] and image B has [[0,0],[2,0]]. A report says “mean IoU is 0.5”; another says 0.961538. Can both be calculated correctly? Does the neural network beating the all-background baseline in our example justify choosing it?
Answer: Yes: 0.5 averages image means, whereas 0.961538 pools confusion counts and then averages class IoUs. State the aggregation before comparing results. Beating all-background is not enough to select the network: the intensity-threshold baseline scores 0.913866 on the held-out synthetic scene, higher than the network’s 0.837681. More representative held-out data and explicit error costs are needed for a deployment choice.
Separate the method, the implementation and the experiment
The FCN v2 reading covers physical pages 2–5: prior work, convolutional dense computation, upsampling, loss sampling, classifier conversion and skip-fusion discussion. Its experimental tables were visible on those pages, but their numerical performance is not used here. The fixed author evaluator specifies how it counts pixels and averages class IoUs. The fixed README’s opening model/training notes explain why repository variants must not be silently treated as identical to the original experiments.
PyTorch 2.2’s class-index cross-entropy documentation supplies an explicit weighted-mean denominator and ignored-label contract; the standalone NumPy implementation chooses and documents its own all-ignored policy. It neither imports PyTorch nor runs Caffe. The code, synthetic data and numerical counterexamples are original. Further study can expand the tiny model into multi-scale prediction while retaining the same questions about alignment, supervision and measurement.
Make a prediction, then check
A 100-pixel image has 99 background pixels and 1 foreground pixel. Predicting background everywhere gives what mean IoU when both classes count?
Learning objectives
- Define dense class logits, spatial alignment and the distinction between background and ignored labels.
- Derive and differentiate weighted pixel cross-entropy through a complete small convolutional model.
- Compute dataset IoU from confusion counts, diagnose class imbalance and compare a learned model with simple baselines.
Prerequisites & connections
Explore related knowledge →References
- Fully Convolutional Networks for Semantic Segmentation — v2 dense method
Jonathan Long; Evan Shelhamer; Trevor Darrell · 2015 - FCN author evaluation code — dataset confusion and IoU
Evan Shelhamer and FCN contributors · 2018 - FCN author repository — fixed model and training notes
Evan Shelhamer and FCN contributors · 2018 - FCN arXiv submission history
Jonathan Long; Evan Shelhamer; Trevor Darrell · 2015 - PyTorch2.2 CrossEntropyLoss — class-index weighted mean
PyTorch contributors
Version1 · Editorial status: Recorded technical checks completed
View technical check record (AI)
Codex · 2026-09-07 · Codex single-AI-author technical check: bounded FCN primary reading and fixed author evaluator, independent spatial and gradient calculations, pixel/class aggregation counterexamples, full bilingual comparison and executed synthetic baselines. Not independent human review, FCN-8s reproduction or a natural-image benchmark.
- Fourteen numerical checks cover scalar patch equivalence, asymmetric-kernel orientation/receptive field, every parameter/input/logit finite difference, weight scaling, ignored-output versus input influence, all-ignored no-op, all-parameter training, unsigned confusion labels, class imbalance, dataset versus image aggregation, absent/empty cases and invalid inputs. Formal tests extract the article program and bind actual held-out predictions to figure data.
- Compared all en/zh arguments, eight display equations, same code/output, five source references, four explained answers and actual baseline comparison. One additional structural test. Original figures show generated data; the threshold beats the network on this single synthetic held-out scene. No natural-image or full FCN training claim.
Source locations checked:
- Fully Convolutional Networks for Semantic Segmentation — v2 dense method · Read physical pages 2–5: related work, dense convolution/classifier conversion, upsampling, loss sampling, ignored targets and skip fusion through FCN-8s opening. Page 3 visually checked. No benchmark numbers adopted; full experiments and later variants not audited.
- FCN author evaluation code — dataset confusion and IoU · Read the entire score.py: valid truth masking, cumulative confusion matrix, pixel and mean accuracy, nanmean class IoU and frequency weighting. Fixed Python 2 / Caffe implementation not executed or reused; teaching code adds input validation and explicit empty-set representation.
- FCN author repository — fixed model and training notes · Read opening 38 lines: project identity, PAMI/CVPR links, compatibility/license declaration and PASCAL training/model notes. These later models differ from the initial paper profile. Remaining README not read; scores not adopted, license declaration not a complete third-party reuse audit.
- FCN arXiv submission history · Read title/authors, abstract and submission history: v1 submitted 14 November 2014, v2 revised 8 March 2015. Rechecked 2026-09-07. Abstract benchmark results not adopted.
- PyTorch2.2 CrossEntropyLoss — class-index weighted mean · Re-read CrossEntropyLoss1037–1080 in fixed PyTorch2.2 source: pixelwise inputs, ignored class-index targets and weight-sum mean. Existing Source object preserved; our all-ignored zero-gradient policy is explicitly local.
Related topics