Supervised learning of analysis-sparsity priors with automatic differentiation