Machine learning non-local correlations