42,240 questions
0
votes
1
answer
37
views
Difference between Tensorflow/Keras Dense Layer output and matmul operation with weights with NumPy
I was trying to mimic the result of a simple Tensorflow/Keras Dense layer with NumPy (forward pass only) and I was surprised not to have the exact same result.
A dense layer output is just the product ...
0
votes
0
answers
18
views
Can I save and load a Keras Model with Feature Names added?
I have data where I need to use numpy's "get_dummies" to convert the one Hot Encoding. When I train from a larger dataset I get all the possible encodings. When I predict I could possible ...
-1
votes
0
answers
41
views
Why does my multi-task Keras model show high L1 training accuracy but low L1 test accuracy with low test loss? [closed]
I'm training a multi-task deep learning model using TensorFlow/Keras to classify car images with two objectives:
L2 Task: Binary classification — Car vs. No Car
L1 Task: Binary classification — among ...
0
votes
2
answers
51
views
unable to load a model with Keras
I wanted to create a speech recognition application and I was following this tutorial : Transformer ASR.
After training it for 1 epoch, I saved the model and it saved successfully:
model.save("...
-1
votes
0
answers
32
views
How to fix overly smooth LSTM forecasts in volatility time series prediction?
I'm facing an issue with forecasting volatility using LSTM and Gridsearch for find the best Hyperparameter for model.
param_grid = {
'units': [32, 64, 128],
'dropout': [0.2, 0.5],
'...
-2
votes
0
answers
38
views
Tensorflow 2 Custom Training Loop Not Updating Weights / YoloV3 [closed]
I am trying to build YoloV3 from scratch in TF2 Functional API and train it on custom data from Kaggle. When I train the model my custom training loop works, however the loss stays at the exact ...
0
votes
0
answers
48
views
Add Feature extraction as part of a keras model
Is it possible to add feature extraction as part of a keras model, so when a user runs inference there is no need for computing those features as that part is done inside the model. Im looking for a ...
-5
votes
0
answers
104
views
Use TensorFlow's model in OpenCV (C++)
I'm struggling with exporting a neural network trained using TensorFlow to OpenCV. The model is trained with the help of Keras documentation and the code I use is listed below.
First, you need to ...
0
votes
1
answer
55
views
ValueError: The layer sequential_4 has never been called and thus has no defined input
I have built a CNN model with the following layers:
def build_trainable_cnn(input_shape, num_classes):
"""
Create a CNN model for feature extraction
Parameters:
...
0
votes
1
answer
21
views
ValueError: as_list() is not defined on an unknown TensorShape. Error with lambda function
I'm trying to build and train a model with keras, but I'm facing the error "ValueError: as_list() is not defined on an unknown TensorShape.".
Follows the most bare bone code I could build ...
2
votes
1
answer
70
views
How to handle loss function with sparse output
I'm trying to create a ML model in TensorFlow that takes in a tensor with shape (128,128,12) and outputs a tensor with shape (128,128,3), where the output dimensions mean (x, y, sensor_number).
With ...
1
vote
1
answer
55
views
Why is my CNN model overfitting even with dropout and data augmentation? [closed]
I'm working on a CNN-based image classification task using Keras and TensorFlow. My dataset contains around 5,000 labeled images across 5 classes. I'm applying data augmentation and using dropout ...
0
votes
1
answer
30
views
how apply keras tuner with fine tuning?
I'm doing fine tuning starting from mobilnet so in a first phase I train only the classifier then the top layers and in a second moment I unfreeze some layers of the pre-trained network and continue ...
1
vote
1
answer
36
views
Quantizing tfjs model to float16 ValueError: Missing output_path argument
I'm trying to quantize a tfjs model to float16 from the standard float32. This is how I loaded my .keras model and converted it to tfjs. This part works.
keras_input_file_path = '/content/cnn_model....
0
votes
1
answer
46
views
Keras AUC metric breaking on a multi-class problem
I'm attempting to train a multi-class image classification model based on standardised 128x128 images. When I use "accuracy" alone as a metric, I have no issues. When I introduce AUC, I can'...