openai / generating-reviews-discovering-sentiment

Code for "Learning to Generate Reviews and Discovering Sentiment"
https://arxiv.org/abs/1704.01444
MIT License
1.51k stars 379 forks source link

speed up suggestions? #37

Open ronikobrosly opened 7 years ago

ronikobrosly commented 7 years ago

Hello, I'm thinking about using the sentiment neuron to create sentiment-colored, blocks of text like they did in the paper in Figure 4. The code I'm using to calculate sentiment is simple, something like:

`from encoder import Model

model = Model()

text = ['This is a terrible product. Very bad!'] text_features = model.transform(text) text_features[:, 2388]`

I've got a quad-core macbook pro and no GPU. Any suggestions on how I could speed up the calculations? Is there a way to specify that all available cores should be used?

raulpuric commented 6 years ago

I can't remember exactly how but you should be able to set the number of cores/threads you want to be used for BLAS