Skip to content

Commit

Permalink
Update cnn.R
Browse files Browse the repository at this point in the history
  • Loading branch information
D-Maar authored Nov 5, 2024
1 parent c14e2ef commit b584d7b
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions R/cnn.R
Original file line number Diff line number Diff line change
Expand Up @@ -132,8 +132,8 @@ cnn<-function (X = NULL, Y = NULL, architecture, loss = c("mse", "mae",
use_custom_dl<-!is.null(train_data_loader)
if(use_custom_dl){
sample_batch = train_data_loader$.iter()$.next()
X<- as.array(sample_batch$X)
Y<- c(as.matrix(sample_batch$Y))
X<- as.array(sample_batch[[1]])
Y<- c(as.matrix(sample_batch[[2]]))
batchsize=2L
if(!xor(is.null(valid_data_loader), validation!=0)) stop("You need to provided an validation data loader if you want to use a validation split with a custom data loader")
}
Expand Down

0 comments on commit b584d7b

Please sign in to comment.