Skip to main content
0 votes
0 answers
20 views

How to load a gz file for a CNN model in Python?

Been trying to test an image classification CNN model on Python (using Python 3.11.8) with VS Code as my editor. Whenever I tried to run the main.py file, it gives me this error: Traceback (most ...
Luis Cruz's user avatar
0 votes
0 answers
27 views

Problems loading a model saved in .h5 after upgrading Tensorflow from 2.15.0 to 2.17.0

I created an LSTM model with the tensorflow library version 2.15.0. I now have to use the model created in a new project, but in this project I have to use all the updated libraries and also the last ...
Alessandro Chiari's user avatar
-2 votes
0 answers
24 views

Multi Output Classification - Outputs not making sense relative to one another [closed]

Let's say I have a Multi Output Binary Classification Problem, but where the classes are related. i.e if one class = 1, then the other must = 1. The standard is to have 2 output layers, each with 1 ...
the man's user avatar
  • 1,337
0 votes
0 answers
30 views

ValueError: Invalid dtype: complex64 when using get_melspectrogram_layer in Kapre

I'm trying to use the get_melspectrogram_layer from the Kapre library in a Keras model. However, I'm encountering the following error: ValueError: Exception encountered when calling STFT.call(). ...
David Kinyanjui's user avatar
0 votes
0 answers
14 views

no attribute "get_shape" on custom objects in model

I am encountering an error when trying to load a Keras model with custom objects. The error message is: AttributeError: 'function' object has no attribute 'get_shape' This occurs in the following ...
kwcool's user avatar
  • 1
2 votes
1 answer
30 views

How do I use MobileNetV2 model to use gray scale images

I am using the MobileNetV2 model as my base model, but I added 5 new trainable layers and I'm re-training it on two new categories: monkeypox positive and monkeypox negative. The monkeypox negative ...
Saketh Nandam's user avatar
0 votes
0 answers
23 views

transformers No module named 'keras.engine'

I have transformers 4.25.1 and Keras 3.4.1 with Python 3.9 under Windows. permutation_importance uses transformers\utils\import_utils.py which produces: line 1095, in _get_module raise ...
Nick's user avatar
  • 147
0 votes
1 answer
20 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
-2 votes
0 answers
26 views

How do I connect CNN layers to an LSTM layer in Keras? [closed]

I’m trying to build a model in Keras that uses CNN layers to extract features from images and then uses an LSTM layer to process the sequence of features. How should I reshape the output of the CNN ...
Utsav Singhal's user avatar
0 votes
1 answer
45 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
0 answers
14 views

Gradients do not exist (keras-tcn)

If I execute the code at the buttom I get the following warning: Gradients do not exist for variables ['kernel', 'bias'] when minimizing the loss. If using model.compile(), did you forget to provide a ...
xxxyyy's user avatar
  • 3
-1 votes
0 answers
23 views

How to take into account the image mask in a CNN model?

I am building a regression model using convolutional neural networks (with tensorflow + keras). My images are not rectangular, that is, there are areas of the image with data and others with null ...
f4gm's user avatar
  • 1
-1 votes
1 answer
38 views

Use similar np.where function in custom Keras loss function

I'm trying to create a custom loss function that calculates the total amount won based on the predictions, actual outcome of games and the odds for the home team to win. Currently, I've gotten so far ...
KaiHoogenhoud's user avatar
-1 votes
0 answers
46 views

2n epochs are skipping while training ResNet model

Epochs that are multiples of 2 are finishing very quickly. I don’t think my model is being trained. I'm using tensorflow keras to train my model. I am using colab environment. Here is the results of ...
yedksapka's user avatar
0 votes
0 answers
26 views

Error ParallelMapDatasetV2 when trying to predict a model using Keras

I'm trying to train a simple classification model using Keras that works with text and has two output classification: 0 or 1. I transformed my text data using TfidVectorizer() from SKlearn and ...
Renato Teixeira's user avatar

15 30 50 per page
1
2 3 4 5
2835