id
stringlengths
7
11
source
stringclasses
1 value
category
stringclasses
11 values
title
stringlengths
15
214
text
stringlengths
70
30.5k
url
stringlengths
57
160
tags
stringlengths
3
113
created_at
int64
1.22B
1.79B
se_75584504
stackoverflow
MACHINE_LEARNING
Keras: What does Conv2DTranspose exactly do?
Keras: What does Conv2DTranspose exactly do? I'm a beginner to Keras/Tensorflow. I think I have a basic understanding what Conv2DTranspose generally does. In detail I struggle. Therefore I wrote an extremly simple example. This example shall show, how the values in a source-matrix, the kernel and a target-matrix are ...
https://stackoverflow.com/questions/75584504/keras-what-does-conv2dtranspose-exactly-do
tensorflow, keras
1,677,524,183
se_79849182
stackoverflow
MACHINE_LEARNING
Pixel values differ between Python and Android Kotlin when computing MobileNetV3 embeddings, causing mismatched results
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...
https://stackoverflow.com/questions/79849182/pixel-values-differ-between-python-and-android-kotlin-when-computing-mobilenetv3
python, android, kotlin, tensorflow, vector-search
1,765,959,131
se_79444052
stackoverflow
MACHINE_LEARNING
Python TensorFlow model does not work in Java TensorFlow
Python TensorFlow model does not work in Java TensorFlow I am training a model in Python using TensorFlow and Keras, and attempting to load it in a Java application. However, I am encountering an error when trying to perform inference. Java Code public static void main(String[] args) { final String MODEL_PATH ...
https://stackoverflow.com/questions/79444052/python-tensorflow-model-does-not-work-in-java-tensorflow
python, java, tensorflow
1,739,744,948
se_58867635
stackoverflow
MACHINE_LEARNING
Build tensorflow dataset with datasource as database
Build tensorflow dataset with datasource as database I have to create a data input pipeline with tensorflow tf.data. The datasource is a mongodb and sql server. How can I create a tf.data object from a database. All the articles I see have .tfrecords or .csv as datasource for tensorflow. Thank you. Appreciate your i...
https://stackoverflow.com/questions/58867635/build-tensorflow-dataset-with-datasource-as-database
sql, mongodb, tensorflow
1,573,771,369
se_79849841
stackoverflow
MACHINE_LEARNING
using Google LiteRT from a Tensorflow Lite model
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) data = data.map(lambda x, y: (tf.cast(x, tf.float32) / 255.0, y)) data = data.sh...
https://stackoverflow.com/questions/79849841/using-google-litert-from-a-tensorflow-lite-model
tensorflow, tensorflow-lite, image-classification
1,766,005,834
se_75358846
stackoverflow
MACHINE_LEARNING
can I use .h5 file in Django project?
can I use .h5 file in Django project? I'm making AI web page using Django and tensor flow. and I wonder how I add .h5 file in Django project. writing whole code in views.py file but I want to use pre-trained model not online learning in webpage.
https://stackoverflow.com/questions/75358846/can-i-use-h5-file-in-django-project
python, django, tensorflow, artificial-intelligence
1,675,671,663
se_47828095
stackoverflow
MACHINE_LEARNING
How to save a Tensorflow model ( which doesnt contain any variable ) to port it in OpenCV
How to save a Tensorflow model ( which doesnt contain any variable ) to port it in OpenCV I wanted to know what is the correct way to save a tensorflow model that I have trained in python so that I can import it in OpenCV using the dnn module of opencv. This is my Tensorflow graph X = tf.placeholder(tf.float32, [None...
https://stackoverflow.com/questions/47828095/how-to-save-a-tensorflow-model-which-doesnt-contain-any-variable-to-port-it
python, tensorflow, opencv, neural-network
1,513,324,967
se_79841874
stackoverflow
MACHINE_LEARNING
Apply Quantization on a CNN
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. How can I solve this issue? I want to apply compression technique to reduce the model size an...
https://stackoverflow.com/questions/79841874/apply-quantization-on-a-cnn
tensorflow, deep-learning, compression, quantization, quantization-aware-training
1,765,280,166
se_60267745
stackoverflow
MACHINE_LEARNING
How do I install tensorflow_text?
How do I install tensorflow_text? I'm trying to reproduce the notebook on Google Multilingual Universal Encoder. However by downloading the necessary libraries as tensorflow_text: %%capture #@title Setup Environment # Install the latest Tensorflow version. !pip3 install tensorflow_text or !python -m pip install te...
https://stackoverflow.com/questions/60267745/how-do-i-install-tensorflow-text
python, python-3.x, tensorflow, windows-10
1,581,960,963
se_70573735
stackoverflow
MACHINE_LEARNING
Printing model summaries for rllib models
Printing model summaries for rllib models I have not seen anything in the rllib documentation that would allow me to print a quick summary of the model like print(model.summary()) in keras. I tried using tf-slim and variables = tf.compat.v1.model_variables() slim.model_analyzer.analyze_vars(variables, print_info=True)...
https://stackoverflow.com/questions/70573735/printing-model-summaries-for-rllib-models
python, tensorflow, rllib
1,641,266,155
se_50953575
stackoverflow
MACHINE_LEARNING
Can you activate multiple Python virtual environments at once?
Can you activate multiple Python virtual environments at once? I want to use tensorflow through a virtual environment. However, the Python script I want to run requires me to use a separate virtual environment that does not include tensorflow. Is it possible to activate these simultaneously? If not, can I merge the t...
https://stackoverflow.com/questions/50953575/can-you-activate-multiple-python-virtual-environments-at-once
python, tensorflow, virtual-environment
1,529,514,365
se_70244275
stackoverflow
MACHINE_LEARNING
Transfer learning or fine-tuning
Transfer learning or fine-tuning I try to understand the concept of transfer learning for the Stanford cars196 dataset. In Kaggle, I see a lot of code similar to that. My question is what kind of method is here used, because if I got it right for transfer learning, you first build the base_model, train it and then bui...
https://stackoverflow.com/questions/70244275/transfer-learning-or-fine-tuning
python, tensorflow, keras, conv-neural-network, transfer-learning
1,638,787,708
se_58419436
stackoverflow
MACHINE_LEARNING
Extracting attention weights of each token at each layer of transformer in python
Extracting attention weights of each token at each layer of transformer in python I am doing some NLP and I am interested in extracting attention weights of individual test token at each layer of transformer via Python (PyTorch, TensorFlow, etc.) Is coding up a Transformer (any transformers like Transformer-XL, OpenA...
https://stackoverflow.com/questions/58419436/extracting-attention-weights-of-each-token-at-each-layer-of-transformer-in-pytho
tensorflow, keras, deep-learning, nlp, pytorch
1,571,249,871
se_40270183
stackoverflow
MACHINE_LEARNING
ImportError: dlopen: cannot load any more object with static TLS
ImportError: dlopen: cannot load any more object with static TLS I'm getting an ImportError if OpenCV (cv2) is imported after the tensorflow exporter. ubuntu@ip-172-31-2-144:~/Downloads/opencv-2.4.13/release$ python Python 2.7.6 (default, Jun 22 2015, 17:58:13) [GCC 4.8.2] on linux2 Type "help", "copyright", "credi...
https://stackoverflow.com/questions/40270183/importerror-dlopen-cannot-load-any-more-object-with-static-tls
tensorflow, opencv, importerror
1,477,508,420
se_79568930
stackoverflow
MACHINE_LEARNING
Flutter Tensorflow Lite Flex delegate issue
Flutter Tensorflow Lite Flex delegate issue I am using flutter and a tflite model to make an app, but no matter what I cannot get the model to run. This is the error I am getting: I/tflite (14702): Initialized TensorFlow Lite runtime. E/tflite (14702): Select TensorFlow op(s), included in the given model, is(are) no...
https://stackoverflow.com/questions/79568930/flutter-tensorflow-lite-flex-delegate-issue
flutter, tensorflow
1,744,377,545
se_46928328
stackoverflow
MACHINE_LEARNING
Why training loss is increased at the beginning of each epoch?
Why training loss is increased at the beginning of each epoch? I'm training a linear regression model. I use tf.contrib.data to prepare the dataset, shuffle it and serve it in batches: dataset = tf.contrib.data.TFRecordDataset(filename) dataset = dataset.map( _parse_function, num_threads=16, output_buffer_s...
https://stackoverflow.com/questions/46928328/why-training-loss-is-increased-at-the-beginning-of-each-epoch
machine-learning, tensorflow, tensorflow-datasets
1,508,922,506
se_58606029
stackoverflow
MACHINE_LEARNING
Unable to open file (truncated file: eof = 7340032, sblock->base_addr = 0, stored_eof = 126651688)
Unable to open file (truncated file: eof = 7340032, sblock->base_addr = 0, stored_eof = 126651688) I trained my model in Google colab and then saved it using model1.save('thebestonesofar57block5.h5'). After that I downloaded the file to my windows machine. After uploading it to a new google colab session, I'm getti...
https://stackoverflow.com/questions/58606029/unable-to-open-file-truncated-file-eof-7340032-sblock-base-addr-0-store
python, tensorflow, keras, google-colaboratory, hdf5
1,572,346,353
se_44021214
stackoverflow
MACHINE_LEARNING
How can I use NumPy functions on a Keras tensor in the loss function?
How can I use NumPy functions on a Keras tensor in the loss function? I'm using Keras with a TensorFlow backend to build and run a neural network. I need to use a NumPy function on my output tensor in the loss function. More specifically, my loss function involves finding nearest neighbors, and I need to use the Keras...
https://stackoverflow.com/questions/44021214/how-can-i-use-numpy-functions-on-a-keras-tensor-in-the-loss-function
python, numpy, tensorflow, keras, deep-learning
1,495,014,275
se_79536745
stackoverflow
MACHINE_LEARNING
Azure Custom Vision vs ONNX/TFLite exported models - why is local inference different?
Azure Custom Vision vs ONNX/TFLite exported models - why is local inference different? I trained a custom object detection model using Azure Custom Vision in images about strawberries in a line production, and exported it in two formats for local inference: ONNX (model.onnx) TensorFlow Lite (model.tflite) However, ...
https://stackoverflow.com/questions/79536745/azure-custom-vision-vs-onnx-tflite-exported-models-why-is-local-inference-diff
python-3.x, azure, tensorflow, yolov8, microsoft-custom-vision
1,743,008,668
se_75566837
stackoverflow
MACHINE_LEARNING
Can I install cuda if I have Intel Graphics?
Can I install cuda if I have Intel Graphics? I want to use NVIDIA's CUDA-Toolkit for a project, but I have an Intel(R) Iris Xe Graphics (Windows 11 Pro). On installing Nvidia Graphics GeForce Game Ready, I am getting the following error This Nvidia graphics driver is not compatible with this version of Windows. This ...
https://stackoverflow.com/questions/75566837/can-i-install-cuda-if-i-have-intel-graphics
tensorflow, cuda, gpu, nvidia, intel
1,677,342,786
se_79836456
stackoverflow
MACHINE_LEARNING
Get image paths from tfds food101
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 get the paths as the dataset is from tfds, not my own data (or downloaded in my compute...
https://stackoverflow.com/questions/79836456/get-image-paths-from-tfds-food101
tensorflow, deep-learning, tensorflow-datasets, image-classification
1,764,727,484
se_79475774
stackoverflow
MACHINE_LEARNING
Convert text to 32-dimensional vector using albert-v2 weights
Convert text to 32-dimensional vector using albert-v2 weights Inconsistency problem of text-to-32-dimensional vector data: Use huggingface to download Albert-v2 weights to the local computer and read the text for inference. Why is the vector of the same text different when batch_size is set to different values ​​when ...
https://stackoverflow.com/questions/79475774/convert-text-to-32-dimensional-vector-using-albert-v2-weights
python, tensorflow
1,740,751,288
se_66693260
stackoverflow
MACHINE_LEARNING
How many layers does my neural network have and how do I add more?
How many layers does my neural network have and how do I add more? from tensorflow.keras.models import Sequential from tensorflow.keras.layers import Dense, Conv2D, Dropout, Flatten, MaxPooling2D model = Sequential() model.add(Conv2D(28, kernel_size=(3,3), input_shape = input_shape_of_individual_samples)) model.add(M...
https://stackoverflow.com/questions/66693260/how-many-layers-does-my-neural-network-have-and-how-do-i-add-more
python, tensorflow, keras, neural-network
1,616,078,151
se_71044014
stackoverflow
MACHINE_LEARNING
Recurrent Neural Networks for Drawing Classification tutorial code doesn't run on tensorflow 2
Recurrent Neural Networks for Drawing Classification tutorial code doesn't run on tensorflow 2 I'm a beginner in deep leaerning and Tensorflow. I tried to run the tutorial code for Recurrent Neural Networks for Drawing Classification on my computer following the directions written there. But the provided tutorial ...
https://stackoverflow.com/questions/71044014/recurrent-neural-networks-for-drawing-classification-tutorial-code-doesnt-run-o
python, tensorflow, deep-learning, neural-network
1,644,380,936
se_79834011
stackoverflow
MACHINE_LEARNING
How To Work With Windowsize Inputs That Don't Match The Pooling?
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.BatchNormalization()(x) encoded = layers.MaxPooling1D(2, padding="same...
https://stackoverflow.com/questions/79834011/how-to-work-with-windowsize-inputs-that-dont-match-the-pooling
tensorflow, conv-neural-network
1,764,517,738
se_77707619
stackoverflow
MACHINE_LEARNING
Unable to install Tensorflow on Anaconda Environment
Unable to install Tensorflow on Anaconda Environment This is the error I get when I try to install TensorFlow on Anaconda environment I am using python 3.11.5 with this env. (ai-env) C:\Users\ahmet>conda install -c conda-forge tensorflow Channels: - conda-forge - defaults Platform: win-64 Collecting package metadata...
https://stackoverflow.com/questions/77707619/unable-to-install-tensorflow-on-anaconda-environment
python, windows, tensorflow, anaconda, conda
1,703,334,270
se_75583410
stackoverflow
MACHINE_LEARNING
module.save() Error 'TypeError: this __dict__ descriptor does not support '_DictWrapper' objects'
module.save() Error 'TypeError: this __dict__ descriptor does not support '_DictWrapper' objects' I'm following a tutorial on Youtube for image classification with machine learning. I keep getting the error as shown in the title from trying to save a deep learning module with tensorflow. I'm using PyCh...
https://stackoverflow.com/questions/75583410/module-save-error-typeerror-this-dict-descriptor-does-not-support-dict
python, tensorflow, deep-learning, pycharm
1,677,517,260
se_38009682
stackoverflow
MACHINE_LEARNING
How to tell if tensorflow is using gpu acceleration from inside python shell?
How to tell if tensorflow is using gpu acceleration from inside python shell? I have installed tensorflow in my ubuntu 16.04 using the second answer here with ubuntu's builtin apt cuda installation. Now my question is how can I test if tensorflow is really using gpu? I have a gtx 960m gpu. When I import tensorflow th...
https://stackoverflow.com/questions/38009682/how-to-tell-if-tensorflow-is-using-gpu-acceleration-from-inside-python-shell
python, tensorflow, ubuntu, gpu
1,466,759,663
se_79829658
stackoverflow
MACHINE_LEARNING
ValueError: Can't convert non-rectangular Python sequence to Tensor in text-classification problem
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 from_tensor_slices. ...
https://stackoverflow.com/questions/79829658/valueerror-cant-convert-non-rectangular-python-sequence-to-tensor-in-text-clas
tensorflow, keras, text-classification
1,764,071,513
se_75620498
stackoverflow
MACHINE_LEARNING
No module named 'tensorflow.python'. Where to look for this module?
No module named 'tensorflow.python'. Where to look for this module? debugger: The error occurs whenever I try to use the module in PyCharm. Installation of the module directly through cmd does not throw any exceptions. Installation of the module in PyCharm gives the following error: Could not install packages ...
https://stackoverflow.com/questions/75620498/no-module-named-tensorflow-python-where-to-look-for-this-module
tensorflow, pycharm, windows-10, oserror
1,677,788,913
se_79828541
stackoverflow
MACHINE_LEARNING
EfficientNet-B7 Shape mismatch
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 stem_conv)for weight stem_conv/kernel. Weight expects shape (3, 3, 1, 64). Received saved...
https://stackoverflow.com/questions/79828541/efficientnet-b7-shape-mismatch
tensorflow, machine-learning
1,763,981,726
se_79325929
stackoverflow
MACHINE_LEARNING
TFLite from Google Auto ML Edge Object Detection crash when Invoke
TFLite from Google Auto ML Edge Object Detection crash when Invoke I've been trying to use Model TFLite obtained from Google Auto ML Object Detection for Edge. My script look like this: import pandas as pd import tensorflow as tf import numpy as np model_path = "model.tflite" import tensorflow as tf interpreter = ...
https://stackoverflow.com/questions/79325929/tflite-from-google-auto-ml-edge-object-detection-crash-when-invoke
python, tensorflow, machine-learning, google-cloud-platform, tflite
1,735,894,119
se_46772685
stackoverflow
MACHINE_LEARNING
How to accumulate gradients in tensorflow?
How to accumulate gradients in tensorflow? I have a question similar to this one. Because I have limited resources and I work with a deep model (VGG-16) - used to train a triplet network - I want to accumulate gradients for 128 batches of size one training example, and then propagate the error and update the weights....
https://stackoverflow.com/questions/46772685/how-to-accumulate-gradients-in-tensorflow
python, tensorflow, conv-neural-network, gradient-descent
1,508,163,999
se_68242454
stackoverflow
MACHINE_LEARNING
Can Yolo-V3 trained model be converted to TensorFlow model?
Can Yolo-V3 trained model be converted to TensorFlow model? I have trained my model of doors in yolo-v3 but now I need it in TensorFlow-Lite. But, I am facing a problem, that is, if I want to train my model for tensorflow, I need annotation file in ".csv" or ".xml" but the ones I have are "*.txt". I did found a softwa...
https://stackoverflow.com/questions/68242454/can-yolo-v3-trained-model-be-converted-to-tensorflow-model
python, tensorflow, machine-learning, computer-vision, yolo
1,625,382,251
se_70096286
stackoverflow
MACHINE_LEARNING
Cannot convert between a TensorFlowLite tensor with type FLOAT32 and a Java object
Cannot convert between a TensorFlowLite tensor with type FLOAT32 and a Java object I am trying to build a recommendation system using TFlite on Android . I have created the model successfully and have also run inference on the same , which is running pretty good. But the problem lies within trying to integrate the app...
https://stackoverflow.com/questions/70096286/cannot-convert-between-a-tensorflowlite-tensor-with-type-float32-and-a-java-obje
android, tensorflow, tensorflow2.0, tensorflow-lite
1,637,757,783
se_79823958
stackoverflow
MACHINE_LEARNING
TPU Initialization Fails (OpKernel Missing) Despite Active TPU Runtime in Kaggle
TPU Initialization Fails (OpKernel Missing) Despite Active TPU Runtime in Kaggle I am facing a persistent issue when trying to initialize the TPU in my notebook. I have already confirmed that: My account is Verified. The Notebook Accelerator is set to TPU. My TPU quota is currently available. enter image descript...
https://stackoverflow.com/questions/79823958/tpu-initialization-fails-opkernel-missing-despite-active-tpu-runtime-in-kaggle
python, tensorflow, kaggle, tpu
1,763,510,042
se_57124972
stackoverflow
MACHINE_LEARNING
How to fix 'TypeError: cannot convert dictionary update sequence element #0 to a sequence'
How to fix 'TypeError: cannot convert dictionary update sequence element #0 to a sequence' I'm looking at Google's free machine learning crash course and am trying to make a predicting model based on the first part of their course. However, in the input function, where there's a dictionary, I keep getting this...
https://stackoverflow.com/questions/57124972/how-to-fix-typeerror-cannot-convert-dictionary-update-sequence-element-0-to-a
python, pandas, dictionary, tensorflow, regression
1,563,627,643
se_73132783
stackoverflow
MACHINE_LEARNING
Detect blur image using MLKit (TensorFlow)
Detect blur image using MLKit (TensorFlow) I am working on camera2 api and sometime getting blur images while capturing images from camera. I need to check if clicked image is blur or not, Using openCV increase the .apk size 3x times. I also check the solution posted on a SO thread Here but seems incomplete. Is it pos...
https://stackoverflow.com/questions/73132783/detect-blur-image-using-mlkit-tensorflow
android, tensorflow, android-camera2, firebase-mlkit, google-mlkit
1,658,900,715
se_64639583
stackoverflow
MACHINE_LEARNING
ValueError: An operation has 'None' for gradient. Please make sure that all of your ops have a gradient defined
ValueError: An operation has 'None' for gradient. Please make sure that all of your ops have a gradient defined I keep getting this error with the following code config_path = 'E:/chinese_roberta_wwm_large_ext_L-24_H-1024_A-16/bert_config.json' checkpoint_path = 'E:/chinese_roberta_wwm_large_ext_L-24_H-1024_A-...
https://stackoverflow.com/questions/64639583/valueerror-an-operation-has-none-for-gradient-please-make-sure-that-all-of-y
python, tensorflow, keras
1,604,289,245
se_66358374
stackoverflow
MACHINE_LEARNING
Conversion from tf.gradients() to tf.GradientTape() returns None
Conversion from tf.gradients() to tf.GradientTape() returns None I'm migrating some TF1 code to TF2. For full code, you may check here lines [155-176]. There is a line in TF1 that gets gradients given a loss (float value) and a (m, n) tensor Edit: the problem persists Note: the TF2 code should be compatible and should...
https://stackoverflow.com/questions/66358374/conversion-from-tf-gradients-to-tf-gradienttape-returns-none
python, tensorflow, migration, tensorflow2.x, tensorflow1.15
1,614,198,556
se_79825194
stackoverflow
MACHINE_LEARNING
How to fix ValueError: Only instances of keras.Layer can be added to a Sequential model when adding tensorflow_hub.KerasLayer?
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 kera...
https://stackoverflow.com/questions/79825194/how-to-fix-valueerror-only-instances-of-keras-layer-can-be-added-to-a-sequentia
python, tensorflow, keras, keras-layer, tensorflow-hub
1,763,622,749
se_79393814
stackoverflow
MACHINE_LEARNING
Tensorflow Skin Disease Multi-Class Classification using MobileNetV3 keeps resulting in low accuracy
Tensorflow Skin Disease Multi-Class Classification using MobileNetV3 keeps resulting in low accuracy So, I'm working on a school project wherein I'm making an app that can detect multiple skin diseases. I've already made the GUI for the app, all that's left is to train the model. As of now , I'm facing issues with tra...
https://stackoverflow.com/questions/79393814/tensorflow-skin-disease-multi-class-classification-using-mobilenetv3-keeps-resul
tensorflow, mobilenet
1,738,067,258
se_79661925
stackoverflow
MACHINE_LEARNING
Straight-Through estimation for vector quantization inside a recurrent neural network
Straight-Through estimation for vector quantization inside a recurrent neural network in my model, I use vector quantization (VQ) inside a recurrent neural network. The VQ is trained using straight-through estimation with that particular code being identical to [1]: input_shape = tf.shape(inputs) ...
https://stackoverflow.com/questions/79661925/straight-through-estimation-for-vector-quantization-inside-a-recurrent-neural-ne
tensorflow, quantization
1,749,642,369
se_79824217
stackoverflow
MACHINE_LEARNING
Why is the wall time from the full trace different from the timer in the compute function?
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(); { // compute body......
https://stackoverflow.com/questions/79824217/why-is-the-wall-time-from-the-full-trace-different-from-the-timer-in-the-compute
tensorflow, tensorflow2.0
1,763,541,358
se_79822908
stackoverflow
MACHINE_LEARNING
Compatibility between streamlit and protobuf
Compatibility between streamlit and protobuf I am unable to use the print(tf.version.VERSION) to check the tensorflow version. Reason being tensorflow looks for runtime_version in protobuf (from what I have learnt) and that is only supported in protobuf versions above 3.20. Upgrading it to higher version breaks the st...
https://stackoverflow.com/questions/79822908/compatibility-between-streamlit-and-protobuf
tensorflow, streamlit, protobuf-python
1,763,426,499
se_79820472
stackoverflow
MACHINE_LEARNING
PyInstaller - It does'nt generate an .exe file
PyInstaller - It does'nt generate an .exe file I'm using pyinstaller main.spec command. The main.spec file is the next: # -*- mode: python ; coding: utf-8 -*- a = Analysis( ['main.py', 'flujo.py', 'flujo_if.py', 'descarga_manual.py', 'descarga_manual_if.py', 'subida_lectura_manual.py', 'subida_lectura_manual...
https://stackoverflow.com/questions/79820472/pyinstaller-it-doesnt-generate-an-exe-file
python, tensorflow, pyinstaller
1,763,158,848
se_79822063
stackoverflow
MACHINE_LEARNING
Issue Replicating TF-Lite Conv2D Quantized Inference Output
Issue Replicating TF-Lite Conv2D Quantized Inference Output I am trying to reproduce the exact layer-wise output of a quantized EfficientNet model (TFLite model, TensorFlow 2.17) by re-implementing Conv2D, DepthwiseConv2D, FullyConnected, Add, Mul, Sub and Mean operations. All layers match except Conv2D, where I consi...
https://stackoverflow.com/questions/79822063/issue-replicating-tf-lite-conv2d-quantized-inference-output
python, tensorflow, tensorflow2.0, tensorflow-lite, quantization
1,763,369,914
se_45478716
stackoverflow
MACHINE_LEARNING
Run TensorFlow remotely
Run TensorFlow remotely I am new to TensorFlow, Linux, and ML. I am trying to use a GPU in another system in my lab for training my model. I have connected to the system using SSH. Now what I am stuck on is how should I write the python code? One thing I can do is run python in the terminal window where I can see the...
https://stackoverflow.com/questions/45478716/run-tensorflow-remotely
python, linux, ssh, machine-learning, tensorflow
1,501,748,633
se_63318110
stackoverflow
MACHINE_LEARNING
How to use pyinstaller for keras?
How to use pyinstaller for keras? I have written just one line in a python code to import keras and then I want to build an executable of this using pyinstaller. I ran below command to generate executable pyinstaller --onefile test.py and I am getting below error while running generated executable. Using TensorF...
https://stackoverflow.com/questions/63318110/how-to-use-pyinstaller-for-keras
python, tensorflow, keras, pyinstaller
1,596,906,411
se_75692974
stackoverflow
MACHINE_LEARNING
Detect dark vs well-lit image using existing AI model
Detect dark vs well-lit image using existing AI model I am using the below code to detect dark vs well-lit images but it is not giving accurate results and is giving very long floating values like .00000000123 etc. #!/usr/bin/env python3 import cv2 import tensorflow as tf import numpy as np import os path = '/home/.....
https://stackoverflow.com/questions/75692974/detect-dark-vs-well-lit-image-using-existing-ai-model
python, tensorflow, artificial-intelligence, image-classification
1,678,430,672
se_79464030
stackoverflow
MACHINE_LEARNING
None Gradients for a model with 2 outputs
None Gradients for a model with 2 outputs I have a model that has a GRU implementation inside and process audio samples. In each forward path I process a single sample of an audio file. To imitate the GRU behavior correctly, I have returned the output of my GRU implementation in each forward pass and pass that data al...
https://stackoverflow.com/questions/79464030/none-gradients-for-a-model-with-2-outputs
tensorflow, deep-learning, audio-processing, gradienttape, gru
1,740,410,150
se_79536738
stackoverflow
MACHINE_LEARNING
Trying to add tensorflow in AWS GLUE Notebook
Trying to add tensorflow in AWS GLUE Notebook The notebook that im using uses python 3.11 as executable but when i use: !pip install tensorflow or %pip install tensorFlow it keeps installing it to the 3.9 version of python which is the cloud shell version of python. I did refer to the documentation but it confused m...
https://stackoverflow.com/questions/79536738/trying-to-add-tensorflow-in-aws-glue-notebook
python, amazon-web-services, tensorflow, aws-glue
1,743,008,503
se_66207609
stackoverflow
MACHINE_LEARNING
NotImplementedError: Cannot convert a symbolic Tensor (lstm_2/strided_slice:0) to a numpy array. T
NotImplementedError: Cannot convert a symbolic Tensor (lstm_2/strided_slice:0) to a numpy array. T tensorflow version 2.3.1 numpy version 1.20 below the code # define model model = Sequential() model.add(LSTM(50, activation='relu', input_shape=(n_steps, n_features))) model.add(Dense(1)) model.compile(optimizer='adam',...
https://stackoverflow.com/questions/66207609/notimplementederror-cannot-convert-a-symbolic-tensor-lstm-2-strided-slice0-t
python, numpy, tensorflow
1,613,390,142
se_79817250
stackoverflow
MACHINE_LEARNING
Transfer Learning: How do I only save the parameter I trained to save disk space?
Transfer Learning: How do I only save the parameter I trained to save disk space? So, I am having a transfer learning project using VGG16, however as we all know its model size is over 500MB. I somply don't have enough disk space to save more than 200 instance of said model, however Tensorflow would always save every ...
https://stackoverflow.com/questions/79817250/transfer-learning-how-do-i-only-save-the-parameter-i-trained-to-save-disk-space
tensorflow, diskspace, transfer-learning
1,762,908,130
se_79807844
stackoverflow
MACHINE_LEARNING
Will tf.keras.Sequential containing multiple custom layers be correctly fully serializable and deserializable in my case?
Will tf.keras.Sequential containing multiple custom layers be correctly fully serializable and deserializable in my case? I am implementing a U-Net variant in TensorFlow/Keras with custom layers. In one of my layers custom layers UPDoubleConv, I have a Sequential self.blocks containing a repeated pattern of UpSampling...
https://stackoverflow.com/questions/79807844/will-tf-keras-sequential-containing-multiple-custom-layers-be-correctly-fully-se
python, tensorflow, keras, deep-learning, tf.keras
1,762,171,259
se_79806989
stackoverflow
MACHINE_LEARNING
Implementing a LoRA wrapper for Conv2D in Tensorflow
Implementing a LoRA wrapper for Conv2D in Tensorflow I have recently been trying to port a LoRA for CNN method originally implemented in PyTorch to TensorFlow, but my implementation did not work well, and I require assistance in making it work. My code can be found here (it is relatively extensive so I put it in a gis...
https://stackoverflow.com/questions/79806989/implementing-a-lora-wrapper-for-conv2d-in-tensorflow
python, tensorflow, keras, fine-tuning
1,762,068,581
se_79811826
stackoverflow
MACHINE_LEARNING
Unable to import_model .h5 in an attemp to try classification because of "BatchNormalization could not be deserialized properly"
Unable to import_model .h5 in an attemp to try classification because of "BatchNormalization could not be deserialized properly" I've got a very small python script using a Model.h5 which should be loaded in order to classify some pictures. Here's my python script : import tensorflow as tf from os import wal...
https://stackoverflow.com/questions/79811826/unable-to-import-model-h5-in-an-attemp-to-try-classification-because-of-batchn
python, python-3.x, tensorflow, keras
1,762,467,918
se_79809272
stackoverflow
MACHINE_LEARNING
Is using TRT in Tensorflow 2.18+ possible?
Is using TRT in Tensorflow 2.18+ possible? I am aware that TensorFlow has announced that they will no longer support TRT. A while back the announced "Starting with TensorFlow 2.18, support for TensorRT will be dropped. TensorFlow 2.17 will be the last version to include it." I've seen other forums suggesting that it i...
https://stackoverflow.com/questions/79809272/is-using-trt-in-tensorflow-2-18-possible
tensorflow, onnx, tensorrt, tf2onnx, tooling-recommendation
1,762,280,921
se_79811342
stackoverflow
MACHINE_LEARNING
Tensor Flow -No attribute Contribute
Tensor Flow -No attribute Contribute I am trying to duplicate the code found here which says tested with TensorFlow 1.6. I am using TF version 2.20.0 and really don't want to downgrade to 1.6 so I tried: import tensorflow.compat.v1 as tf which solved a few problems. However, I am stuck here: lstm_cells = [tf.Contrib...
https://stackoverflow.com/questions/79811342/tensor-flow-no-attribute-contribute
python, tensorflow, keras
1,762,436,682
se_38241410
stackoverflow
MACHINE_LEARNING
Remember LSTM state for next batch (stateful LSTM)
Remember LSTM state for next batch (stateful LSTM) Given a trained LSTM model, I want to perform inference for single timesteps, i.e. seq_length = 1 in the example below. After each timestep the internal LSTM (memory and hidden) states need to be remembered for the next 'batch'. For the very beginning of the inference...
https://stackoverflow.com/questions/38241410/remember-lstm-state-for-next-batch-stateful-lstm
python, tensorflow, machine-learning, lstm, recurrent-neural-network
1,467,882,160
se_58069629
stackoverflow
MACHINE_LEARNING
How does the LSTM know number of time steps and features in an Conv1D-LSTM network?
How does the LSTM know number of time steps and features in an Conv1D-LSTM network? I have a time series signal (n samples, each sample has 81 time steps and 3 features = n x 81 x 3). I am using an conv1D-LSTM network. n_timesteps = 81, n_features = 3. Normal LSTM specifies both n_timesteps and n_features, however wh...
https://stackoverflow.com/questions/58069629/how-does-the-lstm-know-number-of-time-steps-and-features-in-an-conv1d-lstm-netwo
tensorflow, machine-learning, keras, conv-neural-network, lstm
1,569,269,812
se_79808084
stackoverflow
MACHINE_LEARNING
How is cosine-similarity loss working together with a masking layer? Visualisation
How is cosine-similarity loss working together with a masking layer? Visualisation I have batches containing windows containing embeddings/vectors. To keep it simple let's not assume sentence embeddings (actual case) but 1hot encoded vectors. They are padded. So in the example below we can see a first full window and ...
https://stackoverflow.com/questions/79808084/how-is-cosine-similarity-loss-working-together-with-a-masking-layer-visualisati
tensorflow, cosine-similarity
1,762,187,315
se_79629817
stackoverflow
MACHINE_LEARNING
tensorFlow GPU slower than CPU, ptxas warning
tensorFlow GPU slower than CPU, ptxas warning I was trying to make a model testing series I ran into some horrible compilation behavior. The model runs about 5x faster on my CPU (Xeon W-2225, 4 core) than on my RTX 3060 (12GB) OR on my T1000 (4GB). During the run, during compilation I get hundreds of messages like .....
https://stackoverflow.com/questions/79629817/tensorflow-gpu-slower-than-cpu-ptxas-warning
tensorflow, keras, optimization, xla, ptxas
1,747,718,269
se_79809182
stackoverflow
MACHINE_LEARNING
multi output forcast shape prob. with keras.preprocessing.timeseries_dataset_from_array
multi output forcast shape prob. with keras.preprocessing.timeseries_dataset_from_array The model was fuctioinnal with only one output, now I try to use multi output forcasting one timestep, but got this error: Epoch 1/10 2025-11-04 16:20:09.341769: W tensorflow/core/framework/op_kernel.cc:1844] INVALID_ARGUMENT: requ...
https://stackoverflow.com/questions/79809182/multi-output-forcast-shape-prob-with-keras-preprocessing-timeseries-dataset-fro
python, tensorflow, keras, tf.keras, tensorflow-datasets
1,762,275,278
se_79693478
stackoverflow
MACHINE_LEARNING
ImportError: cannot import name 'Generator' from 'model' (unknown location) in GAN training script
ImportError: cannot import name 'Generator' from 'model' (unknown location) in GAN training script I'm running a GAN training pipeline in Google Colab. The preprocessing scripts run without any issues: GitHub repository !python run_preprocess.py --dataset custom --train_num 500 !python run_preprocess.p...
https://stackoverflow.com/questions/79693478/importerror-cannot-import-name-generator-from-model-unknown-location-in-g
tensorflow, google-colaboratory, importerror, generative-adversarial-network
1,751,928,022
se_79803878
stackoverflow
MACHINE_LEARNING
Tensorflow images guide not working in Google Colab
Tensorflow images guide not working in Google Colab I'm trying to run the first guide from Tensorflow in Google Colab. I import the dataset with import pathlib dataset_url = "https://storage.googleapis.com/download.tensorflow.org/example_images/flower_photos.tgz" archive = tf.keras.utils.get_file(origin=dataset_url, ...
https://stackoverflow.com/questions/79803878/tensorflow-images-guide-not-working-in-google-colab
python, tensorflow, google-colaboratory
1,761,746,710
se_71514834
stackoverflow
MACHINE_LEARNING
Unable to train CNN Model
Unable to train CNN Model Original dataset shape is (343889, 80) and last column is of Labels. The training and testing set split is done X_train, X_test, y_train, y_test = train_test_split(X, Y, test_size=0.30, random_state=10) shape of - training dataset (240722, 80) shape of - training Labels (240722,) shape of -...
https://stackoverflow.com/questions/71514834/unable-to-train-cnn-model
python, tensorflow, keras, deep-learning, conv-neural-network
1,647,530,468
se_69933910
stackoverflow
MACHINE_LEARNING
Getting error when training the CNN model
Getting error when training the CNN model I am getting errors when training my CNN model which is for checking what a person is telling in sign language. I am working with keras, tensorflow. This is my code: import tensorflow as tf ;importing libraries from tensorflow.keras import datasets,layers,models import numpy ...
https://stackoverflow.com/questions/69933910/getting-error-when-training-the-cnn-model
python, tensorflow, keras, deep-learning, conv-neural-network
1,636,659,169
se_43204194
stackoverflow
MACHINE_LEARNING
CNN is not learning at all
CNN is not learning at all I just created my own CNN which reads data from the disk and tries to learn. But the weights don't seem to learn at all, they all stay randomized. The biases change only a bit. I already tried to use grayscale images, without success. I also tired to reduce my dataset to only 2 classes which...
https://stackoverflow.com/questions/43204194/cnn-is-not-learning-at-all
python, tensorflow, machine-learning, deep-learning, conv-neural-network
1,491,300,494
se_66927645
stackoverflow
MACHINE_LEARNING
Tensorflow subclass keras with mulitple output shape
Tensorflow subclass keras with mulitple output shape class MyModel(tf.keras.Model): def __init__(self): super().__init__() self.dense = tf.keras.layers.Dense(1) self.build(input_shape=[None, 1]) def call(self, inputs, **kwargs): return self.dense(inputs) MyModel().summary() ...
https://stackoverflow.com/questions/66927645/tensorflow-subclass-keras-with-mulitple-output-shape
python, tensorflow, keras
1,617,423,126
se_55235212
stackoverflow
MACHINE_LEARNING
model.summary() can't print output shape while using subclass model
model.summary() can't print output shape while using subclass model This is the two methods for creating a keras model, but the output shapes of the summary results of the two methods are different. Obviously, the former prints more information and makes it easier to check the correctness of the network. import t...
https://stackoverflow.com/questions/55235212/model-summary-cant-print-output-shape-while-using-subclass-model
python, tensorflow, keras, tf.keras
1,552,978,620
se_79484824
stackoverflow
MACHINE_LEARNING
TAO Command Not found, whenever trying to run nvidia model inside TAO TOOLKIT TENSORFLOW docker container on WSL2
TAO Command Not found, whenever trying to run nvidia model inside TAO TOOLKIT TENSORFLOW docker container on WSL2 Hello even though I am inside the TAO toolkit tensorflow I am still having the issue of decrypting a model with tao docker run -it --rm -v /home/models:/workspace/model_dir -p 8888:8888 --runtime=nvidia n...
https://stackoverflow.com/questions/79484824/tao-command-not-found-whenever-trying-to-run-nvidia-model-inside-tao-toolkit-te
docker, tensorflow, nvidia
1,741,121,077
se_79803484
stackoverflow
MACHINE_LEARNING
ImportError: cannot import name 'model_lib_v2' from 'object_detection'
ImportError: cannot import name 'model_lib_v2' from 'object_detection' I'm attempting to train a model on TensorFlow, and I've used Nick's video as reference: https://youtu.be/yqkISICHH-U?si=IYW6Jsqhs0gCwMyc&t=8267 I've experienced following error: Traceback (most recent call last): File "D:\Passion...
https://stackoverflow.com/questions/79803484/importerror-cannot-import-name-model-lib-v2-from-object-detection
python, tensorflow
1,761,719,032
se_79806137
stackoverflow
MACHINE_LEARNING
getting a tensor of shape (32,) instead of a single value as a label
getting a tensor of shape (32,) instead of a single value as a label when i try to print/plt.tile the label of an image, its printing the tensor(32,) instead of a single label value. When i tried to print before the resizing, it was printing fine. Code: #### # importing libraries import tensorflow as tf tf.random.se...
https://stackoverflow.com/questions/79806137/getting-a-tensor-of-shape-32-instead-of-a-single-value-as-a-label
python, tensorflow, matplotlib, keras
1,761,938,231
se_79805862
stackoverflow
MACHINE_LEARNING
what is the purpose of training=True argument? Is it an argument of keras.sequential() or not?
what is the purpose of training=True argument? Is it an argument of keras.sequential() or not? What is the purpose of training=True argument in the last line. I called help(tf.keras.Sequential) but could not find anything related to it. Also is it the argument of tf.keras.Sequential() or not Code Here: data_augmentati...
https://stackoverflow.com/questions/79805862/what-is-the-purpose-of-training-true-argument-is-it-an-argument-of-keras-sequen
python, tensorflow, keras
1,761,919,135
se_74792455
stackoverflow
MACHINE_LEARNING
module 'keras.layers' has no attribute 'experimental'
module 'keras.layers' has no attribute 'experimental' hello so I was trying to resize and rescale my dataset as shown below l but I encountered this error: AttributeError: module 'keras.layers' has no attribute 'experimental' resize_and_rescale= tf.keras.Sequential([ layers.experimental.preprocess...
https://stackoverflow.com/questions/74792455/module-keras-layers-has-no-attribute-experimental
python, tensorflow, machine-learning, deep-learning, dataset
1,670,978,629
se_79800341
stackoverflow
MACHINE_LEARNING
TensorFlow not detecting NVIDIA GPU (RTX 3050, CUDA 12.7, TF 2.20.0)
TensorFlow not detecting NVIDIA GPU (RTX 3050, CUDA 12.7, TF 2.20.0) I’ve been trying to get TensorFlow to use my GPU on Windows, and even though everything seems installed correctly, it shows 0 available GPUs. System setup Windows 11 RTX 3050 Laptop GPU NVIDIA driver 566.36 (CUDA 12.7) Anaconda3 (Python 3.13) Tensor...
https://stackoverflow.com/questions/79800341/tensorflow-not-detecting-nvidia-gpu-rtx-3050-cuda-12-7-tf-2-20-0
python, windows, tensorflow, nvidia
1,761,517,287
se_79801836
stackoverflow
MACHINE_LEARNING
How to display the basic tensorflow Graph with trace_on() and trace_export() by tensorboard without the 'profiler' error?
How to display the basic tensorflow Graph with trace_on() and trace_export() by tensorboard without the 'profiler' error? I would like to learn the tensorflow. While, when I run the code in my google-colab, I had the error message: 'UnavailableError: Cannot export profiling results. No profiler is running.'. T...
https://stackoverflow.com/questions/79801836/how-to-display-the-basic-tensorflow-graph-with-trace-on-and-trace-export-by
python, tensorflow, graph, tensorboard
1,761,569,765
se_79508586
stackoverflow
MACHINE_LEARNING
I am trying to host my web app (React+Python) on Render.com (first time) and my Keras model isn't working, even though it works locally
I am trying to host my web app (React+Python) on Render.com (first time) and my Keras model isn't working, even though it works locally I have a Tensorflow model (.keras) that was made in a conda virtual environment for 3.11 and it works perfectly fine when run locally. It does not run in Render and gives me an er...
https://stackoverflow.com/questions/79508586/i-am-trying-to-host-my-web-app-reactpython-on-render-com-first-time-and-my
python, tensorflow, keras, web-applications
1,741,943,855
se_79407645
stackoverflow
MACHINE_LEARNING
Pascal VOC dataset loading and YOLO implementation error
Pascal VOC dataset loading and YOLO implementation error I am trying to implement the original YOLO Model from scratch using the 2016 research paper. I have built the loss function as a subclass of the keras.losses.Loss object. How ever I keep getting this error: -------------------------------------------------------...
https://stackoverflow.com/questions/79407645/pascal-voc-dataset-loading-and-yolo-implementation-error
python, tensorflow, keras, yolo
1,738,547,390
se_79798002
stackoverflow
MACHINE_LEARNING
Why GenPareto from Scipy and Tensorflow-Probability show difference?
Why GenPareto from Scipy and Tensorflow-Probability show difference? I'm trying to understand why the Generalized Pareto distribution shows different results for the same parameters. The results from SciPy make sense, while the results from TensorFlow Probability do not. import numpy as np import matplotlib.pyplot as ...
https://stackoverflow.com/questions/79798002/why-genpareto-from-scipy-and-tensorflow-probability-show-difference
python, tensorflow, scipy, tensorflow-probability
1,761,235,819
se_64224051
stackoverflow
MACHINE_LEARNING
tf.lookup.StaticHashTable with lists (of arbitrary sizes) as values
tf.lookup.StaticHashTable with lists (of arbitrary sizes) as values I want to associate to each person's name a list of numbers. keys = ["Fritz", "Franz", "Fred"] values = [[1, 2, 3], [4, 5], [6, 7, 8, 9]] If I run the following: import tensorflow as tf table = tf.lookup.StaticHashTable(tf.lookup.KeyValueTensorInitia...
https://stackoverflow.com/questions/64224051/tf-lookup-statichashtable-with-lists-of-arbitrary-sizes-as-values
python, tensorflow, dictionary, hashtable, lookup
1,601,980,564
se_79778907
stackoverflow
MACHINE_LEARNING
ValueError: Only instances of keras.Layer can be added to a Sequential model when using TensorFlow Hub KerasLayer
ValueError: Only instances of keras.Layer can be added to a Sequential model when using TensorFlow Hub KerasLayer I’m trying to build a Keras Sequential model using a feature extractor from TensorFlow Hub, but I’m running into this error: ValueError: Only instances of `keras.Layer` can be added to a Sequential model. ...
https://stackoverflow.com/questions/79778907/valueerror-only-instances-of-keras-layer-can-be-added-to-a-sequential-model-whe
python, tensorflow, keras, deep-learning
1,759,222,955
se_79793702
stackoverflow
MACHINE_LEARNING
Play Console warning: “Library that does not support 16 KB: base/lib/x86_64/libtensorflowlite_jni.so” when uploading AAB with TensorFlow Lite
Play Console warning: “Library that does not support 16 KB: base/lib/x86_64/libtensorflowlite_jni.so” when uploading AAB with TensorFlow Lite I’m uploading my Android App Bundle (AAB) to Google Play Console and getting this warning: Library that does not support 16 KB: base/lib/x86_64/libtensorflowlite_jni.so after u...
https://stackoverflow.com/questions/79793702/play-console-warning-library-that-does-not-support-16-kb-base-lib-x86-64-libt
android, kotlin, tensorflow, tensorflow-lite
1,760,782,628
se_79524727
stackoverflow
MACHINE_LEARNING
VSCode Pylance Cannot Resolve TensorFlow Keras Imports, But TensorFlow is Installed and Working
VSCode Pylance Cannot Resolve TensorFlow Keras Imports, But TensorFlow is Installed and Working I'm having an issue where tensorflow.keras and its submodules (e.g., tensorflow.keras.modules) are not being recognized in VSCode. Pylance keeps flagging them with "Import could not be resolved", even though TensorFlow is i...
https://stackoverflow.com/questions/79524727/vscode-pylance-cannot-resolve-tensorflow-keras-imports-but-tensorflow-is-instal
python, tensorflow, visual-studio-code, import, anaconda
1,742,539,691
se_79795060
stackoverflow
MACHINE_LEARNING
Pretrained ESRGAN (.pb) gives reddish or purple image — is this a preprocessing issue or model issue?
Pretrained ESRGAN (.pb) gives reddish or purple image — is this a preprocessing issue or model issue? I'm trying to use a pretrained ESRGAN model that I downloaded in .pb format. The model runs without errors, but the output image has a noticeable reddish/purple tint instead of the correct colors. import tensorflow as...
https://stackoverflow.com/questions/79795060/pretrained-esrgan-pb-gives-reddish-or-purple-image-is-this-a-preprocessing
python, tensorflow, image-processing, deep-learning
1,760,975,644
se_72268859
stackoverflow
MACHINE_LEARNING
Externally add a Variable to a model in TensorFlow
Externally add a Variable to a model in TensorFlow I have an existing TensorFlow model, and I want to add a new "parameter" (a tf.Variable) to the model's list of parameters (such that it's trainable) and add it externally to the model's list of parameters / computational graph. One approach that I tried, is to append...
https://stackoverflow.com/questions/72268859/externally-add-a-variable-to-a-model-in-tensorflow
python, tensorflow, deep-learning, neural-network, pytorch
1,652,767,207
se_79794886
stackoverflow
MACHINE_LEARNING
@tensorflow-models/face-landmarks-detection no longer works with tfjs. 403 error in network request for model
@tensorflow-models/face-landmarks-detection no longer works with tfjs. 403 error in network request for model I get an error while trying to run tfjs. It was working last week but it seems that the url for model is no longer available. Any suggestions for working model url/refactor? import { createDetector, Suppor...
https://stackoverflow.com/questions/79794886/tensorflow-models-face-landmarks-detection-no-longer-works-with-tfjs-403-error
reactjs, tensorflow
1,760,962,932
se_79423322
stackoverflow
MACHINE_LEARNING
How can I free the nvidia gpu memory allocated by tensorflow (2.17.0) in my running jupyter notebook?
How can I free the nvidia gpu memory allocated by tensorflow (2.17.0) in my running jupyter notebook? I have a jupyter notebook running on the kernel opt/conda/bin/python in my Google Compute Engine machine (Debian). The first cell of my notebook loads image data from the disk and saves it in the variables train_image...
https://stackoverflow.com/questions/79423322/how-can-i-free-the-nvidia-gpu-memory-allocated-by-tensorflow-2-17-0-in-my-runn
python, tensorflow, memory-leaks, gpu
1,739,024,157
se_79507456
stackoverflow
MACHINE_LEARNING
Tensorflow Keras model with interleave is having issues fitting
Tensorflow Keras model with interleave is having issues fitting I'm working on a CNN project where I make use of TensorFlow and Keras. In addition, I use interleave as the dataset is rather large (too large to load into the RAM with our resources). But there's an issue somewhere as the training gets stuck at a very lo...
https://stackoverflow.com/questions/79507456/tensorflow-keras-model-with-interleave-is-having-issues-fitting
python, tensorflow, machine-learning, keras, dataset
1,741,894,476
se_79790016
stackoverflow
MACHINE_LEARNING
ERROR: No matching distribution found for tensorflow==2.12
ERROR: No matching distribution found for tensorflow==2.12 I use macOS. I have to use LibRecommender in my code. Python Version: 3.8.13 According to this link, the 2.10 is a suitable tensorflow version. This is what's in my requirements.txt file I install within a conda environment. absl-py==2.1.0 aiohttp==3.9.5 aiosi...
https://stackoverflow.com/questions/79790016/error-no-matching-distribution-found-for-tensorflow-2-12
python, python-3.x, tensorflow, machine-learning
1,760,433,795
se_58127059
stackoverflow
MACHINE_LEARNING
How to understand masked multi-head attention in transformer
How to understand masked multi-head attention in transformer I'm currently studying the code of transformer, but I can not understand the masked multi-head of decoder. The paper said that it was to prevent you from seeing the generating word, but I can not understand if the words after generating word have not been ge...
https://stackoverflow.com/questions/58127059/how-to-understand-masked-multi-head-attention-in-transformer
tensorflow, machine-learning, deep-learning, transformer-model, attention-model
1,569,552,048
se_79335901
stackoverflow
MACHINE_LEARNING
TensorFlow Federated does not use GPU despite being detected
TensorFlow Federated does not use GPU despite being detected I'm running a TensorFlow Federated (TFF) script and attempting to utilize my GPU for federated learning simulations. While TensorFlow itself detects my GPU and can use it without issues, TFF outputs the following message, preventing GPU utilization: Using GP...
https://stackoverflow.com/questions/79335901/tensorflow-federated-does-not-use-gpu-despite-being-detected
tensorflow, tensorflow-federated
1,736,250,759
se_79788929
stackoverflow
MACHINE_LEARNING
Streamlit app throwing "NotFittedError: idf vector is not fitted" even though TF-IDF pipeline is fitted and works locally
Streamlit app throwing "NotFittedError: idf vector is not fitted" even though TF-IDF pipeline is fitted and works locally I trained a sentiment classification model using a scikit-learn Pipeline that includes a TfidfVectorizer and LogisticRegression classifier. Everything works perfectly on my local machine,...
https://stackoverflow.com/questions/79788929/streamlit-app-throwing-notfittederror-idf-vector-is-not-fitted-even-though-tf
python, tensorflow, deployment, nlp, streamlit
1,760,331,307
se_79788233
stackoverflow
MACHINE_LEARNING
Do I need .repeat() or steps_per_epoch when training on a finite TFRecord dataset in Keras?
Do I need .repeat() or steps_per_epoch when training on a finite TFRecord dataset in Keras? I’m following this tutorial on 3D brain tumor segmentation using MedicAI and Keras In the tutorial: dataset = dataset.batch(batch_size).prefetch(tf.data.AUTOTUNE) The author does not use .repeat(epochs) when creating the datas...
https://stackoverflow.com/questions/79788233/do-i-need-repeat-or-steps-per-epoch-when-training-on-a-finite-tfrecord-datase
tensorflow, keras
1,760,216,559
se_79786510
stackoverflow
MACHINE_LEARNING
Can I convert .keras model to .h5 so that tensorflow 2.10 can use it for prediction?
Can I convert .keras model to .h5 so that tensorflow 2.10 can use it for prediction? I trained a keras sequential model while working in colab. Now I shifted to a PC with Windows 11. jupyter notebook with Tensorflow 2.10 is unable to read that model. it needs a model in the old .h5 version. I tried converting the mode...
https://stackoverflow.com/questions/79786510/can-i-convert-keras-model-to-h5-so-that-tensorflow-2-10-can-use-it-for-predict
windows, tensorflow, keras
1,760,018,701
se_79574827
stackoverflow
MACHINE_LEARNING
Why does TensorFlow's tf.GradientTape() fail to compute gradients for custom sparse CNN layer with dynamic weight masking?
Why does TensorFlow's tf.GradientTape() fail to compute gradients for custom sparse CNN layer with dynamic weight masking? I'm implementing a sparse convolutional layer in TensorFlow where weights are dynamically masked during forward pass (based on input-dependent sparsity). However, tf.GradientTape() returns Non...
https://stackoverflow.com/questions/79574827/why-does-tensorflows-tf-gradienttape-fail-to-compute-gradients-for-custom-spa
tensorflow
1,744,710,307
se_79522167
stackoverflow
MACHINE_LEARNING
KerasTensor TypeError issues when using custom loss functions
KerasTensor TypeError issues when using custom loss functions I am using Mask R-CNN model with tensorflow version 2.13. The code works fine till training. When I run training, I am facing this KerasTensor error which is due to my loss functions, I think. This is the compile part - def compile(self, learning_rate, mome...
https://stackoverflow.com/questions/79522167/kerastensor-typeerror-issues-when-using-custom-loss-functions
python, tensorflow
1,742,455,592
se_76542808
stackoverflow
MACHINE_LEARNING
Error in TensorFlow.js Face Landmarks Detection when developing a chrome extension
Error in TensorFlow.js Face Landmarks Detection when developing a chrome extension I am currently working on developing a chrome extension using face landmarks detection from TensorFlow.js. When trying to load the script from mediapipe in my Chrome extension, I receive the following error: "Refused to load the script...
https://stackoverflow.com/questions/76542808/error-in-tensorflow-js-face-landmarks-detection-when-developing-a-chrome-extensi
javascript, typescript, tensorflow, google-chrome-extension, tensorflow.js
1,687,546,410
se_79710042
stackoverflow
MACHINE_LEARNING
Convert custom YOLOX model (.pth) to tflite model and quantize model
Convert custom YOLOX model (.pth) to tflite model and quantize model I have trained YOLOX using this repo on a custom dataset with 8 classes. The final output is a .pth file which I need to convert to a quantized .tflite format but I am completely stuck. What I tried so far: Use ai-edge-torch but I can't install the ...
https://stackoverflow.com/questions/79710042/convert-custom-yolox-model-pth-to-tflite-model-and-quantize-model
python, tensorflow, machine-learning, pytorch, tflite
1,753,168,012