  In this work, we enhance the FNet, a 1-dimensional convolutional neural
network (CNN) with a residual neural network (ResNet) architecture, to perform
spectral classification of quasars, galaxies, stars, and broad absorption line
(BAL)-quasars in the SDSS-IV catalog from DR17 of eBOSS. Leveraging its
convolutional layers and the ResNet structure with different kernel sizes, FNet
autonomously identifies various patterns within the entire sample of spectra.
Since FNet does not require the intermediate step of identifying specific
lines, a simple modification enabled our current network to classify all SDSS
spectra. This modification involves changing the final output layer from a
single value (redshift) to multiple values (probabilities of all classes), and
accordingly adjusting the loss function from mean squared error (MSE) to
cross-entropy. FNet achieves a completeness of 99.00\% $\pm$ 0.20 for galaxies,
98.50\% $\pm$ 0.30 for quasars, 99.00\% $\pm$ 0.18 for BAL-quasars, and 98.80\%
$\pm$ 0.20 for stars. These results are comparable to those obtained using
QuasarNET, a standard CNN employed in the SDSS routine, comprises convolutional
layers without the ResNet structure with equal kernel sizes, and is utilized
for redshift measurement and classification by identifying seven emission
lines. QuasarNET, in order to overcome the problem of finding a CIV emission
line with broad absorption which is slightly more challenging than that of
detecting emission lines requires to add BAL CIV line to the list of lines that
the network learns to identify. However, this procedure is not necessary in
FNet as it learns the features through a self-learning procedure.
