I have defined a stateful LSTM RNN, and I want to reset the state of the RNN after each epoch. I have found that one way to do this would be: n_epochs = 50 for
I have a Keras model in which i have successfully added a StringLookUp pre-processing step as part of the model definition. This is generally a good practice be
I try to pass 2 loss functions to a model as Keras allows that. loss: String (name of objective function) or objective function or Loss instance. See losses. I
I am working on a modified resnet, and want to insert dropout after activation layers. I have tried the following but due to the model not being sequential, it
I am running ANFIS algorithm on iris dataset. While adding fuzzylayer to the model i am getting error like below: TypeError: <lambda>() got an unexpected
I have created a CNN to do binary classification in keras with the following code: def neural_network(): classifier = Sequential() # Adding a first convolu
I tried to import vgg16 which I downloaded from google storage import keras import cv2 from keras.models import Sequential, load_model But I got th
I am in the process of translating a Keras implementation to a PyTorch one. After the full conversion my model was not converging fast enough, although the loss
In the following code I have defined a Sequential model, that contains two parts conv_encoder and conv_decoder. After training the model I want to use conv_enco
I want to use keras to build a neural network regression model from X_train -> Y_train. In this example, however, I need to perform a preprocessing transform
I created a sequential neural network with Keras that has an input of 4 and an output of 8. I realize what I did was incorrect but I'm not sure as to why the co
I am trying to convert some code from tensorflow 1.x to tensorflow 2.x. It's been going well so far, but I'm stuck on atrous convolution. Unlike other layers, t
I am trying to develop a GAN, I have created the generator and the discriminator and now I am trying to train it. I am using the Mnist dataset but I plan to use
Currently I'm working on an image classification issue and created the following code based on a tutorial online - Image Classification using Keras. The code w
I used "flow_from_directory" but my "lose" is not decreasing. I notice When I run "fit_generator". Its says there is 1 classes, even though my mask have 3 class
I made a model using Keras with Tensorflow. I use Inputlayer with these lines of code: img1 = tf.placeholder(tf.float32, shape=(None, img_width, img_heigh, i
I have time series training data of about 5000 numbers. For each 100 numbers, I am trying to predict the 101st. At the end of the series, I would put in the pre
I have built a BiLSTM model with an attention layer for sentence classification task but I am getting an error that my assertion has failed due to mismatch in n
I am looking for a keras equivalent of scikit-learn's partial_fit : https://scikit-learn.org/0.15/modules/scaling_strategies.html#incremental-learning for incre
I am trying to build an autoencoder with the following code import matplotlib.pyplot as plt import numpy as np import pandas as pd import seaborn as sns import