Skip to main content

All Questions

Filter by
Sorted by
Tagged with
0 votes
0 answers
3 views

Unrecognized Data Type

I am follwoing the training in the (https://www.bing.com/videos/riverview/relatedvideo?q=deep+learning+with+keras+tensorflow+freecodecamp&&view=riverview&mmscn=mtsc&mid=...
Kawther Hamad's user avatar
0 votes
0 answers
25 views

KeyError raised at input layer when trying to build a model with 2 inputs

KeyError: "Exception encountered when calling Functional.call().\n\n\x1b[1m140112707155856\x1b[0m\n\nArguments received by Functional.call(): \n • inputs={'input_1': 'tf.Tensor(shape=(None, 256,...
Matrix24601's user avatar
-1 votes
0 answers
14 views

How to handle varying Feature Dimensions in Graph Neural Networks training?

I have a question about how to handle datasets with different feature dimensions when training Graph Neural Networks (GNNs). For example, in one dataset (Dataset A), the node features have a dimension ...
Bipul Bikram Thapa's user avatar
-1 votes
0 answers
27 views

Tensorflow model takes so much RAM in google colab

When i try to train this model and this model doenst even have many trainable parameters, in google colab it crashes because it uses all the ram, i have a dataset of mp3 files, each mp3 file is 128 ...
Andrei Arseni's user avatar
1 vote
0 answers
40 views

InvalidArgumentError, Deep Learning with Python, Example 10.2.3

I'm trying example 10.2.3 from the book Deep Learning with Python by François Chollet. I'm getting an error on the line history = model.fit(...) using Tensorflow 2.17. However, I don't get an error if ...
Mike M. Lin's user avatar
  • 10.1k
0 votes
0 answers
23 views

Missing a required argument: 'dec_input' in Transformer Model

I am busy with a forecasting model, and have turned to Transformers to see if they will be able to perform better than other sequence models. I keep getting the error: TypeError ...
Tayla Corney's user avatar
-2 votes
0 answers
24 views

keep getting TypeError: load_model() missing 1 required positional argument: 'filepath' in tf version 2.15.0

I'm trying to load a model to use to for predictions, but it seems the model failed to load my tf version: tensorflow 2.15.0 model = load_model('model.h5') img_path = "app\model\test.jpg" ...
Tubagus Farhan's user avatar
-2 votes
0 answers
40 views

InvalidArgumentError: only one input size may be -1, not both 0 and 1 in TensorFlow model during prediction with single image input

I'm working on a TensorFlow model for face recognition, where I preprocess images, generate embeddings, and then store them in a CSV database. The model works fine when predicting on a batch of images ...
N1ne's user avatar
  • 1
0 votes
0 answers
24 views

Understanding the output of a simple neural network in TensorFlow Playground

I am learning about neural networks, so I started experimenting with Tensorflow playground. to understand the basics I set all parameters manually and didn't train the model afterward. specifically I ...
Robot12's user avatar
  • 67
0 votes
0 answers
26 views

Autoencoder Training Loss Doesn't Decrease Despite Cloned Code and Dataset

My first post on stackoverflow so thanks for any responses! I'm learning about anomaly detection using autoencoders and found a useful looking github repo notebook link here I've cloned the repo to my ...
oscartadhg's user avatar
0 votes
0 answers
22 views

Attribute error with ELMo embedding for CNN model

Having an issue with implementing ELMo embedding with a CNN model. I originally has some tokenization and padding but removed these steps as I am not sure they are needed when using pre-trained ...
leakie's user avatar
  • 1
0 votes
0 answers
31 views

Tensorflow GPU crashing after first epoch

I am training a neural network model and when running the code : history = model.fit( X_train, y_train_encoded, epochs=20, batch_size=32, validation_data=(X_val, y_val_encoded), ) The ...
Elyes Lounissi's user avatar
0 votes
0 answers
17 views

Project a boolean mask from max-pooling regions back onto the input tensor

I’m working on implementing a custom max-pooling layer in TensorFlow and need help projecting a boolean mask onto the input tensor to indicate the positions that contributed to the max values in each ...
Francesco's user avatar
  • 179
0 votes
1 answer
53 views

Multiclass classifier using Keras from 'Deep Learning with Python' yields very different accuracy compared to what's in the textbook

Below is the code for multi class classifier from Chapter 4 in 'Deep Learning with Python' by François Chollet. The textbook mentions this code will yield >95% training accuracy, but my environment ...
Thirumal's user avatar
  • 101
0 votes
0 answers
45 views

Invalid Argument Error in Tensorflow (Keras)

I was trying to run a deep learning project related to lip reading based on this Youtube video. The entire code is on github. The developer used the following versions of modules: opencv-python -4.0....
Mohit Bansal's user avatar
0 votes
0 answers
39 views

Tensorflow model weights not loading correctly

i'm trying to load a tensorflow neural network in c++ for a chess engine. the model was trained in python and i'm converting the weights to a binary file, but the dimensions are wrong when loading in ...
scar17off's user avatar
-2 votes
1 answer
43 views

Model Always Classifies Images as Cats with High Confidence Despite Hyperparameter Tuning [closed]

I am trying to train a model on images using the code below. My directory structure is as follows: The PetImages folder, which is approximately 1GB in size, is located next to my main.py script. ...
Akagami Shanks's user avatar
0 votes
0 answers
55 views

Value Error: expected axis -1 of input shape to have value 444, but received input with shape (None, 708)

I'm trying to train a FNN model for credit card fraud detection. My categorical features are merchant, category, city, and state. I also standardized my numerical features using StandardScaler. I ...
Aiden's user avatar
  • 1
0 votes
1 answer
59 views

Im trying to run this code: cnn = BatchNormalization(renorm=True)(cnn)

But This error occurs: ValueError: Unrecognized keyword arguments passed to BatchNormalization: {'renorm': True}. And I need this "renorm=ture" . Is there any other method to do so? I tried ...
Argho DebDas's user avatar
0 votes
1 answer
58 views

How to load a Keras model without importing Keras in a Python desktop app?

I have a trained Keras model saved as model.h5, which I would normally load using keras.models.load_model("model.h5"). I'm currently developing a Python desktop application with a GUI and ...
yamato's user avatar
  • 235
0 votes
0 answers
41 views

TensorFlow InvalidArgumentError: Concatenation dimension mismatch in ConcatOp - Shapes do not match

I keep getting this error: --------------------------------------------------------------------------- InvalidArgumentError Traceback (most recent call last) <ipython-input-50-...
Md. Imrul Kayes's user avatar
1 vote
0 answers
28 views

How to Control Memory Growth When Using TensorFlow in Multi-Round Training?

I'm facing an issue related to memory growth when using TensorFlow for a multi-round training process. Specifically, I have a model training loop in which I generate training and evaluation data in ...
Lekang's user avatar
  • 11
0 votes
1 answer
95 views

Low GPU utilization (0-5%) with high memory usage in model training

I'm working on a machine learning project using TensorFlow (version 2.10.1) to train a convolutional neural network (CNN) on sEMG signals. While my model utilizes nearly all of the GPU memory (10.8/12 ...
Arthur M.'s user avatar
0 votes
0 answers
37 views

Tensorflow Keras: Running an input through a non-sequential base model without the last activation layer

I have a Transformer-Decoder layer that includes non-sequential flow of inputs with Attention layers looping for 12 times. As below: def get_model(): input_shape = (n_chans, embed_dim) input = ...
Stooges4's user avatar
0 votes
0 answers
108 views

How to apply concrete dropout during inference time with batch size > 1 in Keras

I am trying to implement the concrete dropout method for a regression task, as described in Gal et al. (2017) (the paper). I am implementing it in R with the new Keras3 R package and a tensorflow ...
Thomas Brazier's user avatar
0 votes
0 answers
32 views

How to update a sequential retrieval model to accept the categories as a parameter?

I followed the Tensorflow Sequential Retrieval tutorial here. The model currently accepts a list of item IDs preferred by the user like so # create a model that takes in raw query features index = ...
Hisham Bawa's user avatar
0 votes
1 answer
83 views

summary() function not working in cnn (ValueError: Undefined shapes are not supported.)

I'm trying to make a classification network for IDing pictures from the cifar10 dataset. When I try to use the summary() function, I keep getting this error. ValueError ...
Noah Co Rodriguez's user avatar
0 votes
1 answer
65 views

Unwrapping an intermediate functional layer in Keras

I want to use the AblationCAM method, using Keras. I want to use the AblationCAM method, which requires creating a new model with the input of the original model and the output of the selected layer. ...
Houda SAIFI's user avatar
0 votes
0 answers
58 views

Arcface model can't be loaded

i'm working on face recognition system where i used arcface as its algortihm, and i download the arcface model from github in this link https://github.com/Martlgap/livefaceidapp/blob/main/model.onnx%...
sadmiaw's user avatar
0 votes
1 answer
77 views

Key Error when trying to extract layer activation in TensorFlow sequential model

I have a Sequential model that is trained on the MNIST dataset. After training, I am trying to create a new model to output activations from the hidden ReLU (Dense) layer. I reshaped the test image ...
Hero Chhabria's user avatar
1 vote
1 answer
44 views

Custom Encoder and Decoder Layers within Keras Model Show As Unbuilt

I have a subclassed tensorflow.keras.Model Seq2Seq model with custom layers. However, when I try to run a test script to build and compile the model, running model.summary() gives: Model: "...
Biggles-2's user avatar
0 votes
1 answer
26 views

Do steps round down when it's fractional?

I have begun experimenting with training machine learning models and encountered some confusion around the concepts of epochs and steps in the training process. While researching online, I came across ...
Rafa's user avatar
  • 1
0 votes
1 answer
201 views

`TypeError: Unsupported integer size (0)` when attempted to save custom Keras model

I have a subclassed tensorflow.keras.Model Seq2Seq model with custom layers. However when I try to save it via tensorflow.keras.Model.save() method, it throwing the following error: File "/home/...
Biggles-2's user avatar
0 votes
0 answers
33 views

Model is unable to overfit, even with a tiny dataset

I'm trying to create a CNN that can predict the position of up to 5 objects. Each point has 4 values: x and y coordinates, a presence value(0 if it's a padding value, 1 if it exists) and a depth value(...
qkasriel's user avatar
2 votes
0 answers
26 views

tried changing the output of vae model to satisfy loss function but something doesnt work

I tried to create a VAE model which generally contains a custom loss for which GradientTape() or a class is used for implementation. I didn't want to use these methods and instead tried a workaround ...
Tanishk Gopalani's user avatar
0 votes
1 answer
25 views

gradient becomes none after apply mask on trainable variable

When I implement the following code, gradient of x becomes none after apply mask on trainable variable. After removed the mask the gradient is able to be calculated. I am wondering what the reason of ...
Tian Lan's user avatar
0 votes
1 answer
65 views

Simple Gradient Descent in Python vs Keras

I am practicing neural networks by building my own in notebooks. I am trying to check my model against an equivalent model in Keras. My model seems to work the same as other simple coded neural ...
AdamS's user avatar
  • 11
0 votes
1 answer
49 views

Model Can't Predict Correctly Even Though Has A Good Classification Report

I have tried to run this model from the link: https://www.kaggle.com/code/alexfordna/garbage-classification-mobilenetv2-92-accuracy/notebook When I did it on colab with similar dataset (but smaller, ...
Eff Zoee's user avatar
0 votes
1 answer
57 views

I need to write complex-value neural network in tensorflow but I get an error

I have complex input to into the neural network, and I also need the neural network to have complex weights, but when writing the code, I get the error as below: ---------------------------------------...
Sajjad's user avatar
  • 129
0 votes
0 answers
130 views

Tensorflow 2.1 Keras error, the metric has not yet been built

i was stacking 5 pretrain model sort of like transfer learning. I was facing issue about The metric has not yet been built error issue and I not sure how to solve it. i am using tensorflow 2.17 ...
Clarence Ng's user avatar
0 votes
1 answer
102 views

TensorFlow 2.17.0 Error: tf.where() not working as expected after update

After updating TensorFlow to version 2.17.0, I'm encountering an error in a part of my model that previously worked fine. The error occurs when using tf.where() to create a gate based on a probability ...
Xixao's user avatar
  • 23
0 votes
0 answers
60 views

0.0 loss function while training transformer

I'm trying to complete Kaggle competition I created some sort of transformer model where I train 2 models on keywords column and on hashtags (which I extracted from text column). Here is a model for ...
fergotin's user avatar
0 votes
0 answers
34 views

FileNotFoundError: pose_cfg.yaml

I am trying to train my DeepLabCut network on some animal videos I have using departmental resources - GPU. I have activated my environment, made sure there are no broken requirements, no matter what ...
Stefani Dimitrova's user avatar
0 votes
0 answers
16 views

Tensorflow fit() function: steps_per_epoch = 1 causes oscillations in loss

I have a simple convolutional neural network that takes an input of size (5,5,3). The code of the training is added below. As you can see input is generated randomly and, only a single entry is used ...
a.j's user avatar
  • 1
1 vote
0 answers
33 views

How to create graph for higher order derivative in Tensorflow

My target is to forcing gradients to be statistically indistinguishable across tasks in a multi-task model by exposing them into a discriminator (inspired by Adversarial Learning, training weights to ...
Irene Ma's user avatar
1 vote
0 answers
50 views

Get the output of an intermediate layer in Keras for GradCAM for a subclassed model

I am trying to get the output of an intermediate layer for a resnet-style model that I developed using Keras and TensorFlow. My model consists of nested keras.Model objects. For clarity, I am adding ...
Arijit Dey's user avatar
0 votes
0 answers
32 views

High AUC on training data but incorrect predictions

I am doing a model that have two outputs: 1 categorical and 1 binary. After training the model, it has a very high accuracy on training data, and low accuracy on validation data. I wanted to see which ...
Manh Duc Dong's user avatar
0 votes
1 answer
71 views

Layer expects 2 input(s), but it received 1 input tensors

I am trying to build model to predict posts likes, the model takes text and content type which is one hot encoded column. I have made a TensorFlow dataset but when trying to fit the model I got this ...
Abdulaziz Snobrah's user avatar
0 votes
0 answers
35 views

ValueError: Cannot Reshape Tensor When Training ENet Model with Discriminative Loss Function

I’m currently working on a lane detection project using instance segmentation and following this tutorial. I’m attempting to train an ENet model with a discriminative loss function, but I'm ...
sippathamm's user avatar
0 votes
0 answers
53 views

How to modify tflite model?

Although many model have sigmoid layer, the embedded system sometimes not supported this layer. So, I want to remove this layer and then call this in my codes. Could you tell me solution if you know ...
김지송's user avatar

1
2 3 4 5
217