Hi,
I have recently installed keras/tensorflow on my computer and I am trying to build a basic autoencoder in R studio. No matter how many hidden layers I define, I keep receiving this error:
Error in py_call_impl(callable, dots$args, dots$keywords) : ValueError: No data provided for "bottleneck_input". Need data for each key in: ['bottleneck_input']
This is my code:
model1 <- keras_model_sequential()
model1 %>%
layer_dense(units = 3, activation = "tanh", name = "bottleneck", input_shape = ncol(traindata)) %>%
layer_dense(units = ncol(traindata))
model1 %>% compile(
loss = "mean_squared_error",
optimizer = "adam"
)
model1 %>% fit(
x = traindata,
y = traindata,
epochs = 10,
validation_split = 0.2
)
My train data dimension is 617 * 7 and I want to use autoencoder to reduce its dimension to 617 * 3 by using the output from the middle layer (bottleneck).
Any suggestions would be appreciated.