How can I see the model as visualized?

I am trying to do some sample code of GAN, here comes the generator. I want to see the visualized model but, this is not the model. Model.summary() is not the function of tensorflow but it is keras?? …

Reshaping MNIST for ResNet50

I am trying to train the mnist dataset on ResNet50 using the Keras library. The shape of mnist is (28, 28, 1) however resnet50 required the shape to be (32, 32, 3) How can I convert the mnist dataset …

Why is Keras complaining about incompatible input shape in this case?

I have trained a Keras-based autoencoder model with the following input layer: depth = 1 width = height = 100 input_shape = (height, width, depth) inputs = Input(shape=input_shape) # rest of network …

How to use tf.keras.utils.Sequence with model.fit() in Tensorflow 2?

I want to train a model with a custom generator class but model.fit() gives me this error: Traceback (most recent call last): File “C:/Users/benja/PycharmProjects/mri/modelTrainer.py&…

How to train a Keras autoencoder with custom dataset?

I am reading this tutorial in order to create my own autoencoder based on Keras. I followed the tutorial step by step, the only difference is that I want to train the model using my own images data …

LSTM neural network test to predict SPY prices giving me this error after training

Error is as follows: Traceback (most recent call last): File “/Users/myname/PycharmProjects/LSTM1P/venv/lib/python3.7/site-packages/pandas/core/indexes/base.py”, line 3080, in get_loc …

If-Else Statement in Custom Training Loop in Tensorflow

I created a model class which is a subclass of keras.Model. While training the model, I want to change the weights of the loss functions after some epochs. In order to do that I created boolean …

how to use more three channels input in train_datagen

I am trying to apply Keras for images with more than three spectral channels. I noticed that train_datagen handles images with three channels based on color_mode=’rgb’. Is there any way to increase …

TensorFlow CNN Incompatible Shapes: 4D input shape

I have sample data in the form: Data[n][31][31][5][2] with: “[n]” being the sample “[31][31]” being the array of data points “[5]” being the number of bits within that …

How to Calculate Confusion Matrix on test Data?

I want to plot a confusion matrix on the validation data. Specifically, I want to calculate a confusion matrix of the model output on the validation data. I tried everything online, but couldn’t …