Category "keras"

Keras: difference of InputLayer and Input

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

Keras LSTM fit underfitting

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

assertion failed: [Condition x == y did not hold element-wise:]

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

Incremental learning in keras

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

ValueError: logits and labels must have the same shape ((None, 328, 328, 3) vs (None, 1)) with autoencoder

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

Input 0 of layer sequential is incompatible with the layer expected ndim=3, found ndim=2. Full shape received: [None, 1]

I am working with keras for text classification. After pre-processing and vectorization my train and validation data details is like bellow: print(X_train.shape

TFA BeamSearchDecoder Clarification Request

If the question seems to dumb, it is because I am new to TensorFlow. I was implementing a toy endocer-decoder problem using TensorFlow 2’s TFA seq2seq imp

Keras - no good way to stop and resume training?

After a lot of research, it seems like there is no good way to properly stop and resume training using a Tensorflow 2 / Keras model. This is true whether you ar

Keras: the difference between LSTM dropout and LSTM recurrent dropout

From the Keras documentation: dropout: Float between 0 and 1. Fraction of the units to drop for the linear transformation of the inputs. recurrent_dropout: F

tf.data.Dataset iterator returning Tensor("IteratorGetNext:1", shape=(None, 16), dtype=int32) but cannot get the values of the Tensors

I am trying to write a Custom Model in which I am writing a custom train_step function I am creating a 'tf.data.Dataset` from a Custom Datagenerator like tds =

What does keras 'accuracy' mean in seq2seq model?

I'm trying to build a seq2seq model to predict sequence. The most basic model was built, but I'm having trouble with understanding what 'metric=['accuracy']' me

Unable to produce tensorboard in Keras pre trained model

I am building Pre trained inception model for image classification in keras i am trying to produce tensorboard but getting errors like "Unable to create directo

Keras installation failed with Rstudio RcppTOML had non-zero exit status

I am struggling to install keras on my Rstudio version 2021.09.2 Build 382 (R version 3.6.0 (2019-04-26)) on Linux Centos 7. I am having this error message: ERR

Input shape for Keras conv1D with sequential data

I want to use Conv1D for making dilated convolution network to a sequential dataset. So I tried Conv1D with Boston dataset. from tensorflow.python.keras.layers

Multiple CNN output + data augmentation with Keras error: `x` (images tensor) and `y` (labels) should have the same length

I am working on a CNN model running through a dataset of images, where I have one set of convolution layers, then two sets of dense layers for outputting age an

How to use keras model inside other model in TPU

I am trying to convert a keras model to tpu model in google colab, but this model has another model inside. Take a look at the code: https://colab.research.goo

ValueError: The first argument to `Layer.call` must always be passed

I was trying to build a model with the Sequential API (it has already worked for me with the Functional API). Here is the model that I'm trying to built in Sequ

How do custom input_shape for Inception V3 in Keras work?

I know that the input_shape for Inception V3 is (299,299,3). But in Keras it is possible to construct versions of Inception V3 that have custom input_shape if

ImportError: cannot import name 'adam' from 'keras.optimizers'

I am trying to import Keras but I get the following error: ImportError: cannot import name 'adam' from 'keras.optimizers' (/usr/local/lib/python3.8/dist-package

ImportError: cannot import name 'adam' from 'keras.optimizers'

I am trying to import Keras but I get the following error: ImportError: cannot import name 'adam' from 'keras.optimizers' (/usr/local/lib/python3.8/dist-package