1,510 questions
Score of 0
1 answer
74 views
Issue when loading model with hub.KerasLayer layer... NameError: Exception encountered when calling Lambda.call()
I am doing some NLP exercises. I am unable to use a saved model with a hub.KerasLayer layer :(
Here are the steps I done:
Create the model - OK
Compile the model - OK
Fit/Train the model - OK
...
Score of 3
1 answer
192 views
How to fix ValueError: Only instances of keras.Layer can be added to a Sequential model when adding tensorflow_hub.KerasLayer?
I am learning TensorFlow and transfer learning, and I am trying to add a TensorFlow Hub feature extractor to a Keras Sequential model. But I get this error:
ValueError: Only instances of keras.Layer ...
Score of -1
1 answer
85 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 ...
Score of -2
1 answer
639 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....
Score of 2
0 answers
125 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], ...
Score of 2
1 answer
347 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....
Score of 1
4 answers
2206 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 ...
Score of 0
0 answers
87 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 ...
Score of 0
1 answer
65 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 ...
Score of 0
1 answer
246 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,
...
Score of 0
1 answer
176 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 ...
Score of 0
1 answer
819 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))
...
Score of 0
0 answers
883 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 ...
Score of 1
2 answers
589 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 ...
Score of 3
1 answer
1949 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 ...