Category "keras"

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

How to overcome "No module named 'keras'" while importing tensoflow_hub

I am using Anaconda and Jupyter Notebook. I need a tensorflow_hub to import the ResNet model, however, I get the error No module named Keras. I've installed ker

How can I predict n number of future values using RNN which uses multiple features

I am having a use case where I need to predict n number of future values after using the given data. eg: I have data from Jan 1 2021 - Jan 1 2022. I need to pre

Denoise autoencoder not training properly

I'm trying to make a denoise autoencoder wherein the encoder part is vgg16 and decoder is opposite of vgg16(encoder) network. My dataset consists of 5K images i

Can not run the the tflite model on Interpreter in android studio

I am trying to run a TensorFlow-lite model on my App on a smartphone. First, I trained the model with numerical data using LSTM and build the model layer using

Compute class weight function issue in 'sklearn' library when used in 'Keras' classification (Python 3.8, only in VS code)

The classifier script I wrote is working fine and recently added weight balancing to the fitting. Since I added the weight estimate function using 'sklearn' lib

Inputing a torch 3d tensor into a keras.Sequential model

Here I have a pytorch tensor object which I need to use for training a neural network. Can pytorch tensors be used for training a keras neural network and if so

How is the Keras Conv1D input specified? I seem to be lacking a dimension

My input is a array of 64 integers. model = Sequential() model.add( Input(shape=(68,), name="input")) model.add(Conv1D(64, 2, activation="relu", padding="same",

Concatenation layer raise Value Error: as_list() is not defined on an unknown Tensor Shape

I'm Trying to making DNN using Wide Deep Nural Network using keras the following code produces the following after trying to implement it, I also making my cust

Setting up keras-rl2 on my M1 Macbook Pro

I am working on a project on Reinforcement Learning - and completely new at this. I installed keras-rl as pip install keras-rl, however it caused an error as ma