are convolutional layers nonlinear? orno
Jump to turn (9)
- 1are convolutional layers nonlinear? orno
- 2say i have a 1d convolutional layer with 15 output features, 64 kernel size, and
- 3why is there a weight per input channel? i thought convolutional layers just sli
- 4let me rephrase. i thought convolutional kernels learn a pattern, and find that
- 5is 64 in seq length space, or channel space
- 6aha, i see now. let's say our input sequence is [L, 960]. is there a way to loca
- 7how does the computational cost of this compare to a 960 -> 15 linear projection
- 8and if stride is equal to the kernel size? so there is no 'duplicate' work?
- 9ok now lets say i have an input [L, 960] and [L, 15, 64] kernel weights. essenti
- User
are convolutional layers nonlinear? orno
Assistant
Convolutional layers themselves are linear — they perform a linear operation (a convolution, which is just a weighted sum of inputs).
However, in practice, each convolutional layer is almost always followed by a nonlinear activation function (like ReLU, sigmoid, or tanh). So while the convolution operation is linear, the combination of convolution + activation introduces nonlinearity, which is essential for learning complex patterns.
So in short:
- Convolution operation: linear
- Convolutional layer in practice: nonlinear (because of activation)
- User
say i have a 1d convolutional layer with 15 output features, 64 kernel size, and 960 input features. how big are the weights of it?
Other models, same or similar prompt
Responses were produced in different, uncontrolled contexts (system prompts, settings, prior turns). This is not a benchmark.