Skip to main content
-1 votes
1 answer
63 views

Keras: how to avoid input shape of sequential call being automatically squeezed by input

When creating a sequential MLP taking a batched input of shape [batch,n_channels,1], calling keras.layers.Input forcibly squeezes the last axis resulting in issues in an NN i'm attempting to create ...
The_Docc's user avatar
-2 votes
1 answer
578 views

ValueError: Only instances of 'keras.Layer' can be added to a Sequential model

ValueError: Only instances of `keras.Layer` can be added to a Sequential model. Received: <tensorflow_hub.keras_layer.KerasLayer object at 0x7c61f819f590> (of type <class 'tensorflow_hub....
Moein Nouri's user avatar
0 votes
0 answers
44 views

Layers error while trying to use keras_vggface

I get this error with trying to run my code: Traceback (most recent call last): File "/Users/kegak/AI_Project/main.py", line 24, in <module> vggface = VGGFace(model='resnet50', ...
user28522874's user avatar
2 votes
0 answers
23 views

Finetuning with Loraa and fitting my model error

After finetuning my dataset using keras, I tried to fit the model to lora and this was the error I encountered: TypeError Traceback (most recent call last) Cell In[12], ...
Sharon's user avatar
  • 21
2 votes
1 answer
294 views

Keras Error 'keras.layers' has no attribute 'RandomRotation'

I am trying to optimize a CNN made with KERAS. For that I wanted to use the KERAS TUNER module. However, when importing the module i get the error message: "AttributeError: module 'tensorflow....
Phasco's user avatar
  • 31
1 vote
4 answers
2k views

Only instances of `keras.Layer` can be added to a Sequential model

I encountered an error related to Sequential while working with TensorFlow Hub. Can anyone help me with this?" enter image description here "ValueError: Only instances of keras.Layer can be ...
ercan kurtoğlu's user avatar
0 votes
0 answers
79 views

ValueError: Layer 'functional_45' expected 3 input(s). Received 1 instead. Trouble with passing validation dataset

I am new to Tensorflow and kKeras and I am trying to create a neural network as mentioned in the keras website. I am trying to create a baseline model with a dataset of my own. The codes are exactly ...
United Dragons's user avatar
0 votes
1 answer
52 views

Trying to concatenate two keras tensors but getting error

I'm trying to concatenate a tensor with shape (None, 11, 1, 1) with another tensor with shape (None,1,1,1). Reading the keras.layers.Concatenate() docs I understood that the shape should be the same ...
Mitch's user avatar
  • 1
0 votes
1 answer
192 views

Value error in passing batch_input_shape Argument in Keras Embedded Layer

I am having trouble with passing "batch_input_shape" in Jupyter Lab and VScode as well. ### Defining the RNN Model ### def LSTM(rnn_units): return tf.keras.layers.LSTM( rnn_units, ...
Bluehand1984's user avatar
0 votes
1 answer
146 views

Is YAMNet model can be used with the hub.KerasLayer?

I am attempting to use YAMNet for transfer learning to perform speech command recognition. I plan to train the model using the mini speech commands dataset from the simple audio project. The goal is ...
zheng's user avatar
  • 1
0 votes
1 answer
784 views

Unrecognized keyword arguments passed to Embedding: {'input_length': 10}

I am trying to build this RNN below, import keras model = Sequential() input_dim=3 output_dim=1 input_length=1 model.add(keras.layers.Embedding(input_dim, output_dim, input_length=input_length)) ...
Arian's user avatar
  • 1
0 votes
0 answers
823 views

AttributeError: module 'keras._tf_keras.keras.layers' has no attribute 'experimental'

i'm new to tensorflow and keras and i'm trying to build a realtime sign detection model. I'm following Nicholas Renotte's video tutorial https://www.youtube.com/watch?v=pDXdlXlaCco&t=864s import ...
Nishi Parekh's user avatar
1 vote
2 answers
545 views

Error when using keras: module 'keras.layers' has no attribute 'TextVectorization'

import os os.environ["KERAS_BACKEND"] = "tensorflow" import pandas as pd import pathlib import random import string import re import numpy as np import tensorflow as tf import ...
Leila Saxby's user avatar
3 votes
1 answer
2k views

Tensorflow v2.16 tf.keras.layers Embedding not accepting argument for input_length

While working with Embedding for an LSTM model I came across an issue with input_length: ValueError: Unrecognized keyword arguments passed to Embedding: {'input_length': 536} Is input length being ...
Connor Scott's user avatar
0 votes
0 answers
64 views

Problem with keras.Dense. The last dimension of the inputs to a Dense layer should be defined. Found None. Full input shape received: (None, None)

I wrote some python code to develop a siamese network. The sub-clase from keras.Model is: class modelSIAMESE(keras.Model): def init(self): super().init() input_shape = target_shape + (3,) input_a = ...
Alexander Pascau's user avatar

15 30 50 per page
1
2 3 4 5
101