All Questions
Tagged with tensorflow python
47,797 questions
-1
votes
0
answers
23
views
MobileNet dynamic range quantization breaks model accuracy
I've been working on building a binary fire detection model that will run on ESP32s based on TF keras MobileNet v2 and transfer trained from ImageNet weights. After training the model and inferencing ...
0
votes
0
answers
22
views
Tensorflow - Trained model always wrong, on image it trained on
I'm currently learning Tensorflow.
And the best way to do so is to get hands dirty right.
As an exercise Im training a model with some pokemon data found on kaggle.
After the model has been created ...
0
votes
0
answers
30
views
Trouble loading tensorflow when running cloned repo
So, I'm trying to get the code from this repo https://github.com/amin20/GBM_WSSM working but I'm running into a persistent error.
Using TensorFlow backend.
Traceback (most recent call last):
File &...
0
votes
0
answers
38
views
model.predict hangs in celery/uwsgi
import numpy as np
import tensorflow as tf
import tensorflow_hub as hub
from apps.common.utils.error_handling import suppress_callable_to_sentry
from django.conf import settings
from threading import ...
1
vote
0
answers
68
views
my clasification A.I. model cant surpass a certain validation precision threshold
I've recently getting started with A.I. and for a project i wanted to create a model that can classify what kind of disease you have based on a chest x-ray, After writing the model and using the ...
0
votes
0
answers
29
views
How to properly save and load model of 3D-CNN from tensorflow tutorial
I have been training a 3D-CNN model for video classification using my own dataset and following the step by step and their code in tensorflow tutorial
class Conv2Plus1D(keras.layers.Layer):
def ...
1
vote
1
answer
23
views
How to reshape a tensor from [B, L, C] to [B, L * C] in tensorflow 1.x?
I have a tensor whose shape is [B, L, C]. I need to reshape it to [B, L * C]. I've tried this:
shape = tf.shape(x)
item_vec = tf.reshape(x, [shape[0], shape[1] * shape[2]])
But while I put it into a ...
0
votes
0
answers
27
views
ValueError: Only images with two spatial dimensions are supported. If using with color/multichannel images, specify `channel_axis`
def hog_transform(x):
fd = hog(x.numpy() * 255,
orientations=self.orientations,
pixels_per_cell=self.pixels_per_cell,
...
-1
votes
0
answers
27
views
Why the loss values of class type and function type of tensorflow models are different?
I made two different type models with tensorflow, one is Class type, the other is function type for learning Fashion MNIST. I think the structure of two models is exactly same, but the results are not....
-2
votes
1
answer
39
views
Why is my TensorFlow CNN OCR model outputting incorrect characters for Persian license plates? [closed]
I’m building a FastAPI web API to detect Persian car license plates using YOLOv8 and extract their text with a custom TensorFlow CNN OCR model. YOLOv8 correctly detects the plate’s bounding box, but ...
2
votes
1
answer
51
views
Cannot see all `Dense` layer info from `search_space_summary()` when using `RandomSearch Tuner` in Keras-Tuner?
I am trying to use keras-tuner to tune hyperparameters, like
!pip install keras-tuner --upgrade
import keras_tuner as kt
from tensorflow.keras.models import Sequential
from tensorflow.keras.layers ...
0
votes
1
answer
57
views
Why do model.evaluate() vs. manual loss computation with model.predict() in tf.keras do not add up?
I use keras and tensorflow to train a 'simple' Multilayer Perceptron (MLP) for a regression task, where I use the mean-squared error (MSE) as loss-function. I denote my training data as x_train, ...
0
votes
0
answers
105
views
Getting ValueError: Unexpected object from deserialization, expected a layer or operation, got a <class '__main__.L1Dist'>
here is the code from the Distance layer part because site is not allowing me to upload full code.
embedding = make_embedding()
distance layer
class L1Dist(Layer):
def __init__(self, **kwargs):
...
1
vote
1
answer
62
views
Regression error with Python tensorflow keras
could someone please help me to fix the following error :
[AttributeError: 'super' object has no attribute 'sklearn_tags']
based on my code :
from tensorflow import keras
from scikeras.wrappers ...
0
votes
0
answers
89
views
My testing loss isn't improving while I'm using same train and test data
I'm trying to fine tune a model for a segmentation task. To see if everything is working properly I'm trying to make my model overfit on a single image split in 16 different patches.
So in my code, I ...