Skip to content
Advertisement

Tag: keras

Keras tuner Bayesian Optmization graph error

I am trying to optimize a convolutional neural network with Bayesian Optimization algorithm provided in keras tuner library. When I perform the line: tuner_cnn.search(datagen.flow(X_trainRusReshaped,Y_trainRusHot), epochs=50, batch_size=256) I encounter this error: InvalidArgumentError: Graph execution error One-Hot-Encode y_train and y_test as the following: I defined my model builder like that: perform the tuner search: I also tried to do: But it does

How to hypertune input shape using keras tuner?

I am trying to hypertune the input shape of an LSTM model based on the different values of timesteps. However, I am facing an issue. While initializing the model, the default value of timesteps (which is 2) is chosen, and accordingly, the build_model.scaled_train is created of shape (4096, 2, 64). Thus the value of input_shape during initialization is (2, 64).

Why does Keras run only 5 epochs out of 25?

I have uninstalled Keras and Tensorflow and installed them both using But even after, I still have this strange thing that it’s only 5 epochs that are running: I cannot track when this situation occurred, but it used to run all of the epochs. Here is my code: I also use Please direct me. Answer Try replacing the steps_per_epoch =

Tensorflow: Issues with determining batch size in custom loss function during model fitting (batch size of “None”)

I’m trying to create a custom loss function, in which I have to slice the tensors multiple times. One example is listed below: This (and the entire loss function) works fine when testing it manually on selfmade Tensors y_true and y_pred, but when using it inside a loss function it will give an error upon model fitting (compiling goes fine).

How to save Keras encoder and decoder separately?

I have created an autoencoder using a separate encoder and decoder as described in this link. Split autoencoder on encoder and decoder keras I am checkpointing my autoencoder as followed. How do I save the encoder and decoder separately corresponding to the autoencoder? Alternatively, can I extract deep encoder and decoder from my save autoencoder? Answer You could try to

Advertisement