I follow the Book Deep Learning with R from Chollet and Allaire (Manning Publication).
page 59-69 Internet Movie Dataset
PC-components: i9-9820 CPU with 10(20) Kernels, 64 GB RAM, Nvidia Geforce RTX 2080ti, Win10.
I installed keras with gpu support:
library(keras)
install_keras(tensorflow = "gpu")
All works fine!
I build the examples with the internet movie database "imdb". I prepare the data, build the model, train and validate (fit) it. All works as expected. The program runs fast.
In the next step I repeat the procedure with the test data. Now I build the model, train the data (fit) with reduced epochs (comes from validation step) and evaluate the test data.
Here it happens:
The evaluation of the test data need a long time. The same happens when I predict the first 10 test data. It also takes about one minute. The same happens with simple assignments:
z <- test_data[1:10, ]
The resource of my computer where only sparsely used. Why?
It seems - that after running the second model (fit) the RStudio session works not optimal.
I try two separated programs. The first one use only model1 and the second model2. I started each program in a new RStudio-Session. Surprise: Both programs works now with the same speed. Only the evaluate procedure from model2 was still slow.
Any Idea?
Helmut Grillenberger
Statistician and Data Scientist