Olá pessoal, estou tendo um problema com o fit do Keras:
Error in (function (classes, fdef, mtable) :
unable to find an inherited method for function ‘fit’ for signature ‘“keras.engine.functional.Functional”, “missing”’
Abaixo um trecho do código:
input <- layer_input(shape = 24)
output <- input %>%
layer_dense(units = 1, activation = "sigmoid")
model <- keras_model(input, output)
summary(model)
model %>%
compile(
loss = loss_binary_crossentropy
, optimizer = optimizer_sgd()
, metrics = "accuracy"
)
model %>%
fit(
x = X_train
, y = Y_train
, batch_size = 10
, epochs = 200
, validation_split = 0.2
)
Created on 2022-04-23 by the reprex package (v2.0.1)