Questions tagged [keras-layer]
The keras-layer tag has no usage guidance.
keras-layer
1,524
questions
0
votes
0
answers
21
views
I get an keras.Layer error when ever i use my code
import numpy as np
import pandas as pd
import PIL
import streamlit as st
import tensorflow as tf
import tensorflow_hub as hub
from geopy.geocoders import Nominatim
import tf_keras
model_url = 'https:/...
0
votes
0
answers
19
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
35
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
0
answers
29
views
keras throwing error while training the LSTM
I have this input:
[['step', 'step', 'guide', 'invest', 'share', 'market', 'india'],
['story', 'kohinoor', 'kohinoor', 'diamond'],
['increase', 'speed', 'internet', 'connection', 'using', 'vpn'],
['...
0
votes
0
answers
9
views
"Runtime error: Reshape dimension issue in model definition"
I am working on creating a model definition. The model takes a sequence of images,a sequence of detected object's bounding boxes and associated classes.
I am using mobilenetv2 as a feature extractor ...
0
votes
0
answers
42
views
In practice code, it is saying the keras layer is not valid
I was checking out quantization using keras in colab, but when i run it , it says that the layer is not a keras accepted layer in the quantize_model()
# Commented out IPython magic to ensure Python ...
0
votes
0
answers
26
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
0
answers
40
views
pre-trained model embeddings from Universal Sentence Encoder
I am trying to load pretrained embeddings from Universal Sentence Encoder on TF-Hub. It seems to work only on keras v. 2.15.0. I am seeking help with its implementation on keras v 3.0.5
FYI - I did ...
0
votes
0
answers
33
views
Keras TextVectorization Vectorized Layer .set_vocabulary() not changing token to index mapping
`
def get_vectorize_layer(all_text, vocab_size, max_seq, special_tokens=["[MASK]"):
"""
Build Text vectorization layer
Args:
all_text (list): List of string i.e input ...
0
votes
1
answer
47
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
0
answers
20
views
Working with multiple input data (image, float64 value) on InceptionV3
def inceptionV3(reshaped_images, scores, y, unique_y_values, percentage):
X_train, X_test, y_train, y_test = train_test_split(reshaped_images, y, test_size=1-percentage, random_state=42)
...
0
votes
0
answers
112
views
ModuleNotFoundError: No module named 'keras.src.preprocessing'
I am getting this error when running my deep learning model app using flask in my conda env, the model is in h5 format. Funny thing is this module doesn't exist. My keras version is 3.1.1 and keras-...
0
votes
1
answer
427
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))
...
1
vote
0
answers
392
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 ...
0
votes
0
answers
23
views
ValueError: Unknown layer: 'Custom>TFMPNetMainLayer'
def Classifier(input_shape):
model = TFMPNetModel.from_pretrained('microsoft/mpnet-base')
layer = model.layers[0]
inputs = keras.Input(shape=input_shape, dtype='int32')
input_masks = ...