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_60771063
stackoverflow
MACHINE_LEARNING
Tensorflow reported CUDA_ERROR_ILLEGAL_ADDRESS bug while train yolo
Tensorflow reported CUDA_ERROR_ILLEGAL_ADDRESS bug while train yolo It is a really strange bug. Environment: tf 1.12 + cuda9.0 + cudnn 7.5 + single RTX 2080 Today I tried to train YOLO V3 network on my new device. Batch size is 4. Every thing went right at the beginning, training started as usual and I could see the...
https://stackoverflow.com/questions/60771063/tensorflow-reported-cuda-error-illegal-address-bug-while-train-yolo
python, tensorflow, yolo
1,584,694,465
se_40472144
stackoverflow
MACHINE_LEARNING
ImportError: No module named tensorflow - Can't install Tensorflow
ImportError: No module named tensorflow - Can't install Tensorflow I am trying to install tensorflow on mac and it's giving me this error. ImportError: No module named tensorflow Here is what I have done in the terminal sudo easy_install pip sudo easy_install --upgrade six export TF_BINARY_URL=https://storage.g...
https://stackoverflow.com/questions/40472144/importerror-no-module-named-tensorflow-cant-install-tensorflow
python, tensorflow
1,478,543,643
se_72613281
stackoverflow
MACHINE_LEARNING
Doing inference without the whole Tensorflow dependency
Doing inference without the whole Tensorflow dependency I have a saved model (*.pb file) and I would like to do inference using that. I can easily do that when I import tensorflow but that looks like an overkill to me. On Android for example, I can have libandroid_tensorflow_inference_java.jar and libtensorflow_infere...
https://stackoverflow.com/questions/72613281/doing-inference-without-the-whole-tensorflow-dependency
python, tensorflow
1,655,193,015
se_78654902
stackoverflow
MACHINE_LEARNING
What is the alternative for keras.layers.DenseFeatures in TensorFlow 2.16.+
What is the alternative for keras.layers.DenseFeatures in TensorFlow 2.16.+ I am using feature-column dataset in my code, in newer version of TensorFlow 2.16.1 and later there is no keras.layers.DenseFeatures class in order to ready the input layer for the DNN. what is the alternative for that? As I am using python 3....
https://stackoverflow.com/questions/78654902/what-is-the-alternative-for-keras-layers-densefeatures-in-tensorflow-2-16
python-3.x, tensorflow, deep-learning, data-preprocessing
1,719,019,613
se_59587642
stackoverflow
MACHINE_LEARNING
Error:MetaGraphDef associated with tags 'serve' could not be found in SavedModel
Error:MetaGraphDef associated with tags 'serve' could not be found in SavedModel I have this error RuntimeError: MetaGraphDef associated with tags 'serve' could not be found in SavedModel. To inspect available tag-sets in the SavedModel, please use the SavedModel CLI: `saved_model_cli` available_tags: [{'trai...
https://stackoverflow.com/questions/59587642/errormetagraphdef-associated-with-tags-serve-could-not-be-found-in-savedmodel
python, tensorflow
1,578,108,231
se_43190221
stackoverflow
MACHINE_LEARNING
How to perform a Multi-Class classification in a convolutional neural 1D network with tensorflow?
How to perform a Multi-Class classification in a convolutional neural 1D network with tensorflow? I have a training file in the following format: 0.086, 0.4343, 0.4212, ...., class1 0.086, 0.4343, 0.4212, ...., class2 0.086, 0.4343, 0.4212, ...., class5 Where, each row is a one-dimensional vector and t...
https://stackoverflow.com/questions/43190221/how-to-perform-a-multi-class-classification-in-a-convolutional-neural-1d-network
python, tensorflow, deep-learning, conv-neural-network
1,491,238,500
se_76068754
stackoverflow
MACHINE_LEARNING
Why don't breakpoints work in Tensorflow function (in lazy/graph mode)?
Why don't breakpoints work in Tensorflow function (in lazy/graph mode)? I have a code like this that loads data: def parse_tf_record(example_proto: tf.train.Example, symbols: t.List[str], all_indicators: t.List[str], indicators: t.List[str]) -> None: feature_description = {symbol: tf.io.FixedLenFeature([len(al...
https://stackoverflow.com/questions/76068754/why-dont-breakpoints-work-in-tensorflow-function-in-lazy-graph-mode
python, python-3.x, tensorflow, tensorflow2.0
1,682,031,410
se_68950312
stackoverflow
MACHINE_LEARNING
Tensorflow download
Tensorflow download when I try to download Tensorflow, I get these errors. Can you help me please? ERROR: astroid 2.2.5 requires typed-ast>=1.3.0; implementation_name == "cpython", which is not installed. ERROR: tf-models-official 2.6.0 has requirement tensorflow>=2.5.0, but you'll have tensorflow 2.4.1 which is incom...
https://stackoverflow.com/questions/68950312/tensorflow-download
python, tensorflow
1,630,052,973
se_71831415
stackoverflow
MACHINE_LEARNING
Downgrade Python version in virtual environment
Downgrade Python version in virtual environment I am always getting the same error regarding TensorFlow: ModuleNotFoundError: No module named 'tensorflow.contrib'. I am actually using Python version 3.9 but, reading online, it seems that version 3.7 is the last stable one that can work with TensorFlow version >2.0. Un...
https://stackoverflow.com/questions/71831415/downgrade-python-version-in-virtual-environment
python, tensorflow, python-venv
1,649,695,280
se_78259773
stackoverflow
MACHINE_LEARNING
ValueError: Unknown layer: 'CustomScaleLayer'
ValueError: Unknown layer: 'CustomScaleLayer' I am building a model using InceptionResNEtV2 for my image dataset training. My model looks like: `inception_resnet = InceptionResNetV2(weights = "imagenet", include_top = False, input_tensor = Input...
https://stackoverflow.com/questions/78259773/valueerror-unknown-layer-customscalelayer
python, tensorflow, keras, object-detection
1,712,044,779
se_76488688
stackoverflow
MACHINE_LEARNING
ValueError: Unknown layer: 'CustomScaleLayer'. Please ensure you are using a`keras.utils.custom_object_scope`
ValueError: Unknown layer: 'CustomScaleLayer'. Please ensure you are using a`keras.utils.custom_object_scope` tensorflow version : t2.13.0-rc1 import os import cv2 import numpy as np import pandas as pd import tensorflow as tf import pytesseract as pt import plotly.express as px import matplotlib.pyplot as plt...
https://stackoverflow.com/questions/76488688/valueerror-unknown-layer-customscalelayer-please-ensure-you-are-using-aker
python, tensorflow, machine-learning, keras, keras-layer
1,686,906,809
se_79920330
stackoverflow
MACHINE_LEARNING
Can i make a Neural network And simply ML Model using a smartphone? (Ain't Have Pc/Laptop Btw)
Can i make a Neural network And simply ML Model using a smartphone? (Ain't Have Pc/Laptop Btw) I am someone who is currently Learn Python, especially libary for make machine learn, but i am not have pc/laptop , can i make my own ML & Neural model? I haveI've heard that we can use Google Colab for code, Hugging fac...
https://stackoverflow.com/questions/79920330/can-i-make-a-neural-network-and-simply-ml-model-using-a-smartphone-aint-have
android, numpy, tensorflow, machine-learning, artificial-intelligence
1,775,359,028
se_79919189
stackoverflow
MACHINE_LEARNING
Custom PyEnvironment time_step and time_step_spec do not match
Custom PyEnvironment time_step and time_step_spec do not match I'm creating a custom PyEnvironment in TensorFlow Agents to simulate the track and field decathlon. I've managed to create a functioning environment in the sense that I can use _step and _reset, but when implementing a reverb-based replay buffer, I get the...
https://stackoverflow.com/questions/79919189/custom-pyenvironment-time-step-and-time-step-spec-do-not-match
python, tensorflow, reinforcement-learning, tensorflow-agents
1,775,149,179
se_79912893
stackoverflow
MACHINE_LEARNING
Which is the best way to detect lines in historically book pages
Which is the best way to detect lines in historically book pages I am working on an OCR project and need to create a dataset consisting of approximately 1247 pages from 6 books. I need to crop the images line by line and transcribe the text for training a model. What is the best approach for accurately detecting lines...
https://stackoverflow.com/questions/79912893/which-is-the-best-way-to-detect-lines-in-historically-book-pages
python, tensorflow, opencv, deep-learning, ocr
1,774,279,573
se_79918294
stackoverflow
MACHINE_LEARNING
Can I create a layer in Keras that de-scales my output?
Can I create a layer in Keras that de-scales my output? I am working on a keras regression network that takes about 60 input variables and outputs 35 variables. For both the input and output, about half of the variables are in the range of ±10, while the other half of the variables are around the 100 000s. So there's ...
https://stackoverflow.com/questions/79918294/can-i-create-a-layer-in-keras-that-de-scales-my-output
python, tensorflow, keras, normalization
1,775,038,844
se_61349245
stackoverflow
MACHINE_LEARNING
Workaround for tensorflow's inability to assign in eager tensors
Workaround for tensorflow&#39;s inability to assign in eager tensors Eager tensors don't support assignment. I need to do assignment. a = tf.convert_to_tensor(np.random.choice(10, size = 12).reshape(3,4)) b = tf.convert_to_tensor(np.array([2,3])) a[:,b] *= -1 Traceback (most recent call last): File "<ipython-in...
https://stackoverflow.com/questions/61349245/workaround-for-tensorflows-inability-to-assign-in-eager-tensors
python, tensorflow, variable-assignment
1,587,489,299
se_79858798
stackoverflow
MACHINE_LEARNING
Is it correct to use build() in Keras to create internal layers that depend on input_shape?
Is it correct to use build() in Keras to create internal layers that depend on input_shape? I’m implementing a U-Net style residual block in Keras: class UnetResBlock(layers.Layer): def __init__(self, spatial_dims, in_channels, out_channels, ...): super().__init__() # Main conv layers self....
https://stackoverflow.com/questions/79858798/is-it-correct-to-use-build-in-keras-to-create-internal-layers-that-depend-on-i
python, tensorflow, keras
1,767,303,697
se_75093044
stackoverflow
MACHINE_LEARNING
how to design a custom loss function to add two loss
how to design a custom loss function to add two loss I am using CNN to solve a regression problem in a supervised manner. i have input data(X_train) and the target data(y_train).
https://stackoverflow.com/questions/75093044/how-to-design-a-custom-loss-function-to-add-two-loss
tensorflow, machine-learning, tensorflow2.0, tf.keras, loss-function
1,673,509,734
se_73386000
stackoverflow
MACHINE_LEARNING
Simple BERT implementation on R side
Simple BERT implementation on R side I would like to implement a simple text classification using BERT model on R side. On my local side, I have no progress because of this issue. Therefore, I moved to kaggle platform. Also, I have started to replicate this kaggle kernel. However, I could not succeed to call transform...
https://stackoverflow.com/questions/73386000/simple-bert-implementation-on-r-side
r, tensorflow, bert-language-model, transformer-model, reticulate
1,660,728,412
se_79906620
stackoverflow
MACHINE_LEARNING
How to correctly extract the CLS token from a Keras Hub ViT backbone, and clarify preprocessor usage and pretraining dataset?
How to correctly extract the CLS token from a Keras Hub ViT backbone, and clarify preprocessor usage and pretraining dataset? I’m working with a Vision Transformer (ViT) backbone from Keras Hub and building my own classification head. My code looks like this: python def get_vit_model(model_variant='vit_base', ...
https://stackoverflow.com/questions/79906620/how-to-correctly-extract-the-cls-token-from-a-keras-hub-vit-backbone-and-clarif
python, tensorflow, keras
1,773,367,680
se_79912564
stackoverflow
MACHINE_LEARNING
Built a Continued Pretraining + Fine-Tuning pipeline for a Veterinary Drug LLM on BioGPT-Large — Looking for feedback on my approach
Built a Continued Pretraining + Fine-Tuning pipeline for a Veterinary Drug LLM on BioGPT-Large — Looking for feedback on my approach I've been working on adapting Microsoft's BioGPT-Large for veterinary pharmacology using Plumb's Veterinary Drug Handbook (2023) as my domain corpus. After going through a lot of trial a...
https://stackoverflow.com/questions/79912564/built-a-continued-pretraining-fine-tuning-pipeline-for-a-veterinary-drug-llm-o
tensorflow, machine-learning, artificial-intelligence, fine-tuning, rag
1,774,238,342
se_33610685
stackoverflow
MACHINE_LEARNING
In TensorFlow, what is the difference between Session.run() and Tensor.eval()?
In TensorFlow, what is the difference between Session.run() and Tensor.eval()? TensorFlow has two ways to evaluate part of graph: Session.run on a list of variables and Tensor.eval. Is there a difference between these two?
https://stackoverflow.com/questions/33610685/in-tensorflow-what-is-the-difference-between-session-run-and-tensor-eval
python, tensorflow
1,447,077,172
se_47739284
stackoverflow
MACHINE_LEARNING
tensorflow matrix multiplication
tensorflow matrix multiplication So, i want to multiply a matrix with a matrix. When I try an array with a matrix, it works: import tensorflow as tf x = tf.placeholder(tf.float32, [None, 3]) W = tf.Variable(tf.ones([3, 3])) y = tf.matmul(x, W) with tf.Session() as sess: sess.run(tf.global_variables_initializer(...
https://stackoverflow.com/questions/47739284/tensorflow-matrix-multiplication
python, matrix, tensorflow
1,512,912,144
se_79908102
stackoverflow
MACHINE_LEARNING
ValueError: shapes mismatch when combining Re-ID Cosine distance and IoU matrices for custom MOT tracking
ValueError: shapes mismatch when combining Re-ID Cosine distance and IoU matrices for custom MOT tracking I am building a custom Multi-Object Tracking (MOT) system using Python, OpenCV, and TensorFlow. My goal is to track people and perform real-time clothing recognition. To prevent ID switches when a person turns aro...
https://stackoverflow.com/questions/79908102/valueerror-shapes-mismatch-when-combining-re-id-cosine-distance-and-iou-matrice
python, numpy, tensorflow, computer-vision, object-tracking
1,773,610,748
se_72129545
stackoverflow
MACHINE_LEARNING
ImportError: cannot import name &#39;keras&#39; from &#39;tensorflow&#39;
ImportError: cannot import name &#39;keras&#39; from &#39;tensorflow&#39; I'm try learning TensorFlow but i have a problem. I'm importing TensorFlow like in official website but i take a error. import pandas as pd import numpy as np import tensorflow as tf from tensorflow import keras from tensorflow.keras import laye...
https://stackoverflow.com/questions/72129545/importerror-cannot-import-name-keras-from-tensorflow
python, tensorflow, keras
1,651,763,496
se_39023581
stackoverflow
MACHINE_LEARNING
Tensorflow: Cuda compute capability 3.0. The minimum required Cuda capability is 3.5
Tensorflow: Cuda compute capability 3.0. The minimum required Cuda capability is 3.5 I am installing tensorflow from source (documentation). Cuda driver version: nvcc: NVIDIA (R) Cuda compiler driver Cuda compilation tools, release 7.5, V7.5.17 When I ran the following command : bazel-bin/tensorflow/cc/tutorials...
https://stackoverflow.com/questions/39023581/tensorflow-cuda-compute-capability-3-0-the-minimum-required-cuda-capability-is
python, tensorflow, gpu, bazel
1,471,538,917
se_60934350
stackoverflow
MACHINE_LEARNING
How to estimate how much GPU memory required for deep learning?
How to estimate how much GPU memory required for deep learning? We are trying to train our model for object recognition using tensorflow. Since there are too many images (100GB), I guess our current GPU server (1*2080Ti) could not work. We may need to purchase a more powerful one, but I do not sure how to estimate how...
https://stackoverflow.com/questions/60934350/how-to-estimate-how-much-gpu-memory-required-for-deep-learning
tensorflow, deep-learning, gpu, nvidia
1,585,583,419
se_39890147
stackoverflow
MACHINE_LEARNING
Keras uses way too much GPU memory when calling train_on_batch, fit, etc
Keras uses way too much GPU memory when calling train_on_batch, fit, etc I've been messing with Keras, and like it so far. There's one big issue I have been having, when working with fairly deep networks: When calling model.train_on_batch, or model.fit etc., Keras allocates significantly more GPU memory than what the ...
https://stackoverflow.com/questions/39890147/keras-uses-way-too-much-gpu-memory-when-calling-train-on-batch-fit-etc
memory, tensorflow, keras, theano
1,475,739,256
se_45132809
stackoverflow
MACHINE_LEARNING
How to select batch size automatically to fit GPU?
How to select batch size automatically to fit GPU? I am training deep neural networks with a GPU. If I make samples too large, batches too large, or networks too deep, I get an out of memory error. In this case, it is sometimes possible to make smaller batches and still train. Is it possible to calculate GPU size req...
https://stackoverflow.com/questions/45132809/how-to-select-batch-size-automatically-to-fit-gpu
tensorflow, out-of-memory, deep-learning, gpu, keras
1,500,235,329
se_79905440
stackoverflow
MACHINE_LEARNING
Input &#39;y&#39; of &#39;Sub&#39; Op has type float16 that does not match type float32 of argument &#39;x&#39; when using mixed precision with custom loss
Input &#39;y&#39; of &#39;Sub&#39; Op has type float16 that does not match type float32 of argument &#39;x&#39; when using mixed precision with custom loss I am experimenting with mixed precision training in TensorFlow to speed up training on a GPU. I enabled the global mixed precision policy and implemented a custom ...
https://stackoverflow.com/questions/79905440/input-y-of-sub-op-has-type-float16-that-does-not-match-type-float32-of-argum
python, tensorflow, tensorflow2.0, tf.keras
1,773,236,992
se_73152462
stackoverflow
MACHINE_LEARNING
Tensorflow custom loss for multiple outputs model
Tensorflow custom loss for multiple outputs model I am working on a image segmentation and classification model which take one 3D image (64x64x64) and return two outputs (3D mask 64x64x64 and one-hot encoded category). Two outputs has been defined like this: seg_final_stage = Conv3D(seg_classes, kernel_size=3, strides...
https://stackoverflow.com/questions/73152462/tensorflow-custom-loss-for-multiple-outputs-model
python, tensorflow, keras, deep-learning
1,659,009,204
se_78567291
stackoverflow
MACHINE_LEARNING
Can&#39;t test my Tensorflow convolution model with my own drawings
Can&#39;t test my Tensorflow convolution model with my own drawings I'm a beginner in tensorflow and I made a convolution model with tensorflow (sub-classing) to classify 10 different draws. For that I used the quick draw dataset with images of size (1, 28, 28, 1). To compile the model I used : loss : SparseCategorica...
https://stackoverflow.com/questions/78567291/cant-test-my-tensorflow-convolution-model-with-my-own-drawings
tensorflow, conv-neural-network, image-resizing
1,717,351,284
se_79879711
stackoverflow
MACHINE_LEARNING
Loop over instances of classes in TensorFlow graph mode
Loop over instances of classes in TensorFlow graph mode I have a set of classes that store tensors and perform some operation with them using a method inherent to each class. My code has a set-up phase where a list of instances of those classes is created. Then, in graph mode, a function must iterate through that list...
https://stackoverflow.com/questions/79879711/loop-over-instances-of-classes-in-tensorflow-graph-mode
python, tensorflow, graph
1,769,806,547
se_79802200
stackoverflow
MACHINE_LEARNING
TensorFlow Custom Training Loop with Mixed Precision Causing NaN Loss After Epoch 15
TensorFlow Custom Training Loop with Mixed Precision Causing NaN Loss After Epoch 15 I am implementing a custom training loop in TensorFlow 2.18 with mixed precision (float16) for a large vision transformer model. The training runs fine for about 15 epochs, but then the loss suddenly becomes NaN. I have even verified ...
https://stackoverflow.com/questions/79802200/tensorflow-custom-training-loop-with-mixed-precision-causing-nan-loss-after-epoc
python, tensorflow, keras, tensorflow2.0
1,761,595,266
se_79904053
stackoverflow
MACHINE_LEARNING
Building tensorflow ambiguity errors
Building tensorflow ambiguity errors I'm building tensorflow 2.20.0 from source from official repo (from release branch v2.20.0) with rocm and -march=native I use: export HERMETIC_PYTHON_VERSION=3.13 export ROCM_PATH=/opt/rocm/ export PATH="$PATH:/opt/rocm/bin" Tools: Python 3.13 Clang version 18.1.8 Bazel 7.4.1 (v...
https://stackoverflow.com/questions/79904053/building-tensorflow-ambiguity-errors
tensorflow, clang, fft
1,773,079,702
se_49764981
stackoverflow
MACHINE_LEARNING
set diagonal values of tensor to 0
set diagonal values of tensor to 0 It seems that there is no simple way to assign a value to the diagonal of a Tensor. Ideally I am looking for a command like numpy.fill_diagonal. Currently I accomplish this by doing: tf.matrix_set_diag( matrix, tf.zeros_like(matrix.shape[0:-1]), ...
https://stackoverflow.com/questions/49764981/set-diagonal-values-of-tensor-to-0
tensorflow
1,523,409,363
se_75260541
stackoverflow
MACHINE_LEARNING
How to make a stacked Keras LSTM
How to make a stacked Keras LSTM My Tensorflow non-stacked LSTM model code works well for this: # reshape input to be [samples, time steps, features] trainX = np.reshape(trainX, (trainX.shape[0], 1, trainX.shape[1])) testX = np.reshape(testX, (testX.shape[0], 1, testX.shape[1])) # create and fit the LSTM network mode...
https://stackoverflow.com/questions/75260541/how-to-make-a-stacked-keras-lstm
python, tensorflow, machine-learning, lstm, tf.keras
1,674,835,411
se_79850470
stackoverflow
MACHINE_LEARNING
Tensorflow Keras Autoencoder Masking Features not Timesteps
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 event types, sometimes only 2. In preprocessing i transpose ...
https://stackoverflow.com/questions/79850470/tensorflow-keras-autoencoder-masking-features-not-timesteps
tensorflow, machine-learning, keras, stream, autoencoder
1,766,072,672
se_41955404
stackoverflow
MACHINE_LEARNING
Tensorflow: How to ignore specific labels during semantic segmentation?
Tensorflow: How to ignore specific labels during semantic segmentation? I'm using tensorflow for semantic segmentation. How can I tell tensorflow to ignore a specific label when computing the pixelwise loss? I've read in this post that for image classification one can set the label to -1 and it will be ignored. If ...
https://stackoverflow.com/questions/41955404/tensorflow-how-to-ignore-specific-labels-during-semantic-segmentation
tensorflow
1,485,859,009
se_77133696
stackoverflow
MACHINE_LEARNING
Unable to resolve module ./.expo/.virtual-metro-entry
Unable to resolve module ./.expo/.virtual-metro-entry Actually I have installed unimodule previously was running react native cli because of tensorflow/tfjs-react-native I have to install unimodule but whenever I am doing yarn android I am getting below error Error: Unable to resolve module ./.expo/.virtual-metro-entr...
https://stackoverflow.com/questions/77133696/unable-to-resolve-module-expo-virtual-metro-entry
reactjs, react-native, tensorflow, react-hooks, expo
1,695,118,718
se_79888024
stackoverflow
MACHINE_LEARNING
Keras ImageDataGenerator width_shift_range moving vertically despite correct input shape (H, W, C)
Keras ImageDataGenerator width_shift_range moving vertically despite correct input shape (H, W, C) I am experiencing a very strange issue with Keras ImageDataGenerator. I have a landscape image with shape (1056, 2000, 3). Height (Axis 0): 1056 Width (Axis 1): 2000 When I use plt.imshow(), the axes are displayed co...
https://stackoverflow.com/questions/79888024/keras-imagedatagenerator-width-shift-range-moving-vertically-despite-correct-inp
python, tensorflow, machine-learning, keras, imagedatagenerator
1,770,892,433
se_79898570
stackoverflow
MACHINE_LEARNING
Tensorflow Keras CV tutorials incorrectly working
Tensorflow Keras CV tutorials incorrectly working I'm starting learning Machine Learning by Tensorflow Keras CV tutorials and two of my tutorial projects are not working correctly. I use these tutorials: https://www.tensorflow.org/tutorials/load_data/images https://www.tensorflow.org/tutorials/keras/classification And...
https://stackoverflow.com/questions/79898570/tensorflow-keras-cv-tutorials-incorrectly-working
python, tensorflow, machine-learning, keras
1,772,306,461
se_79898762
stackoverflow
MACHINE_LEARNING
How initializing weights with large value causes vanishing gradient problem in neural network
How initializing weights with large value causes vanishing gradient problem in neural network I was watching this tutorial on weight initialization in neural network, and im not able to understand this statement: In case of Tanh, Sigmoid activation, If we initialize weights with large values (range [0,1)), then the tr...
https://stackoverflow.com/questions/79898762/how-initializing-weights-with-large-value-causes-vanishing-gradient-problem-in-n
python, tensorflow, deep-learning, neural-network, activation-function
1,772,354,646
se_79897271
stackoverflow
MACHINE_LEARNING
How can I install Python 3.11 in windows for Tensorflow
How can I install Python 3.11 in windows for Tensorflow I saw that it is recommended to use this version of python for tensorflow, but I am unable to download it for windows since the page no longer has an installer and the only "installer" I can find is an .msix that my computer refuses to run for security reasons: S...
https://stackoverflow.com/questions/79897271/how-can-i-install-python-3-11-in-windows-for-tensorflow
python, tensorflow
1,772,126,186
se_48637400
stackoverflow
MACHINE_LEARNING
Tensorflow Object Detection API - Adding more training data half way, is it ok?
Tensorflow Object Detection API - Adding more training data half way, is it ok? I have a total of 300 images for the training dataset, the current saved checkpoint is 8054. Trained for 10 hours and having accuracy of around 50%. The model is required to detect only one object. I wish to improve the accuracy. So, I am ...
https://stackoverflow.com/questions/48637400/tensorflow-object-detection-api-adding-more-training-data-half-way-is-it-ok
tensorflow, machine-learning, object-detection
1,517,901,265
se_79770352
stackoverflow
MACHINE_LEARNING
How to load a model while ignoring unbuilt head layers? (`expected 2 variables, received 0`)
How to load a model while ignoring unbuilt head layers? (`expected 2 variables, received 0`) I’m loading a custom ViT backbone saved via MLflow’s TensorFlow flavor (Keras 3). The artifact includes backbone parts I want (patch_embed, encoder) a couple of layers in the encoder were saved in a partially built state. Whe...
https://stackoverflow.com/questions/79770352/how-to-load-a-model-while-ignoring-unbuilt-head-layers-expected-2-variables
tensorflow, machine-learning, keras, mlflow, keras-3
1,758,377,792
se_58752942
stackoverflow
MACHINE_LEARNING
Are there IEC 61131 / IEC 61499 PLC function blocks that use OPA UA to transport data?
Are there IEC 61131 / IEC 61499 PLC function blocks that use OPA UA to transport data? I have a machine learning and advanced control application in Python (TensorFlow + Gekko) that I need to integrate with a Programmable Logic Controller (PLC) that provides the data acquisition and final element control. Can I use a ...
https://stackoverflow.com/questions/58752942/are-there-iec-61131-iec-61499-plc-function-blocks-that-use-opa-ua-to-transport
python, tensorflow, automation, gekko, iec61131-3
1,573,143,603
se_79884426
stackoverflow
MACHINE_LEARNING
conflict between tensorflow and pyopengl
conflict between tensorflow and pyopengl Using python 3.13, I get an Segmentation Fault with code which earlier (using python 3.10, tensorflow-cpu 2.12, PyOpenGl 3.1.0 and pygame 2.5.0) used to work fine. Now it segfaults at the location where OpenGL actually does some work (at a call to glCallList, which is I think t...
https://stackoverflow.com/questions/79884426/conflict-between-tensorflow-and-pyopengl
python, tensorflow, pyopengl
1,770,391,223
se_58413230
stackoverflow
MACHINE_LEARNING
How to prevent keras from renaming layers
How to prevent keras from renaming layers When I re-create a model, keras always makes a new name for a layer (conv2d_2 and so on) even if I override the model. How to make keras using the same name every time I run it without restarting the kernel.
https://stackoverflow.com/questions/58413230/how-to-prevent-keras-from-renaming-layers
python, tensorflow, keras, neural-network, jupyter-notebook
1,571,228,491
se_62991016
stackoverflow
MACHINE_LEARNING
Tensorflow keras model for solving simple equation
Tensorflow keras model for solving simple equation I'm trying to understand how to create a simple tensorflow 2.2 keras model that can predict a simple function value: f(a, b, c, d) = a < b : max(a/2, c/3) : max (b/2, d/3) I know this exact question can be reduced to a categorical classification but my intention is t...
https://stackoverflow.com/questions/62991016/tensorflow-keras-model-for-solving-simple-equation
tensorflow, machine-learning, keras, deep-learning, neural-network
1,595,231,943
se_56093535
stackoverflow
MACHINE_LEARNING
What is the use case of this TensorFlow class: image.flip_up_down?
What is the use case of this TensorFlow class: image.flip_up_down? What is the use case of this TensorFlow class: image.flip_up_down? Why the image has to flip up and down? Whats the reason behind this?
https://stackoverflow.com/questions/56093535/what-is-the-use-case-of-this-tensorflow-class-image-flip-up-down
tensorflow, machine-learning, image-processing, image-conversion
1,557,602,284
se_63378266
stackoverflow
MACHINE_LEARNING
can we save a tokenizer to preprocess raw text in savedmodel?
can we save a tokenizer to preprocess raw text in savedmodel? I am facing an issue currently, regarding the preprocessing of an input with the SavedModel format. I am using Transformers model which are using subword/BPE encoder. I can save my model into a savedModel format but I do not know how to add the preprocessin...
https://stackoverflow.com/questions/63378266/can-we-save-a-tokenizer-to-preprocess-raw-text-in-savedmodel
tensorflow, tokenize
1,597,241,101
se_79891158
stackoverflow
MACHINE_LEARNING
How to solve a checksum error with tfds.load
How to solve a checksum error with tfds.load I'm trying to learn how to use Transformers with TensorFlow and I'm following this tutorial on the TensorFlow website: https://www.tensorflow.org/text/tutorials/transformer The problem I have is when I try the line: tfds.load('ted_hrlr_translate/pt_to_en',with_info=True,as_...
https://stackoverflow.com/questions/79891158/how-to-solve-a-checksum-error-with-tfds-load
tensorflow, machine-learning, nlp, checksum
1,771,359,789
se_54075663
stackoverflow
MACHINE_LEARNING
Python3.7 is not compatible with Tensorflow?
Python3.7 is not compatible with Tensorflow? I am trying to continue with a Rasa chatbot that I have not used since September and I find a syntax problem with the dependency of Tensorflow. I do not know if this is due to the fact that there are updates to be made with my dependencies or if it due to the fact that I us...
https://stackoverflow.com/questions/54075663/python3-7-is-not-compatible-with-tensorflow
python, tensorflow, rasa-nlu, rasa-core
1,546,868,943
se_74425486
stackoverflow
MACHINE_LEARNING
Importing TensorFlow &quot;async&quot; syntax error
Importing TensorFlow &quot;async&quot; syntax error I am trying to use the module imageai for a project and ran the line "from imageai.Detection import ObjectDetection". However, when I do so, this error appears: File /Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/tensorflow/python/pyw...
https://stackoverflow.com/questions/74425486/importing-tensorflow-async-syntax-error
python, tensorflow, syntax-error
1,668,380,998
se_78902144
stackoverflow
MACHINE_LEARNING
Model definition in Keras tutorial &quot;Probabilistic Bayesian Neural Networks&quot; leads to error &quot;AttributeError: &#39;tuple&#39; object has no attribute &#39;rank&#39;&quot;
Model definition in Keras tutorial &quot;Probabilistic Bayesian Neural Networks&quot; leads to error &quot;AttributeError: &#39;tuple&#39; object has no attribute &#39;rank&#39;&quot; I am trying to run the keras-tutorial Probabilistic Bayesian Neural Networks to get an understanding of Bayesian neural networks (BNN)....
https://stackoverflow.com/questions/78902144/model-definition-in-keras-tutorial-probabilistic-bayesian-neural-networks-lead
python, tensorflow, keras, bayesian-networks, tensorflow-probability
1,724,337,542
se_60208936
stackoverflow
MACHINE_LEARNING
Cannot dlopen some GPU libraries. Skipping registering GPU devices
Cannot dlopen some GPU libraries. Skipping registering GPU devices Tensorflow is only using the CPU and wont use the GPU. I assume its because it expects Cuda 10.0 and it finds 10.2. I had installed 10.2 but have purged it and installed 10.0. Im running Ubuntu 19.10, AMD Ryzen 2700 Cpu, RTX 2080 S. I have installed...
https://stackoverflow.com/questions/60208936/cannot-dlopen-some-gpu-libraries-skipping-registering-gpu-devices
python-3.x, tensorflow, gpu
1,581,600,311
se_53358838
stackoverflow
MACHINE_LEARNING
Predicting all zeros
Predicting all zeros I've depeloped a neural network for classification and I'm getting a 0.93 of accuracy, the problem is that I'm predicting all zeros because the distribution of the data. How can I fix it? Should I change from neural network to another algorithm? Thanks in advance Edit: i've just checked and m...
https://stackoverflow.com/questions/53358838/predicting-all-zeros
python, tensorflow, machine-learning, deep-learning
1,542,526,957
se_79882097
stackoverflow
MACHINE_LEARNING
Keras Loss from multiple output layers
Keras Loss from multiple output layers I have a Keras model with multiple output layers. I want to have a loss function, that computes a loss based on two of the model output layers. Can I do this in a simple way, without using a custom train loop or adding a layer for this?
https://stackoverflow.com/questions/79882097/keras-loss-from-multiple-output-layers
python, tensorflow, keras
1,770,135,962
se_79885777
stackoverflow
MACHINE_LEARNING
ODIR-5K: Should I train a Dual-Input CNN (Left/Right) or split images for Patient-Level Multi-Label Classification?
ODIR-5K: Should I train a Dual-Input CNN (Left/Right) or split images for Patient-Level Multi-Label Classification? I am working with the ODIR-5K (Ocular Disease Intelligent Recognition) dataset. The goal is multi-label classification of 8 ocular diseases (Normal, Diabetes, Glaucoma, Cataract, etc.). The Data Structur...
https://stackoverflow.com/questions/79885777/odir-5k-should-i-train-a-dual-input-cnn-left-right-or-split-images-for-patien
tensorflow, machine-learning, keras, computer-vision, conv-neural-network
1,770,632,924
se_67413144
stackoverflow
MACHINE_LEARNING
Why Magenta is preprocessing less outputs than inputs?
Why Magenta is preprocessing less outputs than inputs? I am using Magenta's Polyphony RNN to generate MIDI music. I have the dataset, but when it comes to Magenta's preprocessing, it produces fewer outputs than I expected to produce (it should be the same as inputs). I can observe that there are some metrics to get ri...
https://stackoverflow.com/questions/67413144/why-magenta-is-preprocessing-less-outputs-than-inputs
tensorflow, pipeline, recurrent-neural-network, midi, magenta
1,620,283,757
se_79872844
stackoverflow
MACHINE_LEARNING
Recommended backend and ML tools for expense prediction app
Recommended backend and ML tools for expense prediction app I am working on a project to build an AI-powered family budget mobile application. The app will track income and expenses, categorize transactions, analyze spending patterns, and predict future expenses. My current planned technology stack is as follows. Fron...
https://stackoverflow.com/questions/79872844/recommended-backend-and-ml-tools-for-expense-prediction-app
python, tensorflow, machine-learning, time-series, backend
1,768,997,632
se_79873669
stackoverflow
MACHINE_LEARNING
TFModel weights do not appear in model.trainable_weights
TFModel weights do not appear in model.trainable_weights I wrote a custom TensorFlow model shown below. My issue is that the backbone is not appearing in model.summary() and not in model.trainable_weights(). However I does work if I go into model.backbone.trainable_weights(). This means I have to provide both model.tr...
https://stackoverflow.com/questions/79873669/tfmodel-weights-do-not-appear-in-model-trainable-weights
tensorflow, keras, tensorflow2.0, huggingface
1,769,080,961
se_65677815
stackoverflow
MACHINE_LEARNING
Keras+tensorflow code to create sequential model crashing with message &quot;Your session crashed for an unknown reason&quot; on Google colab
Keras+tensorflow code to create sequential model crashing with message &quot;Your session crashed for an unknown reason&quot; on Google colab While running the following code on Google colab with 'GPU' runtime (as one of my custom layers performs tensorflow.fft using GPU), my session is crashing. fc2_shape = 32*32 mo...
https://stackoverflow.com/questions/65677815/kerastensorflow-code-to-create-sequential-model-crashing-with-message-your-ses
tensorflow, keras, google-colaboratory
1,610,423,633
se_75927777
stackoverflow
MACHINE_LEARNING
Value Error: Shapes (None, 21) and (None, 7, 7, 21) are incompatible
Value Error: Shapes (None, 21) and (None, 7, 7, 21) are incompatible I am doing an exercise with the VGG16 model using Keras. I have loaded the model and now I have to Replace the last 3 fully connected layers with 3 new layers: the first 2 of 50 and 20 neurons respectively with ReLU activation, and a last layer with ...
https://stackoverflow.com/questions/75927777/value-error-shapes-none-21-and-none-7-7-21-are-incompatible
python, tensorflow, keras
1,680,600,857
se_55142951
stackoverflow
MACHINE_LEARNING
TensorFlow 2.0 - AttributeError: module &#39;tensorflow&#39; has no attribute &#39;Session&#39;
TensorFlow 2.0 - AttributeError: module &#39;tensorflow&#39; has no attribute &#39;Session&#39; When I am executing the command sess = tf.Session() in a TensorFlow 2.0 environment, I am getting an error message as below: Traceback (most recent call last): File "<stdin>", line 1, in <module> AttributeError: module 'ten...
https://stackoverflow.com/questions/55142951/tensorflow-2-0-attributeerror-module-tensorflow-has-no-attribute-session
python, tensorflow, keras, tensorflow2.0
1,552,483,399
se_52695829
stackoverflow
MACHINE_LEARNING
Object detection using TFLearn or TensorFlow object detection API
Object detection using TFLearn or TensorFlow object detection API I want to build a object detection model and cannot figure out whether to go for TensorFlow object detection API or use TFLearn to build a model. What the pros and cons of both?
https://stackoverflow.com/questions/52695829/object-detection-using-tflearn-or-tensorflow-object-detection-api
tensorflow, machine-learning, deep-learning, object-detection, tflearn
1,538,976,200
se_51348085
stackoverflow
MACHINE_LEARNING
Keras Tutorial Error: NameError: name &#39;layers&#39; is not defined
Keras Tutorial Error: NameError: name &#39;layers&#39; is not defined I am trying to follow this Keras tutorial, but I encounter the following error when compiling using the command python3 test.py: Traceback (most recent call last): File "test.py", line 13, in <module> layers.Dense(64, activation='sigmoid') Na...
https://stackoverflow.com/questions/51348085/keras-tutorial-error-nameerror-name-layers-is-not-defined
python, python-3.x, tensorflow, keras, keras-layer
1,531,655,401
se_79872978
stackoverflow
MACHINE_LEARNING
LSTM time series using Keras Sequential, .predict() explanation
LSTM time series using Keras Sequential, .predict() explanation I fit a model using Keras sequential with LSTM layers. The LSTM model will have certain aspects of the state carry forward from one period t to the next, besides the the input sequence of values for that period. I fit the model on data ending Dec 31, 202...
https://stackoverflow.com/questions/79872978/lstm-time-series-using-keras-sequential-predict-explanation
python, tensorflow, keras, lstm
1,769,007,657
se_65764544
stackoverflow
MACHINE_LEARNING
What does keras model.predict output?
What does keras model.predict output? I've built an LSTM model (see below) and trained it. My loss function is binary cross entropy as I'm doing binary classification. The training y data is a set of 0's and 1's. When I run model.predict(x_test_scaled) I get a set single series with values ranging between 0 and 1. I'm...
https://stackoverflow.com/questions/65764544/what-does-keras-model-predict-output
python, tensorflow, keras, sequential
1,610,908,659
se_79873343
stackoverflow
MACHINE_LEARNING
RuntimeError: Failed to import transformers (&#39;NoneType&#39; object has no attribute &#39;split&#39;) with Python 3.11, TensorFlow 2.15 &amp; Docker
RuntimeError: Failed to import transformers (&#39;NoneType&#39; object has no attribute &#39;split&#39;) with Python 3.11, TensorFlow 2.15 &amp; Docker I am encountering a critical RuntimeError during the startup of my Dockerized FastAPI application. The error occurs specifically when sentence_transformers attempts to...
https://stackoverflow.com/questions/79873343/runtimeerror-failed-to-import-transformers-nonetype-object-has-no-attribute
python, docker, tensorflow, huggingface-transformers, python-3.11
1,769,046,088
se_47267105
stackoverflow
MACHINE_LEARNING
How to force PyCharm to evaluate tensorflow.contrib LazyLoader so it auto-completes?
How to force PyCharm to evaluate tensorflow.contrib LazyLoader so it auto-completes? Python novice here... If I only import TensorFlow's root package, auto-complete doesn't seem to work for tf.contrib due to that module being loaded through LazyLoader: However, if I import tensorflow.contrib.learn, then PyCharm kn...
https://stackoverflow.com/questions/47267105/how-to-force-pycharm-to-evaluate-tensorflow-contrib-lazyloader-so-it-auto-comple
python, tensorflow, autocomplete, pycharm
1,510,584,645
se_58474438
stackoverflow
MACHINE_LEARNING
Difference between split() and tokenize()
Difference between split() and tokenize() I am counting the number of unique words in a loaded text file. However I have realized that when I use split() and tensorflow_datasets tokenize() I get different results yet I thought they achieve the same thing. Here is my code. Can somebody help me know the difference betwe...
https://stackoverflow.com/questions/58474438/difference-between-split-and-tokenize
python, tensorflow, dataset, tokenize
1,571,585,032
se_74117515
stackoverflow
MACHINE_LEARNING
Why use lambda layers instead of just plain code?
Why use lambda layers instead of just plain code? For example: inp = keras.Input(shape=s) D = keras.layers.Dense(d)(inp) L = keras.layers.Lambda(lambda x: myFunc(x))(D) outp = keras.layers.Dense(...)(L) model = keras.model(inp,outp) vs. inp = keras.Input(shape=s) D = keras.layers.Dense(d)(inp) L = myFunc(D) outp = ke...
https://stackoverflow.com/questions/74117515/why-use-lambda-layers-instead-of-just-plain-code
tensorflow, keras
1,666,127,490
se_67347479
stackoverflow
MACHINE_LEARNING
DeepSpeech failed to learn Persian language
DeepSpeech failed to learn Persian language I’m training DeepSpeech from scratch (without checkpoint) with a language model generated using KenLM as stated in its doc. The dataset is a Common Voice dataset for Persian language. My configurations are as follows: Batch size = 2 (due to cuda OOM) Learning rate = 0.0001 ...
https://stackoverflow.com/questions/67347479/deepspeech-failed-to-learn-persian-language
tensorflow, machine-learning, speech-recognition, farsi, mozilla-deepspeech
1,619,880,327
se_79559242
stackoverflow
MACHINE_LEARNING
tflite-runtime ValueError: Didn&#39;t find op for builtin opcode &#39;FULLY_CONNECTED&#39; version &#39;12&#39;. An older version of this builtin might be supported
tflite-runtime ValueError: Didn&#39;t find op for builtin opcode &#39;FULLY_CONNECTED&#39; version &#39;12&#39;. An older version of this builtin might be supported I have trained and quantised my models on tensorflow==2.19.0 instead of a previous version and now am facing troubles in using the quantised models for in...
https://stackoverflow.com/questions/79559242/tflite-runtime-valueerror-didnt-find-op-for-builtin-opcode-fully-connected-v
tensorflow, machine-learning, raspberry-pi, image-classification, tflite
1,744,008,944
se_79819201
stackoverflow
MACHINE_LEARNING
TensorFlow throws cuDNN/cuBLAS/cuFFT and MessageFactory errors on Kaggle
TensorFlow throws cuDNN/cuBLAS/cuFFT and MessageFactory errors on Kaggle I am working on a Kaggle notebook where I am trying to import TensorFlow/Keras to build a simple neural network for tabular data. However, even with Accelerator = None (CPU only), TensorFlow fails during import with multiple CUDA-related warnings...
https://stackoverflow.com/questions/79819201/tensorflow-throws-cudnn-cublas-cufft-and-messagefactory-errors-on-kaggle
python, tensorflow, keras, kaggle
1,763,053,393
se_79865033
stackoverflow
MACHINE_LEARNING
Cant Serialize and Deserialize ViT in Keras When Setting Classification = True
Cant Serialize and Deserialize ViT in Keras When Setting Classification = True I have created ViT as follows: @keras.utils.register_keras_serializable(package="ViT", name="ViT") class ViT(keras.Model): """ Vision Transformer (ViT), based on: "Dosovitskiy et al., An Image is Worth 16x16 Words: Transformers...
https://stackoverflow.com/questions/79865033/cant-serialize-and-deserialize-vit-in-keras-when-setting-classification-true
python, tensorflow, keras
1,768,057,183
se_79866087
stackoverflow
MACHINE_LEARNING
Tensorflow C API: First TF_SessionPRun() complains &quot;Local rendezvous is aborting with status: CANCELLED: PRun cancellation&quot; and subsequent calls fail
Tensorflow C API: First TF_SessionPRun() complains &quot;Local rendezvous is aborting with status: CANCELLED: PRun cancellation&quot; and subsequent calls fail I am trying to use TF_SessionPRun() from Tensorflow C API. I want to do consecutive calculations over a period of time. I do not have all the data available at...
https://stackoverflow.com/questions/79866087/tensorflow-c-api-first-tf-sessionprun-complains-local-rendezvous-is-aborting
c, tensorflow, session, partial
1,768,217,565
se_79857944
stackoverflow
MACHINE_LEARNING
How to serialize and deserialize a Keras Layer when a submodule is passed as a class
How to serialize and deserialize a Keras Layer when a submodule is passed as a class I’m implementing a 3D U-Net in TensorFlow/Keras. I have a custom Encoder layer which takes a basic_module argument. This argument is a class that inherits from keras.layers.Layer (e.g., DoubleConv or ResNetBlock) and is instantiated i...
https://stackoverflow.com/questions/79857944/how-to-serialize-and-deserialize-a-keras-layer-when-a-submodule-is-passed-as-a-c
python, tensorflow, keras
1,767,152,209
se_79862631
stackoverflow
MACHINE_LEARNING
Problem with DWT3D with Custom Keras Layer
Problem with DWT3D with Custom Keras Layer I'm trying to integrate the TFDWT library's DWT3D layer into a custom Keras layer. import tensorflow as tf import keras from TFDWT.DWT3DFB import DWT3D class DWTLayer(keras.layers.Layer): def __init__(self, **kwargs): super().__init__(**kwargs) self.dwt3d...
https://stackoverflow.com/questions/79862631/problem-with-dwt3d-with-custom-keras-layer
python, tensorflow, keras
1,767,805,473
se_79861393
stackoverflow
MACHINE_LEARNING
What is the most reliable face liveness detection model and dataset for real-world mobile apps?
What is the most reliable face liveness detection model and dataset for real-world mobile apps? I’m working on face liveness (anti-spoofing) detection intended for real-world mobile apps (Flutter), and I’m struggling to achieve reliable performance outside controlled datasets. What I’m trying to achieve A production-...
https://stackoverflow.com/questions/79861393/what-is-the-most-reliable-face-liveness-detection-model-and-dataset-for-real-wor
python, android, tensorflow, machine-learning, computer-vision
1,767,683,894
se_79325528
stackoverflow
MACHINE_LEARNING
How to supply sample weights to Tensorflow dataset in R
How to supply sample weights to Tensorflow dataset in R I am trying to set up a dataset in R to run a neural network using TensorFlow, but I can't seem to figure out the right code to allow sample weights to be specified. The input array is image_data and is of shape [200000, 50, 50, 3]. The output array is label_data...
https://stackoverflow.com/questions/79325528/how-to-supply-sample-weights-to-tensorflow-dataset-in-r
r, tensorflow, dataset, sample, weighted
1,735,880,247
se_79860774
stackoverflow
MACHINE_LEARNING
How does TensorFlow handle backpropagation through mixed real and complex functions?
How does TensorFlow handle backpropagation through mixed real and complex functions? I'm training an end-to-end communication system using TensorFlow and Sionna that involves multiple functions with mixed real and complex domains. My system pipeline look something like this: import tensorflow as tf # input: real-valu...
https://stackoverflow.com/questions/79860774/how-does-tensorflow-handle-backpropagation-through-mixed-real-and-complex-functi
python, tensorflow, backpropagation, automatic-differentiation
1,767,616,866
se_79859979
stackoverflow
MACHINE_LEARNING
Keras Conv3D input shape clarification: spatial dimensions vs width/height/depth
Keras Conv3D input shape clarification: spatial dimensions vs width/height/depth I'm trying to use Conv3D in Keras and the documentation is a bit confusing regarding the input shape. The Conv3D docs say: This layer creates a convolution kernel that is convolved with the layer input over a 3D spatial (or temporal) dim...
https://stackoverflow.com/questions/79859979/keras-conv3d-input-shape-clarification-spatial-dimensions-vs-width-height-depth
python, tensorflow, keras
1,767,495,610
se_78879990
stackoverflow
MACHINE_LEARNING
ImportError: cannot import name &#39;runtime_version&#39; from &#39;google.protobuf&#39; in TensorFlow Object Detection API
ImportError: cannot import name &#39;runtime_version&#39; from &#39;google.protobuf&#39; in TensorFlow Object Detection API I'm encountering an ImportError when trying to run the TensorFlow Object Detection API's test script. The error message is: (tfod) dev@dev:/media/dev/96E0A5D3E0A5BA3F/tfod/models/research$ python...
https://stackoverflow.com/questions/78879990/importerror-cannot-import-name-runtime-version-from-google-protobuf-in-tens
python, tensorflow, protocol-buffers, importerror, object-detection-api
1,723,824,536
se_78688232
stackoverflow
MACHINE_LEARNING
Is there any way to speed up the prediction of a model?
Is there any way to speed up the prediction of a model? We are currently building Neural Network using keras and tensorflow for evaluating chess positions. And we have encountered the problem with speed of prediction on a single sample, which is used in our search tree. The usage in the search tree is to check for leg...
https://stackoverflow.com/questions/78688232/is-there-any-way-to-speed-up-the-prediction-of-a-model
python, tensorflow, keras, neural-network, chess
1,719,741,440
se_34199233
stackoverflow
MACHINE_LEARNING
How can I prevent TensorFlow from allocating the totality of a GPU memory?
How can I prevent TensorFlow from allocating the totality of a GPU memory? I work in an environment in which computational resources are shared, i.e., we have a few server machines equipped with a few Nvidia Titan X GPUs each. For small to moderate size models, the 12 GB of the Titan X is usually enough for 2–3 people...
https://stackoverflow.com/questions/34199233/how-can-i-prevent-tensorflow-from-allocating-the-totality-of-a-gpu-memory
python, tensorflow, tensorflow2.0, nvidia-titan
1,449,742,791
se_33633370
stackoverflow
MACHINE_LEARNING
How can I print the value of a Tensor object in TensorFlow?
How can I print the value of a Tensor object in TensorFlow? I have been using the introductory example of matrix multiplication in TensorFlow. matrix1 = tf.constant([[3., 3.]]) matrix2 = tf.constant([[2.],[2.]]) product = tf.matmul(matrix1, matrix2) When I print the product, it is displaying it as a Tensor object: <t...
https://stackoverflow.com/questions/33633370/how-can-i-print-the-value-of-a-tensor-object-in-tensorflow
python, tensorflow, tensor
1,447,168,798
se_79852347
stackoverflow
MACHINE_LEARNING
How can AUC be correctly used with a softmax output, sparse integer labels and categorical_crossentropy for binary classification in Keras?
How can AUC be correctly used with a softmax output, sparse integer labels and categorical_crossentropy for binary classification in Keras? I am working on a binary image classification task using TensorFlow/Keras (TensorFlow version: 2.19.0). My model architecture is a multimodal setup with two input branches (CT and...
https://stackoverflow.com/questions/79852347/how-can-auc-be-correctly-used-with-a-softmax-output-sparse-integer-labels-and-c
python, tensorflow, machine-learning, keras, transfer-learning
1,766,334,938
se_58745778
stackoverflow
MACHINE_LEARNING
Why does model.fit require two-dimensional tensors? And why does model.predict not accept scalar tensors?
Why does model.fit require two-dimensional tensors? And why does model.predict not accept scalar tensors? I was learning TensorFlow.js when I noticed that model.fit has to take in two arguments, input and output, and some configurations. But the inputs were two-dimensional tensors that were written as follows: let in...
https://stackoverflow.com/questions/58745778/why-does-model-fit-require-two-dimensional-tensors-and-why-does-model-predict-n
tensorflow, multidimensional-array, tensor, tensorflow.js
1,573,119,418
se_79855982
stackoverflow
MACHINE_LEARNING
Is my use of tf.distribute.MirroredStrategy and strategy.scope() correct and safe for multi-GPU training in Keras?
Is my use of tf.distribute.MirroredStrategy and strategy.scope() correct and safe for multi-GPU training in Keras? I am training a model using Keras + TensorFlow with tf.distribute.MirroredStrategy on a multi-GPU setup. I would like to verify that I am using strategy.scope() correctly. import time import logging impo...
https://stackoverflow.com/questions/79855982/is-my-use-of-tf-distribute-mirroredstrategy-and-strategy-scope-correct-and-saf
python, tensorflow, keras, deep-learning
1,766,874,442
se_79851506
stackoverflow
MACHINE_LEARNING
Cannot install Tensorflow GPU on Win 11
Cannot install Tensorflow GPU on Win 11 i was training AI in my pc using tensorflow with CPU due i have a amd GPU, well i bought a Nvidia RTX 5060 TI 16GB and i couldn't make it work. First, i made a new environment with anaconda, installed tensorflow, matplolib, opencv, notebook, numpy normally, also installed cudato...
https://stackoverflow.com/questions/79851506/cannot-install-tensorflow-gpu-on-win-11
python, tensorflow, cuda, anaconda
1,766,187,747
se_56969703
stackoverflow
MACHINE_LEARNING
How to use `tf.scatter_nd` with multi-dimensional tensors
How to use `tf.scatter_nd` with multi-dimensional tensors I'm trying to create a new tensor (output) with the values of another tensor (updates) placed according to the idx tensor. The shape of output should be [batch_size, 1, 4, 4] (like an image of 2x2 pixels and one channel), and update has shape [batch_size, 3]. I...
https://stackoverflow.com/questions/56969703/how-to-use-tf-scatter-nd-with-multi-dimensional-tensors
python, tensorflow, keras
1,562,757,901
se_79852884
stackoverflow
MACHINE_LEARNING
How to dynamically estimate maximum number of cameras my GPU can handle for YOLOv8 inference?
How to dynamically estimate maximum number of cameras my GPU can handle for YOLOv8 inference? I’m trying to simulate multiple camera streams feeding into a YOLOv8l model on a single GPU and monitor real-time hardware utilization. My setup: Single GPU (48GB VRAM, CUDA-enabled) YOLOv8l model Simulating N cameras with...
https://stackoverflow.com/questions/79852884/how-to-dynamically-estimate-maximum-number-of-cameras-my-gpu-can-handle-for-yolo
python, tensorflow, deep-learning, pytorch, nvidia
1,766,406,199
se_40755610
stackoverflow
MACHINE_LEARNING
IOError: [Errno 28] No space left on device while installing TensorFlow
IOError: [Errno 28] No space left on device while installing TensorFlow I am trying to install TensorFlow in my local directory using the following command. export TF_BINARY_URL=http://storage.googleapis.com/tensorflow/linux/cpu/tensorflow-0.11.0-cp27-none-linux_x86_64.whl pip install --install-option="--prefix=$PYTH...
https://stackoverflow.com/questions/40755610/ioerror-errno-28-no-space-left-on-device-while-installing-tensorflow
python, linux, python-2.7, pip, tensorflow
1,479,872,363
se_78365339
stackoverflow
MACHINE_LEARNING
Arguments `target` and `output` must have the same rank (ndim)
Arguments `target` and `output` must have the same rank (ndim) i'm working with a multioutput tensorflow model, just for learning purposes, that should output 1 numerical and 1 categorical data (6 classes). everything seems to be fine, well-defined, but when i fit the model it errors saying "ValueError: Arguments targ...
https://stackoverflow.com/questions/78365339/arguments-target-and-output-must-have-the-same-rank-ndim
python, tensorflow
1,713,779,403
se_60609585
stackoverflow
MACHINE_LEARNING
Good performance with Accuracy but not with Dice loss in Image Segmentation
Good performance with Accuracy but not with Dice loss in Image Segmentation I'm doing image segmentation with U-Net like architecture on Tensorflow w/Keras but I'm new in Deep Learning. I've got this dataset with the following set shapes: Train : X : (175250, 30, 30, 6) Y: (175250, 30, 30) Validation: X: (29200, 30,...
https://stackoverflow.com/questions/60609585/good-performance-with-accuracy-but-not-with-dice-loss-in-image-segmentation
python, tensorflow, deep-learning, conv-neural-network, tf.keras
1,583,795,952
se_79818788
stackoverflow
MACHINE_LEARNING
Why does TFLite INT8 quantization decompose BatchMatMul (from Einsum) into many FullyConnected layers?
Why does TFLite INT8 quantization decompose BatchMatMul (from Einsum) into many FullyConnected layers? I’m debugging a model conversion using onnx2tf and post-training quantization issue involving Einsum, BatchMatMul, and FullyConnected layers across different model formats. Pipeline: ONNX → TF SavedModel → TFLite (fl...
https://stackoverflow.com/questions/79818788/why-does-tflite-int8-quantization-decompose-batchmatmul-from-einsum-into-many
tensorflow, onnx, quantization, tflite, einsum
1,763,033,189
se_41455101
stackoverflow
MACHINE_LEARNING
What is the meaning of the word logits in TensorFlow?
What is the meaning of the word logits in TensorFlow? In the following TensorFlow function, we must feed the activation of artificial neurons in the final layer. That I understand. But I don't understand why it is called logits? Isn't that a mathematical function? loss_function = tf.nn.softmax_cross_entropy_with_log...
https://stackoverflow.com/questions/41455101/what-is-the-meaning-of-the-word-logits-in-tensorflow
tensorflow, machine-learning, neural-network, deep-learning, cross-entropy
1,483,495,351