Dear members,
As a beginner, I read the book of François Chollet with J.J. Allaire "Deep Learning with R". While trying to reproduce the code of the book allowing to visualize the convnet filters, R returns an error (cf. code/reprex below).
I would be very grateful if any of you could help me.
Kind regards
Loïc
REPREX:
library(keras)
model <- application_vgg16(
weights = "imagenet",
include_top = FALSE
)
layer_name <- "block3_conv1"
filter_index <- 1
layer_output <- get_layer(model, layer_name)$output
loss <- k_mean(layer_output[,,,filter_index])
#> Error in `[.python.builtin.object`(layer_output, , , , filter_index): unused arguments (alist(, , filter_index))