Extracting embeddings from artificial neural networks