Skip to content
Advertisement

Tag: keras

Fitting LSTM model

I am trying to fit LSTM model, but it gave me an error with the shape. my dataset has 218 rows and 16 features including the targeted one. I split the data, %80 for training and %20 for testing, after compiling the model and run it, i got this error: Variable definitions: batch_size = 160 epochs = 20 timesteps =

trying to callibrate keras model

I’m trying to calibrate my CNN model by Sklearn implementation CalibratedClassifierCV, tried to wrap it as KerasClassifier and to override the predict function but without success. someone could say me what I did wrong? this is the model code: this is me trying to calibrate it : the output : valX_cnn and val_y_cnn are of type np.array. tried even to

Python Tensorflow Shape Mismatch (WaveNet)

I was trying to run a WaveNet, which is specified in https://github.com/mjpyeon/wavenet-classifier/blob/master/WaveNetClassifier.py. Part of my code is as follows: Here, self.input_shape=X_train.shape and self.output_shape=(11,) It successfully printed out the model’s summary, but was outputting the following error: However, my X_train has a shape of (19296, 110250). I was trying to figure out on why the X_train has been reshaped from (19296,

How to correctly pass a split function to TextVectorization layer

I’m defining a custom split callable for TextVectorization like this: resulting in: as seen above the split function is working correctly outside of the TextVectorization layer but failes when passed as a callable Answer Your split_slash function does not seem to properly tokenize the phrases. It is probably because your TextVectorization layer strips your phrases of all punctuation including /

Advertisement