Category "keras"

How can fit a keras model with a dataframe of numpy arrays?

I want to train a model with self-generated matrices (word vectors). My data have the following datatypes: print(type(X)) print(type(X[0])) print(type(X[0][0]))

How can i do many things to configure data with keras

I am a beginner learning deep learning by Keras. The ImageDataGenerator class in Keras and the flow_from_directory function made it easy to label images. But al

Model Accuracy is High but Val_Accuracy is low

I'm trying to improve my val accuracy as it is very low. I have tried changing the batch_size, the number of images being used for validation and training. Adde

Import Error: cannot import name 'BatchNormalization' from 'keras.layers.normalization'

I am getting the following error message when trying to run this AlexNET python code. Traceback (most recent call last): File "C:\Users\PycharmProjects\Local-

Why is my accuracy is zero after set backbone trainable?

I trained my model with frozen backbone like: model.get_layer('efficientnet-b0').trainable = False Now, I unfreeze backbone, compile model, start training and

Add MC Holdout layers to trained model in Keras

I am looking for a solution for a problem that has arisen when building a generic ANN for image classification in R. What I want to do is either: Design and com

Loop over hidden layer's nodes and create model based on MLP

I want to build an MLP classifier on iris dataset. Actually, I want to build a function that runs the model with N hidden units in the hidden layer and a loop t

How to setup a base model in inference mode?

Keras documentation about fine-tuning states that it is important to "keep the BatchNormalization layers in inference mode by passing training=False when callin

Getting error 'NoneType' object has no attribute 'read' in python for image processing image_dataframe['image']

I am working on image classification using CNN. I am using below source code for that task. I am stuck with this error : AttributeError: 'NoneType' object has

What is the problem in this keras input shape?

from matplotlib import units import numpy as np from tensorflow.keras.models import Sequential from tensorflow.keras.layers import Dense from tensorflow.keras

How to convert rgb mask to categorical in keras

I try to find a proper solution to convert a rgb mask from "cam vid" dataset to categorical mask. I have the list of rgb value and corresponding label. What is

Keras semantic segmentation, infinite epoch using ImageDataGenerators

I am trying to train a model based on the U-Net architecture. I am using two data generators (one for training, the other one for validation). However, whatever

How to attach or get filenames from MapDataset from image_dataset_from_directory() in Keras?

I am training convolutional autoencoder and I have this code for loading data (images): train_ds = tf.keras.preprocessing.image_dataset_from_directory( 'pat

Will y_train change during training in keras?

I am trying to write a custom metric in keras like this: def C_index1(E,T): T = T.reshape(len(T),1) T_ind = T > T.T E_ind = E.reshape(len(E),1) E_ind

migrating keras + tensorflow cpu to tensorflow-gpu keras modelling

I'm a beginner of data-science and by now, I'm trying to migrate old code keras cpu modelling to gpu-tensorflow. fyi: I'm following instruction on prof.jeffheat

Keras simpleRNN by hand debugging

I plan to transfer my Keras model to embedded C code. In order to do that, I'm first validating in python whether my calculations are correct. There are some er

Work around Keras TypeError limitation when calling layer "tf.keras.backend.rnn_1"

I am trying to use Keras for an attention mechanism in a machine translation using an LSTM network. However, I get a TypeError exception when in my code. TypeEr

Input 0 of layer "conv1d_5" is incompatible with the layer: expected min_ndim=3, found ndim=1. Full shape received: (None,) when predicting new values

I have trained a VAE and now I am trying to predict new data using this dataset. I have taken the predict code line from this tutorial. However, when I run the

Dimension issues for LSTM sequence model on Keras

I'd like to train a simple LSTM model for sequence data with 128 time steps with 6 features for 118 multi-classes. The dimensions of the dataset are shown belo

cannot import name 'LayerNormalization' from 'tensorflow.python.keras.layers.normalization'

I am trying to build a ANN model using Tensorflow library on Spyder. Afte ı set my training and test data, ı imported the keras library as seen below