1,510 questions
-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 ...
-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....
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', ...
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], ...
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....
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 ...
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 ...
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 ...
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,
...
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 ...
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))
...
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 ...
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 ...
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 ...
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 = ...