DSAM: A Deep Learning Framework for Analyzing Temporal and Spatial Dynamics in Brain Networks