Possibilities on generating embeddings from BERT models in DL4J

Is it possible to generate embeddings in DL4J using SameDiff? Recently I created a frozen BERT from one of Hugging Face BERT models. I was able to load it successfully using the SameDiff but while running the inference I got an issue with the strided slice operation due to threading issue. I tried to limit number of threads, but it gave me the same error. I am using 1.0.0-M2 version of the libraries. Do we have any resources that would guide us through such use cases? @agibsonccc

@ssharma could you give a stack trace of what you’re facing? You’re alluding to “libraries to solve this problem” I don’t really get what you’re after here.

Also, somehow strided slice is related to threading? None of this is making any sense. An indexing error has nothing to do with multi threading.

Can you please break this down and show some sort of code? This sounds all over the place.