Caret does not use all registered kernels using the nnet method for training

I use the caret package train () function with the = 'nnet' method, and I registered 6 cores with doMC. But it uses only one core.

This is my code:

library(caret)
library(foreach)
library(doMC)
registerDoMC(cores = 6)

.... some code...

nnmodel.grid <- expand.grid(.size=c(100,50))
myTrainControl = trainControl(allowParallel=TRUE)
nnmodel.fit <- train(formulaForNN, data = trainingdata, method = "nnet", tuneGrid = 
nnmodel.grid, trControl = myTrainControl)

Although the answer to this link shows that you can use all registered kernels. The only difference that I see is

tc <- trainControl(method="boot",number=25)

i.e. it uses the “download” method to reselect.

Does this mean that for work with the carriage only multicore is used for resampling, and without using any resampling methods we cannot simultaneously create neural networks?

+4

Source: https://habr.com/ru/post/1547911/


All Articles