File tree Expand file tree Collapse file tree 1 file changed +3
-13
lines changed
Expand file tree Collapse file tree 1 file changed +3
-13
lines changed Original file line number Diff line number Diff line change @@ -232,19 +232,9 @@ class ActivationPReLU : public Activation
232232
233233 // Prepare the slopes for the current matrix size
234234 std::vector<float > slopes_for_channels = negative_slopes;
235-
236- if (slopes_for_channels.size () == 1 && actual_channels > 1 )
237- {
238- // Broadcast single slope to all channels
239- float slope = slopes_for_channels[0 ];
240- slopes_for_channels.clear ();
241- slopes_for_channels.resize (actual_channels, slope);
242- }
243- else if (slopes_for_channels.size () != actual_channels)
244- {
245- // This should not happen in normal usage, but handle gracefully
246- slopes_for_channels.resize (actual_channels, 0 .01f ); // Default slope
247- }
235+
236+ // Fail loudly if input has more channels than activation
237+ assert (actual_channels == negative_slopes.size ());
248238
249239 // Apply each negative slope to its corresponding channel
250240 for (unsigned long channel = 0 ; channel < actual_channels; channel++)
You can’t perform that action at this time.
0 commit comments