What kind of output should be used for predicting angles in DNNs? I am building a model which predicts angles as output. What are the different kinds of outputs that can be used to predict angles?

For example,


output the angle in radians


cyclic nature of the angles is not captured
output might be outside $\left[-\pi, \pi \right)$

output the sine and the cosine of the angle


outputs might not satisfy $\sin^2 \theta + \cos^2 \theta = 1$



What are the pros and cons of different methods?
As you said, the first option is not very suitable due to the cyclic nature of the angles. However, if you don't mind discretizing the values, you could represent the output as a binary vector.

A variant of the second option seems perfect to me. You may output a 2D vector and use that vector's angle as output. You'll probably need a regularizer for the vector's norm, but that's it.