82,188 questions
Best practices
0
votes
0
replies
8
views
Tensorflow Keras Autoencoder Masking Features not Timesteps
I have Conv1D autoencoder network, and i a have unreliable data source of a data stream, speaking i receive different event patterns at fixed interval of e.g. 2 seconds. Sometimes I have 4 different ...
1
vote
0
answers
24
views
using Google LiteRT from a Tensorflow Lite model
data = tf.keras.utils.image_dataset_from_directory('snails', image_size=(256,256), shuffle=True)
class_names = data.class_names
num_classes = len(class_names)
print("Classes:", class_names)
...
-5
votes
0
answers
68
views
Floating point exception (core dumped) error when training the model using mult-gpu
I am trying to train a 3D medical image segmentation model using Tensorflow and Keras :
Model.py:
import time
import logging
import os
import datetime
os.environ["TF_GPU_ALLOCATOR"] = &...
2
votes
0
answers
55
views
Pixel values differ between Python and Android Kotlin when computing MobileNetV3 embeddings, causing mismatched results
I’m having an issue with MobileNetV3 image embeddings:
I compute embeddings for original images in Python and store them in a database.
On Android Kotlin, when a user uploads an image, I also compute ...
0
votes
1
answer
77
views
Apply Quantization on a CNN
I want to apply a quantization function to a deep CNN. This CNN is used for an image classification(in 4 classes) task, and my data consists of 224×224 images. When I run this code, I get an error. ...
-1
votes
0
answers
42
views
Low accuracy in sleep stage classification model — need help improving performance
I’m working on a sleep stage classification model using deep learning, but I’m getting much lower accuracy than expected. I would appreciate help reviewing my code and suggestions for improving the ...
0
votes
0
answers
40
views
Flutter + LiteRT 1.4.1 – FlexSplitV / Flex delegate still not applied even after adding tensorflow-lite-select-tf-ops dependency
I’m building a Flutter Android app that performs real-time people counting from an RTSP camera stream (IP camera) using a YOLOv8n model exported to TensorFlow Lite.
Model details
- YOLOv8n trained in ...
-1
votes
1
answer
47
views
Get image paths from tfds food101
I'm working on food101 tensorflow dataset and want to know the most wrong predictions of my efficientnet model, for that purpose I'd need to get image paths of test data, but I don't know how I can ...
0
votes
0
answers
52
views
AttributeError: module 'tensorflow' has no attribute 'saved_model' when importing gemma3 from ai_edge_torch in Google Colab
I'm trying to use Google's ai-edge-torch library to work with the Gemma 3 model in a Google Colab environment. However, I encounter the following error during import:
import torch
from ai_edge_torch....
-1
votes
0
answers
46
views
Cannot allocate memory in static TLS block when import albumentations and tensorflow [duplicate]
I using a python 3.10 virtual environment, and try to import tensorflow as tf and import albumentations as A. And i faced a error on cannot allocate memory in static TLS block. Anyone know what is the ...
0
votes
0
answers
37
views
How To Work With Windowsize Inputs That Don't Match The Pooling?
Let's take a minimal 1d cnn autoencoder model as an example:
def cnn_session_encoder(inputs):
x = layers.Conv1D(32, 3, activation="relu", padding="same")(x)
x = layers....
1
vote
1
answer
67
views
ValueError: Can't convert non-rectangular Python sequence to Tensor in text-classification problem
I am building a text classification system which requires a large preprocessing and training script. The script reads variable-length token sequences and attempts to build a tf.data.Dataset using ...
0
votes
1
answer
68
views
EfficientNet-B7 Shape mismatch
working on project of image classification using efficientnet-B7 what is wrong in this code? why is the error showing when i run this line of code? the error state
Shape mismatch in layer #1 (named ...
3
votes
1
answer
58
views
How to fix ValueError: Only instances of keras.Layer can be added to a Sequential model when adding tensorflow_hub.KerasLayer?
I am learning TensorFlow and transfer learning, and I am trying to add a TensorFlow Hub feature extractor to a Keras Sequential model. But I get this error:
ValueError: Only instances of keras.Layer ...
0
votes
0
answers
54
views
Why is the wall time from the full trace different from the timer in the compute function?
In my custom operator(runs on cpu), I use butil::Timer to measure the time taken as shown below:
void Compute(OpKernelContext* ctx) override {
butil::Timer total_timer;
total_timer.start();
...