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_79364440
stackoverflow
MACHINE_LEARNING
How to achieve unequal stride of dw-conv with equal stride dw-conv?
How to achieve unequal stride of dw-conv with equal stride dw-conv? Seems like unequal height and width of stride in tf.nn.depthwise_conv is not supported. Can I do that in form of equal stride with any other layer operations?
https://stackoverflow.com/questions/79364440/how-to-achieve-unequal-stride-of-dw-conv-with-equal-stride-dw-conv
python, tensorflow, deep-learning
1,737,109,690
se_68069190
stackoverflow
MACHINE_LEARNING
Nightmare of installing and running Tensorflow in R Studio on windows 10
Nightmare of installing and running Tensorflow in R Studio on windows 10 Please, I have been having trouble for weeks now trying to install and run tensorflow and keras in R Studio. I have tried everything I can find online to no avail. I have anaconda installed on my system, do I need to uninstall it? After running t...
https://stackoverflow.com/questions/68069190/nightmare-of-installing-and-running-tensorflow-in-r-studio-on-windows-10
python, r, windows, tensorflow
1,624,283,609
se_79312550
stackoverflow
MACHINE_LEARNING
Stable baselines 3 not generating tensorfiles for ppo, sac and td3
Stable baselines 3 not generating tensorfiles for ppo, sac and td3 I am comparing a2c, dqn and ppo models. I need to have tensorboard graphs to show my teacher. The tensorboard only collect data for the a2cmodel, when using it for ppo, sac or td3 it creates the event file but doesn't add any info into it. The code for...
https://stackoverflow.com/questions/79312550/stable-baselines-3-not-generating-tensorfiles-for-ppo-sac-and-td3
python, tensorflow, reinforcement-learning, stable-baselines, stablebaseline3
1,735,324,139
se_79355478
stackoverflow
MACHINE_LEARNING
I have a problem throws errors about import tensorflow
I have a problem throws errors about import tensorflow I have a problem throws errors about import tensorflow. I think it's a cascading problem about importing modules (in fact, I reinstalled several versions of Python to build a TensorFlow environment on Windows 11 without utilizing Anaconda). I looked at all the fil...
https://stackoverflow.com/questions/79355478/i-have-a-problem-throws-errors-about-import-tensorflow
tensorflow, import
1,736,868,026
se_78815477
stackoverflow
MACHINE_LEARNING
Colab disconnecting when extracting dataset
Colab disconnecting when extracting dataset # Get TensorFlow Datasets import tensorflow_datasets as tfds datasets_list = tfds.list_builders() # get all available datasets in TFDS print("food101" in datasets_list) # is the dataset we're after available? (train_data, test_data), ds_info = tfds.load(name="food101", # ta...
https://stackoverflow.com/questions/78815477/colab-disconnecting-when-extracting-dataset
python, tensorflow, tensorflow2.0, google-cloud-colab-enterprise
1,722,417,633
se_56122670
stackoverflow
MACHINE_LEARNING
how to get string value out of tf.tensor which dtype is string
how to get string value out of tf.tensor which dtype is string I want to use tf.data.Dataset.list_files function to feed my datasets. But because the file is not image, I need to load it manually. The problem is tf.data.Dataset.list_files pass variable as tf.tensor and my python code can not handle tensor. How can I...
https://stackoverflow.com/questions/56122670/how-to-get-string-value-out-of-tf-tensor-which-dtype-is-string
python, tensorflow, tensorflow-datasets
1,557,805,055
se_79348640
stackoverflow
MACHINE_LEARNING
How to predict list elements outside the bounds of a py dataframe?
How to predict list elements outside the bounds of a py dataframe? I built a model based on LSTM and trained it to predict stock price changes during the day, where the unit of time is one second. The test data gives a result comparable to the real one, but I need to get a forecast for the future outside the existing ...
https://stackoverflow.com/questions/79348640/how-to-predict-list-elements-outside-the-bounds-of-a-py-dataframe
python, pandas, dataframe, tensorflow, keras
1,736,619,552
se_79362372
stackoverflow
MACHINE_LEARNING
TensorFlow: no trainable weights
TensorFlow: no trainable weights I have a working nb on Colab notebook which shows a problem using TF bijector with Keras Layer. Long time ago I was using log_prob_ = trainable_distribution.log_prob(x_) but now the system told me that I must wrap the TF function in a class inherited from Keras Layer. As one can see ...
https://stackoverflow.com/questions/79362372/tensorflow-no-trainable-weights
tensorflow, keras
1,737,044,708
se_79355369
stackoverflow
MACHINE_LEARNING
Why does the saved tf.dataset have length but no content?
Why does the saved tf.dataset have length but no content? this is my first question. Please be nice. If I posted in the wrong category, please correct me. The following problem is driving me crazy: Roughly: I load a data set (here: MNIST) from a local folder structure with image_dataset_from_directory. Now I want to s...
https://stackoverflow.com/questions/79355369/why-does-the-saved-tf-dataset-have-length-but-no-content
python, tensorflow, keras, filter, tf.data.dataset
1,736,865,432
se_79349215
stackoverflow
MACHINE_LEARNING
Load model from model.weights.h5 file stored in Azure Blob
Load model from model.weights.h5 file stored in Azure Blob I am trying to load my model from file I saved in Azure blob storage. This is the function that downloads the file to my local machine: def download_weights_to_temp_file(): """ Downloads the model weights from Azure Blob Storage to a temporary file. ...
https://stackoverflow.com/questions/79349215/load-model-from-model-weights-h5-file-stored-in-azure-blob
azure, tensorflow, model
1,736,646,697
se_79360184
stackoverflow
MACHINE_LEARNING
How to design a stable deep learning network that satisfies linearity (e.g., f(x+y) = f(x) + f(y))
How to design a stable deep learning network that satisfies linearity (e.g., f(x+y) = f(x) + f(y)) I am trying to design a deep learning network where a neural network f satisfies the linearity condition: f(x+y) = f(x) + f(y) for datasets x and y. When I design f using only fully connected layers (FCNs), I can achie...
https://stackoverflow.com/questions/79360184/how-to-design-a-stable-deep-learning-network-that-satisfies-linearity-e-g-fx
python, tensorflow, deep-learning, normalization
1,736,993,001
se_78937725
stackoverflow
MACHINE_LEARNING
E tensorflow/core/grappler/optimizers/meta_optimizer.cc:961] remapper failed
E tensorflow/core/grappler/optimizers/meta_optimizer.cc:961] remapper failed I have saved my trained Keras model as a PB file using Python 3.12.5 and TensorFlow 2.17.0. The model is to be deployed for inference in my C++ software. For this, I am using the TensorFlow for C library 2.15.0 as a DLL for Windows. When I lo...
https://stackoverflow.com/questions/78937725/e-tensorflow-core-grappler-optimizers-meta-optimizer-cc961-remapper-failed
tensorflow
1,725,204,864
se_76808529
stackoverflow
MACHINE_LEARNING
Having an error when installing Scann on Google Colab
Having an error when installing Scann on Google Colab I installed scann on colab with code !pip uninstall protobuf>=3.20.3 but I had a error like that: "ERROR: pip's dependency resolver does not currently take into account all the packages that are installed. This behaviour is the source of the following dependency co...
https://stackoverflow.com/questions/76808529/having-an-error-when-installing-scann-on-google-colab
tensorflow, google-colaboratory, retrieve-and-rank, protobuf-python, scann
1,690,864,534
se_44277365
stackoverflow
MACHINE_LEARNING
the number and the name of the event files in tensorflow?
the number and the name of the event files in tensorflow? tf.summary.FileWriter(logdir, sess.graph) I found that there are more than one event file in logdir. Why? I think it should be one. what is the meaning of the name, ie:'events.out.tfevents.1496202271.host-name'. What is the meaning of '1496202271' in it. ...
https://stackoverflow.com/questions/44277365/the-number-and-the-name-of-the-event-files-in-tensorflow
tensorflow, tensorboard
1,496,212,584
se_72679640
stackoverflow
MACHINE_LEARNING
Can I use a tensorflowjs model in Python?
Can I use a tensorflowjs model in Python? I am not really a tensorflow expert. I have been using it with provided models and code, played around a bit and am trying to get better with it. I got a hold of a model that I'd like to play around with in the form of a tensorflowjs model (?). It is in the form a model.json w...
https://stackoverflow.com/questions/72679640/can-i-use-a-tensorflowjs-model-in-python
python, tensorflow, tensorflow.js, tensorflowjs-converter
1,655,665,598
se_67916283
stackoverflow
MACHINE_LEARNING
Deeplearning with Python Tensorflow,Keras
Deeplearning with Python Tensorflow,Keras I am writing masters thesis about deeplearning and have a problem probably about library. Below is the error: AttributeError: module 'tensorflow.compat.v2' has no attribute '__internal__' Model: import tensorflow from tensorflow import keras from keras import models fr...
https://stackoverflow.com/questions/67916283/deeplearning-with-python-tensorflow-keras
python, tensorflow, keras
1,623,308,696
se_79353600
stackoverflow
MACHINE_LEARNING
Receiving value error: The layer sequential_n has never been called and thus has no defined input
Receiving value error: The layer sequential_n has never been called and thus has no defined input I am running this code: import numpy as np import keras import tensorflow as tf tf.compat.v1.logging.set_verbosity(tf.compat.v1.logging.ERROR) from keras.models import Sequential, Model from keras.layers import Conv2D, Ac...
https://stackoverflow.com/questions/79353600/receiving-value-error-the-layer-sequential-n-has-never-been-called-and-thus-has
python, tensorflow, keras
1,736,807,991
se_79351549
stackoverflow
MACHINE_LEARNING
ValueError: Could not interpret optimizer identifier: <keras.src.optimizers.adam.Adam object at 0x336f637d0>
ValueError: Could not interpret optimizer identifier: &lt;keras.src.optimizers.adam.Adam object at 0x336f637d0&gt; I am trying to use PolynomialDecay to handle learning rate in Adam optimizer in fine tuning a transformer model. But I am getting this error : "ValueError: Could not interpret optimizer identifier: <kera...
https://stackoverflow.com/questions/79351549/valueerror-could-not-interpret-optimizer-identifier-keras-src-optimizers-adam
python-3.x, tensorflow, keras, huggingface-transformers, fine-tuning
1,736,756,584
se_79351517
stackoverflow
MACHINE_LEARNING
Data Loader from CSV in TensorFlow Model Maker takes time too long
Data Loader from CSV in TensorFlow Model Maker takes time too long I've been working for Object Detection using Tensorflow Model Maker. I used DataLoader.from_csv to load my csv file, however the running time takes too long. In my case, I got around 30 minutes. My data proportion are like this: In image file level: 6...
https://stackoverflow.com/questions/79351517/data-loader-from-csv-in-tensorflow-model-maker-takes-time-too-long
python, csv, tensorflow, object-detection
1,736,755,800
se_79351459
stackoverflow
MACHINE_LEARNING
Segmentation Fault During Validation with MirroredStrategy on Multiple GPUs
Segmentation Fault During Validation with MirroredStrategy on Multiple GPUs I am training a model using TensorFlow 2.18.0 with the tf.distribute.MirroredStrategy across two GPUs. The training works fine on a single GPU, but when I try to run it on two GPUs, it ends with a segmentation fault during validation. Here is ...
https://stackoverflow.com/questions/79351459/segmentation-fault-during-validation-with-mirroredstrategy-on-multiple-gpus
python, tensorflow, keras, distributed-computing
1,736,754,131
se_72129213
stackoverflow
MACHINE_LEARNING
Using GPU in VS code container
Using GPU in VS code container I want to use a GPU inside a Visual Studio Code docker container to train model with TensorFlow. To build an image for my container I use next Dockerfile: FROM mcr.microsoft.com/vscode/devcontainers/anaconda:0-3 ARG PROJECT_NAME=fire_rec ARG NODE_VERSION="none" RUN if [ "${NODE_VERSIO...
https://stackoverflow.com/questions/72129213/using-gpu-in-vs-code-container
python, docker, tensorflow, visual-studio-code
1,651,762,144
se_73410090
stackoverflow
MACHINE_LEARNING
Very low validation accuracy but high training accuracy
Very low validation accuracy but high training accuracy I copied some sample code straight from Keras official website and edited it to make a machine learning model. I am using Google Colab for my code. Link: https://keras.io/examples/vision/image_classification_from_scratch/ import tensorflow as tf from tensorflow i...
https://stackoverflow.com/questions/73410090/very-low-validation-accuracy-but-high-training-accuracy
python, tensorflow, machine-learning, keras
1,660,861,945
se_62517612
stackoverflow
MACHINE_LEARNING
Meaning of sparse in &quot;sparse cross entropy loss&quot;?
Meaning of sparse in &quot;sparse cross entropy loss&quot;? I read from the documentation: tf.keras.losses.SparseCategoricalCrossentropy( from_logits=False, reduction="auto", name="sparse_categorical_crossentropy" ) Computes the crossentropy loss between the labels and predictions. Use this crossentropy loss fun...
https://stackoverflow.com/questions/62517612/meaning-of-sparse-in-sparse-cross-entropy-loss
tensorflow, keras, cross-entropy
1,592,838,677
se_71676507
stackoverflow
MACHINE_LEARNING
Error , Unsuccessful TensorSliceReader constructor: Failed to find any matching files for ram to unpickle a file
Error , Unsuccessful TensorSliceReader constructor: Failed to find any matching files for ram to unpickle a file I am running into this error , i can't unpickle a file on my jupyter notebook: import os import pickle import joblib import pandas as pd from sklearn.preprocessing import MinMaxScaler filename = open("loan...
https://stackoverflow.com/questions/71676507/error-unsuccessful-tensorslicereader-constructor-failed-to-find-any-matching
python, tensorflow, scikit-learn, pickle, joblib
1,648,640,248
se_79341305
stackoverflow
MACHINE_LEARNING
How do I clone batches in Keras?
How do I clone batches in Keras? I am trying to clone a batch intermediately. For example my input has shape (2,3) where 2 is batch-size. But I wish to create clones of this batch between Keras layers such that the new batch shape is (6,3) with the batch of size 2 repeated 3 times. Finally I wish to also reshape the n...
https://stackoverflow.com/questions/79341305/how-do-i-clone-batches-in-keras
tensorflow, keras
1,736,393,309
se_48051670
stackoverflow
MACHINE_LEARNING
Training Resnet deep neural network from scratch
Training Resnet deep neural network from scratch I need to gain some knowledge about deep neural networks. For a 'ResNet' very deep neural network, we can use transfer learning to train a model. But Resnet has been trained over the ImageNet dataset. So their pre-trained weights can be used to train the model with an...
https://stackoverflow.com/questions/48051670/training-resnet-deep-neural-network-from-scratch
tensorflow, neural-network, keras, conv-neural-network, resnet
1,514,826,970
se_60313903
stackoverflow
MACHINE_LEARNING
Pre pulling docker images in AMI to reduce node and pod fresh start time slows down it&#39;s execution when using nvidia-docker with GPU enabled pods
Pre pulling docker images in AMI to reduce node and pod fresh start time slows down it&#39;s execution when using nvidia-docker with GPU enabled pods Using Kubernetes v1.16 on AWS I am facing a weird issue while trying to reduce the time it takes to start a pod on a newly spawned node. By default, a node AMI does not...
https://stackoverflow.com/questions/60313903/pre-pulling-docker-images-in-ami-to-reduce-node-and-pod-fresh-start-time-slows-d
amazon-web-services, docker, tensorflow, kubernetes, amazon-ami
1,582,179,368
se_69522280
stackoverflow
MACHINE_LEARNING
Kernel Density Estimation (KDE) implementation in pytorch or tensorflow
Kernel Density Estimation (KDE) implementation in pytorch or tensorflow I found an implementation of the Kernel density estimation in scikit-learn as: from sklearn.neighbors import KernelDensity kde = KernelDensity(bandwidth=1.0, kernel='gaussian') kde.fit(x[:, None]) logprob = kde.score_samples(x_d[:, None]) The pro...
https://stackoverflow.com/questions/69522280/kernel-density-estimation-kde-implementation-in-pytorch-or-tensorflow
python, tensorflow, scikit-learn, pytorch
1,633,936,128
se_60393011
stackoverflow
MACHINE_LEARNING
Error --accelerator unrecognized argument when launching gcloud beta ai-platform versions create API
Error --accelerator unrecognized argument when launching gcloud beta ai-platform versions create API I would like to deploy my Tensorflow model on a Google AI Platform machine. I already have a working version on a legacy machine mls1-c4-m2. Now I would like to make the prediction faster and use a n1-standard-4 machin...
https://stackoverflow.com/questions/60393011/error-accelerator-unrecognized-argument-when-launching-gcloud-beta-ai-platform
tensorflow, deployment, google-cloud-platform
1,582,628,198
se_79340626
stackoverflow
MACHINE_LEARNING
How does the Conv2D method filter the featuremaps outputted by another Conv2D layer?
How does the Conv2D method filter the featuremaps outputted by another Conv2D layer? I am not understanding how the 20 filters of the second Conv2D layer filters the 10 feature maps outputted by the first Conv2D layer. Are each of the 20 filters filtering each of the 10 featuremaps (outputted from the first Conv2D lay...
https://stackoverflow.com/questions/79340626/how-does-the-conv2d-method-filter-the-featuremaps-outputted-by-another-conv2d-la
python, tensorflow, conv-neural-network
1,736,366,685
se_67450580
stackoverflow
MACHINE_LEARNING
Change the threshold value of the keras RELU activation function
Change the threshold value of the keras RELU activation function I am trying to change the threshold value of the activation function Relu while building my neural network. So, the initial code was the one written below where the default value of the relu threshold is 0. model = Sequential([ Dense(n_inputs, input_...
https://stackoverflow.com/questions/67450580/change-the-threshold-value-of-the-keras-relu-activation-function
python, tensorflow, keras, neural-network, relu
1,620,496,613
se_61783826
stackoverflow
MACHINE_LEARNING
How to implement tf.gather_nd in Pytorch with the argument batch_dims?
How to implement tf.gather_nd in Pytorch with the argument batch_dims? I have been doing a project on image matching, so I need to find correspondences between 2 images. To get descriptors, I will need a interpolate function. However, when I read about a equivalent function which is done in Tensorflow, I still don’t g...
https://stackoverflow.com/questions/61783826/how-to-implement-tf-gather-nd-in-pytorch-with-the-argument-batch-dims
tensorflow, computer-vision, pytorch
1,589,400,237
se_71316443
stackoverflow
MACHINE_LEARNING
Google Colab error: Import &quot;tensorflow.keras.models&quot; could not be resolved(reportMissingImports)
Google Colab error: Import &quot;tensorflow.keras.models&quot; could not be resolved(reportMissingImports) import tensorflow as tf tf.__version__ !sudo pip3 install keras from tensorflow.keras.models import Sequential from tensorflow.keras.layers import Dense, Conv2D, Flatten, Dropout, MaxPooling2D from tensorflow.k...
https://stackoverflow.com/questions/71316443/google-colab-error-import-tensorflow-keras-models-could-not-be-resolvedrepor
python, tensorflow, keras
1,646,184,317
se_65934634
stackoverflow
MACHINE_LEARNING
Pipenv fails locking when installing TensorFlow 2.4.1
Pipenv fails locking when installing TensorFlow 2.4.1 2021-02-06: I ended up with installing TensorFlow using pip. The original question is shown below. As I mentioned in the title, pipenv fails to lock when installing TensorFlow (ver. 2.4.1). I would like to know the solution for this problem. The current environment...
https://stackoverflow.com/questions/65934634/pipenv-fails-locking-when-installing-tensorflow-2-4-1
python, tensorflow, pipenv
1,611,827,381
se_60620596
stackoverflow
MACHINE_LEARNING
Enhance a Machin Learning model for periodic data
Enhance a Machin Learning model for periodic data I am learning ML through TensorFlow (tfjs). My first test was to train my model to predict cos(x) as a function of x (from 0 to 2*Math.PI*4 aka 4 periods) feature: 2000 values of x (random) label: 2000 values of cos(x) model: const model = tf.sequential({ laye...
https://stackoverflow.com/questions/60620596/enhance-a-machin-learning-model-for-periodic-data
tensorflow, machine-learning, keras, tfjs-node
1,583,853,438
se_78195273
stackoverflow
MACHINE_LEARNING
Use Keras_cv for object detection with GPU on Windows
Use Keras_cv for object detection with GPU on Windows I am using keras_cv to create an object detection with yolov8. I've built the model with pretrained weights and a pretrained backbone directly from keras_cv. I also use methods like resizing from keras_cv. Overall with my current implementation I heavily rely on ke...
https://stackoverflow.com/questions/78195273/use-keras-cv-for-object-detection-with-gpu-on-windows
python, windows, tensorflow, keras, yolov8
1,710,955,829
se_76702297
stackoverflow
MACHINE_LEARNING
Recognize text in a PDF file rotated at any angle
Recognize text in a PDF file rotated at any angle I have a simple program (code from the documentation of the docTR library) that recognizes text in a pdf file. If the text is perfectly aligned, then there are no problems with text recognition, but if the document is rotated to the right or left, then problems begin w...
https://stackoverflow.com/questions/76702297/recognize-text-in-a-pdf-file-rotated-at-any-angle
python, tensorflow, ocr, doctr
1,689,578,795
se_79330224
stackoverflow
MACHINE_LEARNING
Mismatch in shapes of Input and Prediction in Tensorflow
Mismatch in shapes of Input and Prediction in Tensorflow I am compiling the Tensorflow model thusly: model = tf.keras.Sequential() model.add( tf.keras.layers.InputLayer(shape=(2,)) ) model.add( tf.keras.layers.Dense(1024) ) model.add( tf.keras.layers.Dense(1024) ) model.add( tf.keras.layers.Dense(units=1) ) model.com...
https://stackoverflow.com/questions/79330224/mismatch-in-shapes-of-input-and-prediction-in-tensorflow
python, tensorflow
1,736,053,617
se_65097396
stackoverflow
MACHINE_LEARNING
Difference between &quot;compute capability&quot; &quot;cuda architecture&quot; clarification for using Tensorflow v2.3.0
Difference between &quot;compute capability&quot; &quot;cuda architecture&quot; clarification for using Tensorflow v2.3.0 I would like please the difference between "Compute Capability" used by NVidia at https://developer.nvidia.com/cuda-gpus and "CUDA architecture for by Tensorflow at https://www.tensorflow.org/insta...
https://stackoverflow.com/questions/65097396/difference-between-compute-capability-cuda-architecture-clarification-for-us
tensorflow, architecture, cuda
1,606,851,648
se_65957329
stackoverflow
MACHINE_LEARNING
problem with importing @tensorflow/tfjs-node while working with face-api.js package (node.js)
problem with importing @tensorflow/tfjs-node while working with face-api.js package (node.js) I use @tensorflow/tfjs-node package for face-api.js package to speed up things (as they said) that is my code: // import nodejs bindings to native tensorflow, // not required, but will speed up things drastically (python requ...
https://stackoverflow.com/questions/65957329/problem-with-importing-tensorflow-tfjs-node-while-working-with-face-api-js-pack
javascript, node.js, tensorflow, face-recognition, face-api
1,611,934,263
se_49484066
stackoverflow
MACHINE_LEARNING
Tensorflow Object Detection API does not detect objects correctly/does not detect objects at all
Tensorflow Object Detection API does not detect objects correctly/does not detect objects at all I have followed the entire steps/format of codes(cross checked multiple times to be 100% sure they are correct) and the required data for training custom objects on Tensorflow Object Detection API. I tried using ssd_mobile...
https://stackoverflow.com/questions/49484066/tensorflow-object-detection-api-does-not-detect-objects-correctly-does-not-detec
python, tensorflow, object-detection-api
1,522,038,989
se_58230074
stackoverflow
MACHINE_LEARNING
How to optimize multiple loss functions separately in Keras?
How to optimize multiple loss functions separately in Keras? I am currently trying to build a deep learning model with three different loss functions in Keras. The first loss function is the typical mean squared error loss. The other two loss functions are the ones I built myself, which finds the difference between a ...
https://stackoverflow.com/questions/58230074/how-to-optimize-multiple-loss-functions-separately-in-keras
python, tensorflow, keras
1,570,164,527
se_55977210
stackoverflow
MACHINE_LEARNING
InvalidArgumentError in Keras custom loss function
InvalidArgumentError in Keras custom loss function I was following the answer to the question below in order to build a custom loss function in Keras that considers only the top 20 predictions. How can I sort the values in a custom Keras / Tensorflow Loss Function? However, when I try to compile my model using this co...
https://stackoverflow.com/questions/55977210/invalidargumenterror-in-keras-custom-loss-function
python, tensorflow, keras
1,556,918,140
se_47426764
stackoverflow
MACHINE_LEARNING
Custom Keras Loss Function throws &#39;ValueError None&#39;
Custom Keras Loss Function throws &#39;ValueError None&#39; This custom Keras Loss function: def thresholdLoss (actual, predicted): rel = predicted / safeActual relAbove = tf.greater(rel, 1.50) relBelow = tf.less(rel, .50) isOutsideThresh = tf.logical_or(relAbove, relBelow, name='outsideRange') errCounts = t...
https://stackoverflow.com/questions/47426764/custom-keras-loss-function-throws-valueerror-none
tensorflow, keras
1,511,324,547
se_45111136
stackoverflow
MACHINE_LEARNING
ValueError: Tensor conversion requested dtype float64 for Tensor with dtype float32
ValueError: Tensor conversion requested dtype float64 for Tensor with dtype float32 I have a NN that has two identical CNN (similar to Siamese network), then merges the outputs, and intends to apply a custom loss function on the merged output, something like this: ----------------- ----------------- | inpu...
https://stackoverflow.com/questions/45111136/valueerror-tensor-conversion-requested-dtype-float64-for-tensor-with-dtype-floa
python, tensorflow, machine-learning, keras, loss-function
1,500,064,089
se_68398965
stackoverflow
MACHINE_LEARNING
COCO json annotation to YOLO txt format
COCO json annotation to YOLO txt format how to convert a single COCO JSON annotation file into a YOLO darknet format?? like below each individual image has separate filename.txt file
https://stackoverflow.com/questions/68398965/coco-json-annotation-to-yolo-txt-format
tensorflow, computer-vision, object-detection, yolo, coco
1,626,373,086
se_56199942
stackoverflow
MACHINE_LEARNING
Tensorflow: colocate_with is deprecated and will be removed in a future version
Tensorflow: colocate_with is deprecated and will be removed in a future version I'm working on a text analytics project and encountered this issue. I'm relatively new to this and will need some assistance. WARNING:tensorflow:From /usr/local/lib/python2.7/dist-packages/tensorflow/python/framework/op_def_library.py:26...
https://stackoverflow.com/questions/56199942/tensorflow-colocate-with-is-deprecated-and-will-be-removed-in-a-future-version
tensorflow
1,558,190,249
se_62861773
stackoverflow
MACHINE_LEARNING
Can we use multiple loss functions in same layer?
Can we use multiple loss functions in same layer? Can we use mulitple loss function in this architecture: I have two different type of loss functions and want to use it on last layer [Output] loss functions : binary_crossentropy custom loss function Can we do that?
https://stackoverflow.com/questions/62861773/can-we-use-multiple-loss-functions-in-same-layer
tensorflow, machine-learning, keras, deep-learning, loss-function
1,594,561,071
se_78856312
stackoverflow
MACHINE_LEARNING
tflite model load failed on Android (IsPowerOfTwo(RFFT2D fft_length_data[1]) was not true.)
tflite model load failed on Android (IsPowerOfTwo(RFFT2D fft_length_data[1]) was not true.) to get mfcc features from android. built mfcc model with tf. and I checked works fine. but when I convert it to tflite and try to load it on Android, error comes while loading. error logs. java.lang.IllegalStateException: Inter...
https://stackoverflow.com/questions/78856312/tflite-model-load-failed-on-android-ispoweroftworfft2d-fft-length-data1-was
android, tensorflow, tflite
1,723,301,350
se_67698772
stackoverflow
MACHINE_LEARNING
How to get tensorflow keras to use my GPU?
How to get tensorflow keras to use my GPU? I am trying to use keras in tensorflow to train a CNN network for some image classification. Obviously, the training running on my CPU is incredibly slow and so I need to use my GPU to do the training. I've found many similar questions on StackOverflow, none of which have hel...
https://stackoverflow.com/questions/67698772/how-to-get-tensorflow-keras-to-use-my-gpu
python, tensorflow, tf.keras
1,622,005,309
se_79314326
stackoverflow
MACHINE_LEARNING
Convolutional Neural Network is getting unexpectedly high validation accuracy, what could be causing this?
Convolutional Neural Network is getting unexpectedly high validation accuracy, what could be causing this? I am building/optimizing a CNN for classifcation of cars from this dataset. My baseline model is getting suprisingly high accuracy from a very simple model architecture, I am concerned there is some data leakage ...
https://stackoverflow.com/questions/79314326/convolutional-neural-network-is-getting-unexpectedly-high-validation-accuracy-w
python, tensorflow, conv-neural-network, tensorflow-datasets, image-classification
1,735,409,499
se_79331904
stackoverflow
MACHINE_LEARNING
Running into issue: cannot import name &#39;__version__&#39; from &#39;tensorflow.python.keras&#39;
Running into issue: cannot import name &#39;__version__&#39; from &#39;tensorflow.python.keras&#39; I am trying to save a tensorflow model on Google Colab, but am running into an ImportError issue. I made a test sample code below to see if the issue was due to some other conflicts, but even in the following snippet I ...
https://stackoverflow.com/questions/79331904/running-into-issue-cannot-import-name-version-from-tensorflow-python-ker
python, tensorflow, keras, importerror
1,736,128,692
se_79331871
stackoverflow
MACHINE_LEARNING
Graph disconnected error when loading model in Tensorflow
Graph disconnected error when loading model in Tensorflow I am running a code repository and I got an error message while recreate the model. ValueError: Graph disconnected: cannot obtain value for tensor KerasTensor(type_spec=TensorSpec(shape=(None, 32, 32, 3), dtype=tf.float32, name='resnet50_input'), name='resnet5...
https://stackoverflow.com/questions/79331871/graph-disconnected-error-when-loading-model-in-tensorflow
tensorflow, machine-learning, keras, deep-learning, tensorflow2.0
1,736,127,322
se_79327723
stackoverflow
MACHINE_LEARNING
How Can I Use GPU to Accelerate Image Augmentation?
How Can I Use GPU to Accelerate Image Augmentation? When setting up image augmentation pipelines using keras.layers.Random* or other augmentation or processing methods, we often integrate these pipelines with a data loader, such as the tf.data API, which operates mainly on the CPU. But heavy augmentation operations on...
https://stackoverflow.com/questions/79327723/how-can-i-use-gpu-to-accelerate-image-augmentation
python, tensorflow, keras, pytorch, jax
1,735,939,697
se_61550026
stackoverflow
MACHINE_LEARNING
ValueError: Shapes (None, 1) and (None, 3) are incompatible
ValueError: Shapes (None, 1) and (None, 3) are incompatible I have a 3 dimensional dataset of audio files where X.shape is (329,20,85). I want to have a simpl bare-bones model running, so please don't nitpick and address only the issue at hand. Here is the code: model = tf.keras.models.Sequential() model.add(tf.keras....
https://stackoverflow.com/questions/61550026/valueerror-shapes-none-1-and-none-3-are-incompatible
python, tensorflow, keras
1,588,363,799
se_71984678
stackoverflow
MACHINE_LEARNING
UnimplementedError: Graph execution error: running nn on tensorflow
UnimplementedError: Graph execution error: running nn on tensorflow I have been having this error, and I don't know why, especially since I am following someone's code exactly and the person had no error when running this img_shape = (128,128,3) # load pretrained model base_model = tf.keras.applications.VGG19(input_s...
https://stackoverflow.com/questions/71984678/unimplementederror-graph-execution-error-running-nn-on-tensorflow
tensorflow, keras, deep-learning, gpu, image-classification
1,650,761,079
se_71153492
stackoverflow
MACHINE_LEARNING
Invalid Argument Error / Graph Execution Error
Invalid Argument Error / Graph Execution Error I'm having multiple errors while running this VGG training code (code and errors shown below). I don't know if its because of my dataset or is it something else. import numpy as np import pandas as pd import matplotlib.pyplot as plt import tensorflow as tf from tensorflow...
https://stackoverflow.com/questions/71153492/invalid-argument-error-graph-execution-error
python, tensorflow, keras
1,645,079,879
se_79329675
stackoverflow
MACHINE_LEARNING
Issues with getting Tensorflow to work with RTX 4060 Laptop
Issues with getting Tensorflow to work with RTX 4060 Laptop I am trying to build a CNN model but have noticed that the epoch rates were incredibly slow at 2 seconds per step. I double checked my task manager and noticed that my GPU usage was at 0% and triple checked that Tensorflow was detecting 0 GPUs on the device. ...
https://stackoverflow.com/questions/79329675/issues-with-getting-tensorflow-to-work-with-rtx-4060-laptop
python, tensorflow
1,736,027,650
se_39691902
stackoverflow
MACHINE_LEARNING
Ordering of batch normalization and dropout?
Ordering of batch normalization and dropout? The original question was in regard to TensorFlow implementations specifically. However, the answers are for implementations in general. This general answer is also the correct answer for TensorFlow. When using batch normalization and dropout in TensorFlow (specifically us...
https://stackoverflow.com/questions/39691902/ordering-of-batch-normalization-and-dropout
python, neural-network, tensorflow, conv-neural-network
1,474,837,943
se_65401712
stackoverflow
MACHINE_LEARNING
Tensorflow - Nodegyp failed to build even if it is installed
Tensorflow - Nodegyp failed to build even if it is installed I am trying to setup TensorFlow for a demo application however I have some problems building it i get the following error whenever I npm install @tensorflow/tfjs-node : CPU-windows-2.8.1.zip * Downloading libtensorflow [==============================] 348936...
https://stackoverflow.com/questions/65401712/tensorflow-nodegyp-failed-to-build-even-if-it-is-installed
python, tensorflow, npm, node-gyp
1,608,596,304
se_79329861
stackoverflow
MACHINE_LEARNING
How can I use training data into my custom metric?
How can I use training data into my custom metric? I can't pass training data into my custom metric I can't understand, how can I use input_prices into my custom metric? Metric: def metric_overprice(input_prices): def overpricing(y_true, y_pred): y_pred = tf.round(y_pred) pred_value = tf.reduce_su...
https://stackoverflow.com/questions/79329861/how-can-i-use-training-data-into-my-custom-metric
tensorflow, keras, metrics
1,736,038,870
se_79324718
stackoverflow
MACHINE_LEARNING
autoencoder.fit() raises &#39;KeyError: &#39;Exception encountered when calling Functional.call()&#39;
autoencoder.fit() raises &#39;KeyError: &#39;Exception encountered when calling Functional.call()&#39; I'm trying to build a stacked LSTM sequence auto-encoder that takes a signal of 430 timesteps with each timestep having 1 value. You can see the code for the model below: feat_dim = 1 timesteps = 430 inputs = keras.I...
https://stackoverflow.com/questions/79324718/autoencoder-fit-raises-keyerror-exception-encountered-when-calling-function
python, tensorflow, keras, deep-learning, lstm
1,735,844,701
se_79328912
stackoverflow
MACHINE_LEARNING
Error when loading old .h5 file with latest Keras
Error when loading old .h5 file with latest Keras I'm trying to load some models that were created using an old version of keras (v2.3.1) with the latest version of the library and I'm getting a strange error. The models are saved as .h5 files. The models are loaded/saved using code like this: from keras.models import...
https://stackoverflow.com/questions/79328912/error-when-loading-old-h5-file-with-latest-keras
tensorflow, keras
1,735,997,018
se_79328433
stackoverflow
MACHINE_LEARNING
NaN loss output when training DNN with Keras
NaN loss output when training DNN with Keras I am trying to do an exercise from Hands-On ML by Aurelien Geron. However when I tried using my own solution and copy and pasting the solution from the answer key, I keep getting this outcome that is not supposed to happen. The loss and val_loss at each epoch is nan and the...
https://stackoverflow.com/questions/79328433/nan-loss-output-when-training-dnn-with-keras
python, tensorflow, machine-learning, keras, deep-learning
1,735,976,722
se_79328155
stackoverflow
MACHINE_LEARNING
How to resolved the import error with scipy when using keras_tuner?
How to resolved the import error with scipy when using keras_tuner? I have download the tensorflow nightly version 2.19.0.dev20241219 (cpu version) and download the version keras_tuner 1.4.7 and keras 3.7.0. I also check my system has the scipy version 1.15.0. However, the system keep request to download scipy. Here...
https://stackoverflow.com/questions/79328155/how-to-resolved-the-import-error-with-scipy-when-using-keras-tuner
tensorflow, keras, tensorflow2.0, bayesian, keras-tuner
1,735,958,881
se_79111990
stackoverflow
MACHINE_LEARNING
Multiprocessing with Tensorflow on Raspberry Pi
Multiprocessing with Tensorflow on Raspberry Pi I'm having trouble running Tensorflow outside of my main script, and I'm wondering if there is a workaround. So to isolate the issue I wrote a couple of test scripts to see what the problem is. This scripts works fine. main.py from tflite_support.task import core from tf...
https://stackoverflow.com/questions/79111990/multiprocessing-with-tensorflow-on-raspberry-pi
python, tensorflow, raspberry-pi, python-multiprocessing
1,729,552,165
se_73997008
stackoverflow
MACHINE_LEARNING
Augment a tf.data.Dataset with has image and mask. Both Needs to be augmented
Augment a tf.data.Dataset with has image and mask. Both Needs to be augmented I have a tf.data.Dataset of image paths of image and masks # Creating list of image and mask path all_val_img = np.array(sorted([os.path.join(VAL_DIR,i) for i in os.listdir(VAL_DIR)])) all_val_mask = np.array(sorted([os.path.join(VAL_MASK_DI...
https://stackoverflow.com/questions/73997008/augment-a-tf-data-dataset-with-has-image-and-mask-both-needs-to-be-augmented
python, tensorflow, keras, image-augmentation
1,665,232,358
se_78299759
stackoverflow
MACHINE_LEARNING
mlflow.exceptions.RestException: INVALID_PARAMETER_VALUE: Response: {&#39;error_code&#39;: &#39;INVALID_PARAMETER_VALUE&#39;}
mlflow.exceptions.RestException: INVALID_PARAMETER_VALUE: Response: {&#39;error_code&#39;: &#39;INVALID_PARAMETER_VALUE&#39;} I am a newbie in this field, I encountered this error and I have no idea on what I did wrong, I have looked up through the internet and seems like I am the only one who is getting through this....
https://stackoverflow.com/questions/78299759/mlflow-exceptions-restexception-invalid-parameter-value-response-error-code
python, tensorflow, debugging, keras, mlflow
1,712,678,397
se_79322184
stackoverflow
MACHINE_LEARNING
Converting tensorflow model using tensorflowjs
Converting tensorflow model using tensorflowjs Trying to convert a simple CNN using tfjs. The model gets converted, however it does not get loaded in properly. Error: 'An InputLayer should be passed either a batchInputShape or an inputShape.' tf.saved_model.save(model, 'my_model') import tensorflowjs as tfjs tfjs.con...
https://stackoverflow.com/questions/79322184/converting-tensorflow-model-using-tensorflowjs
javascript, python, tensorflow, tensorflow.js, tensorflowjs-converter
1,735,758,174
se_78551681
stackoverflow
MACHINE_LEARNING
Need to convert Keras model to TensorFlow.js but facing version compatibility issues between TensorFlow and Keras
Need to convert Keras model to TensorFlow.js but facing version compatibility issues between TensorFlow and Keras When I tried to convert a .h5 model by using this command in the terminal tensorflowjs_converter --input_format keras model.h5 ./folder I got an output that says "ValueError: Expected Keras version 2; got...
https://stackoverflow.com/questions/78551681/need-to-convert-keras-model-to-tensorflow-js-but-facing-version-compatibility-is
tensorflow, keras, tensorflow.js
1,717,012,411
se_69979158
stackoverflow
MACHINE_LEARNING
Tensorflow array of arguments for map_fn
Tensorflow array of arguments for map_fn I would like to use map_fn to leverage more parallelism. I used to do it with Pool.map. p=Pool() # from multiprocessing params=list() params.append([arg1, arg2, arg3]) # arg1 is of size MxN (matrix, ~500x500), arg2 and arg3 are of size I and J (vectors) # final size is conditio...
https://stackoverflow.com/questions/69979158/tensorflow-array-of-arguments-for-map-fn
python, tensorflow, parallel-processing
1,637,000,937
se_62228981
stackoverflow
MACHINE_LEARNING
What is freezing/unfreezing a layer in neural networks?
What is freezing/unfreezing a layer in neural networks? I have been playing around with neural networks for quite a while now, and recently came across the terms freezing & unfreezing the layers before training a neural network while reading about transfer learning & am struggling with understanding their usage. When...
https://stackoverflow.com/questions/62228981/what-is-freezing-unfreezing-a-layer-in-neural-networks
tensorflow, machine-learning, deep-learning, neural-network, transfer-learning
1,591,430,673
se_78684629
stackoverflow
MACHINE_LEARNING
How to download the model from Roboflow Universe?
How to download the model from Roboflow Universe? I want to download the model from roboflow https://universe.roboflow.com/rookeye/thesis-iklwo/model/3 Is there anyway to download the model as tflite?
https://stackoverflow.com/questions/78684629/how-to-download-the-model-from-roboflow-universe
tensorflow, model, download, tflite, roboflow
1,719,614,038
se_51995977
stackoverflow
MACHINE_LEARNING
How can I use a pre-trained neural network with grayscale images?
How can I use a pre-trained neural network with grayscale images? I have a dataset containing grayscale images and I want to train a state-of-the-art CNN on them. I'd very much like to fine-tune a pre-trained model (like the ones here). The problem is that almost all models I can find the weights for have been traine...
https://stackoverflow.com/questions/51995977/how-can-i-use-a-pre-trained-neural-network-with-grayscale-images
python, tensorflow, machine-learning, keras, deep-learning
1,535,070,784
se_42015156
stackoverflow
MACHINE_LEARNING
The order of pooling and normalization layer in convnet
The order of pooling and normalization layer in convnet I'm looking at TensorFlow implementation of ORC on CIFAR-10, and I noticed that after the first convnet layer, they do pooling, then normalization, but after the second layer, they do normalization, then pooling. I'm just wondering what would be the rationale be...
https://stackoverflow.com/questions/42015156/the-order-of-pooling-and-normalization-layer-in-convnet
tensorflow, conv-neural-network
1,486,084,254
se_79318939
stackoverflow
MACHINE_LEARNING
Loaded Keras Model Throws Error While Predicting (Likely Issues with Masking)
Loaded Keras Model Throws Error While Predicting (Likely Issues with Masking) I am currently developing and testing a RNN that relies upon a large amount of data for training, and so have attempted to separate my training and testing files. I have one file where I create, train, and save a tensorflow.keras model to a ...
https://stackoverflow.com/questions/79318939/loaded-keras-model-throws-error-while-predicting-likely-issues-with-masking
python, tensorflow, machine-learning, keras, neural-network
1,735,606,391
se_79320980
stackoverflow
MACHINE_LEARNING
Loss Function Too High and Accuracy 0.0000e+00 for Recognition model Using ResNet50 + BiLSTM
Loss Function Too High and Accuracy 0.0000e+00 for Recognition model Using ResNet50 + BiLSTM I am working on a handwritten sentence recognition task using a combination of ResNet50 and BiLSTM. My dataset includes images of handwritten sentences, with each sentence represented as a sequence of images. However, I am enc...
https://stackoverflow.com/questions/79320980/loss-function-too-high-and-accuracy-0-0000e00-for-recognition-model-using-resne
python, tensorflow, machine-learning, neural-network, ocr
1,735,691,831
se_79320816
stackoverflow
MACHINE_LEARNING
Pylint No name &#39;keras&#39; in module &#39;tensorflow&#39;
Pylint No name &#39;keras&#39; in module &#39;tensorflow&#39; In vscode, when I open terminal I see: (peakInt) (base) me@hostname:/path/to/project The linter seems to work for everything except for keras. import tensorflow as tf is fine, but from tensorflow import keras shows "no name Keras in module tensorflow" In th...
https://stackoverflow.com/questions/79320816/pylint-no-name-keras-in-module-tensorflow
tensorflow, visual-studio-code, keras, pylint
1,735,679,491
se_79308195
stackoverflow
MACHINE_LEARNING
Unable to Use tf.image.rot90
Unable to Use tf.image.rot90 I am working on a semantic segmantation problem, where x is of shape (batch_size,1,256,256) and y ( mask) is of shape (batch_size,2,256,256), where 2 is the number of classes and i am working with channels_first format. I want to add rotation mechanism to my data augmentation part in my da...
https://stackoverflow.com/questions/79308195/unable-to-use-tf-image-rot90
tensorflow, keras, semantic-segmentation
1,735,153,577
se_79273080
stackoverflow
MACHINE_LEARNING
TensorFlow validation generator doesn&#39;t calculate val_loss after the first epoch
TensorFlow validation generator doesn&#39;t calculate val_loss after the first epoch I am trying to train a model using generators for the training and validation datasets. Each epoch consumes all the batches of the validation dataset (correct?). The first epoch runs fine, but from the second epoch onwards, it gives a...
https://stackoverflow.com/questions/79273080/tensorflow-validation-generator-doesnt-calculate-val-loss-after-the-first-epoch
python, tensorflow, generator
1,733,948,407
se_79320108
stackoverflow
MACHINE_LEARNING
tensorflow-gpu installation failed in colab
tensorflow-gpu installation failed in colab When I tried to install tensorflow-gpu in google colab ,it gives me this error: Collecting tensorflow-gpu Using cached tensorflow-gpu-2.12.0.tar.gz (2.6 kB) error: subprocess-exited-with-error × python setup.py egg_info did not run successfully. │ exit code: 1 ╰─> See above ...
https://stackoverflow.com/questions/79320108/tensorflow-gpu-installation-failed-in-colab
python, tensorflow
1,735,652,927
se_76846960
stackoverflow
MACHINE_LEARNING
Flask Application Memory Leak
Flask Application Memory Leak I have a flask application that has a memory leak and I am unable to figure out where I'm going wrong. The application is being used to demonstrate Tensorflow models live through an application. After calling the model to load and predict on an image, the memory increases to 108% on Herok...
https://stackoverflow.com/questions/76846960/flask-application-memory-leak
python, tensorflow, heroku, memory, memory-leaks
1,691,341,851
se_79318422
stackoverflow
MACHINE_LEARNING
Can&#39;t replicate the behaviour of loss calculation in keras
Can&#39;t replicate the behaviour of loss calculation in keras I am working on a semantic segmentation problem where I have an input x ( CT image) to a deep learning model of shape (batch_size,1,256,256) and an output of shape (batch_size,2,256,256) where the first channel represents an output mask (bone mask), and th...
https://stackoverflow.com/questions/79318422/cant-replicate-the-behaviour-of-loss-calculation-in-keras
python, tensorflow, keras, deep-learning, loss-function
1,735,586,144
se_79318266
stackoverflow
MACHINE_LEARNING
Importing ResNet50 model - size must be positive
Importing ResNet50 model - size must be positive I am running this code on tensorflow 2.17.0. I had no problem using this code in the later version tensorflow 2.18.0, but for some compatibility reasons I have to use the older version. from tensorflow.keras.applications.resnet50 import ResNet50 base_model = ResNet50( ...
https://stackoverflow.com/questions/79318266/importing-resnet50-model-size-must-be-positive
tensorflow, keras, resnet, pre-trained-model, imagenet
1,735,581,371
se_77682551
stackoverflow
MACHINE_LEARNING
Tensorflow Issue with Import on Mac M2
Tensorflow Issue with Import on Mac M2 Hello Stack Overflow community, I'm attempting to run TensorFlow on my Mac M2 Air but encountering an error that suggests a circular import issue. Below are the steps I've followed for installation: Installed TensorFlow and related packages via pip: python3 -m pip install tenso...
https://stackoverflow.com/questions/77682551/tensorflow-issue-with-import-on-mac-m2
python-3.x, macos, tensorflow
1,702,950,561
se_58366789
stackoverflow
MACHINE_LEARNING
Tensorflow: The Session graph is empty. Python
Tensorflow: The Session graph is empty. Python Hello guys I am using Tensorflow 2.0 and in these lines of code: import tensorflow as tf hello = tf.constant('Hello World') sess = tf.compat.v1.Session() sess.run(hello) <-- Error in this line RuntimeError: The Session graph is empty. Add operations to the graph ...
https://stackoverflow.com/questions/58366789/tensorflow-the-session-graph-is-empty-python
python, tensorflow, session, tensorflow2.0
1,570,992,866
se_76161038
stackoverflow
MACHINE_LEARNING
How to install tensorflow-gpu?
How to install tensorflow-gpu? How to install tensorflow-gpu on windows 10 with Python 3.10? conda and pip do not work I installed: cudnn-windows-x86_64-8.9.0.131_cuda11-archive cuda_12.1.1_531.14_windows add to path C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v12.1\bin C:\Program Files\NVIDIA GPU Computing To...
https://stackoverflow.com/questions/76161038/how-to-install-tensorflow-gpu
tensorflow, pip, windows-10, conda, python-3.10
1,683,095,801
se_71212394
stackoverflow
MACHINE_LEARNING
Can&#39;t see anything on Tensorboard
Can&#39;t see anything on Tensorboard I've just finished training a model (2000 epochs) with PyTorch Lightning. I thought PL had automatic tensorboard logging but I'm not sure. Here is the return of my training step: log = { "total_reward": torch.tensor(self.total_reward).to(device), "reward": ...
https://stackoverflow.com/questions/71212394/cant-see-anything-on-tensorboard
python, tensorflow, pytorch, tensorboard, pytorch-lightning
1,645,473,842
se_79298528
stackoverflow
MACHINE_LEARNING
TypeError: Unrecognized keyword arguments: [&#39;batch_shape&#39;] when loading a Keras model
TypeError: Unrecognized keyword arguments: [&#39;batch_shape&#39;] when loading a Keras model I'm working on a face recognition project where I trained a model using TensorFlow/Keras and saved it as face_recog_vggface.h5. While attempting to load the model using tf.keras.models.load_model(), I encounter the following ...
https://stackoverflow.com/questions/79298528/typeerror-unrecognized-keyword-arguments-batch-shape-when-loading-a-keras
python, tensorflow, ubuntu, keras
1,734,734,069
se_79312840
stackoverflow
MACHINE_LEARNING
Show histograms of individual layers in TensorBoard with Keras &quot;model.fit&quot;
Show histograms of individual layers in TensorBoard with Keras &quot;model.fit&quot; I have a Keras sequential model with two hidden layers. I would like to see in TensorBoard a histogram of the kernel and bias of each layer individually. I.e. a Histogram for Layer_1/Bias, Layer_1/Kernel, Layer_2/Bias and Layer_2/Kern...
https://stackoverflow.com/questions/79312840/show-histograms-of-individual-layers-in-tensorboard-with-keras-model-fit
tensorflow, keras, tensorboard
1,735,335,713
se_79309133
stackoverflow
MACHINE_LEARNING
Why does batch() return only one batch?
Why does batch() return only one batch? I'm beginner in image processing. I have two binary classes as subdirectory which total of 496 images and I have an issue with the last batch that has remainder of 13 images. So, instead of tf.dataset tensor (32, 300, 300, 3), there's (16, 300, 300, 3) in the last batch. Actuall...
https://stackoverflow.com/questions/79309133/why-does-batch-return-only-one-batch
python, tensorflow, machine-learning, tensor
1,735,205,032
se_62258549
stackoverflow
MACHINE_LEARNING
Failed to rename ; Access denied Tensorflow
Failed to rename ; Access denied Tensorflow I am trying to build a machine learning code with tensorflow 2.0 in jupyter using the mnist dataset . The data set is being taken from tensorflow-datasets but during the initial downloading of the dataset , after it downloads its showing an error that it is unable to renam...
https://stackoverflow.com/questions/62258549/failed-to-rename-access-denied-tensorflow
python, tensorflow, jupyter, tensorflow2.0, tensorflow-datasets
1,591,607,015
se_79310137
stackoverflow
MACHINE_LEARNING
Evaluate and Save a DNN Linear Combined Classifier Model in Tensorflow
Evaluate and Save a DNN Linear Combined Classifier Model in Tensorflow I'm using tensorflow estimator for my model and it works for training and evaluation part (Code snippet given below). While the accuracy being displayed from the results are 93%, the precision and recall are both 0 which should not be possible. Thi...
https://stackoverflow.com/questions/79310137/evaluate-and-save-a-dnn-linear-combined-classifier-model-in-tensorflow
python, tensorflow, pyspark, deep-learning, modeling
1,735,236,002
se_79307895
stackoverflow
MACHINE_LEARNING
How to use GPU for preprocessing &amp; model training using TF in kaggle?
How to use GPU for preprocessing &amp; model training using TF in kaggle? I have video data & need to extract frames (~ 5hr to complete on CPU). In kaggle can I use GPU to do this along with CNN model training. Unable to use GPU using TF. In Pytorch I found it easy to implement. i tried. : gpus = tf.config.experiment...
https://stackoverflow.com/questions/79307895/how-to-use-gpu-for-preprocessing-model-training-using-tf-in-kaggle
tensorflow, conv-neural-network, kaggle
1,735,141,433
se_79308948
stackoverflow
MACHINE_LEARNING
Indexing CNN output grid in loss function
Indexing CNN output grid in loss function I have CNN model build in tensorflow which outputs grid with shape (batch_size,H,W,1). I perform sigmoid activation function on each cell in the grid. my y_true is tensor with [ColIndex, RowIndex, Outcome], meaning for every training instance i have exactly 1 cell with an outc...
https://stackoverflow.com/questions/79308948/indexing-cnn-output-grid-in-loss-function
python, tensorflow, deep-learning
1,735,198,964
se_79309854
stackoverflow
MACHINE_LEARNING
ValueError: Exception encountered when calling layer &#39;tf_bert_model&#39; (type TFBertModel)
ValueError: Exception encountered when calling layer &#39;tf_bert_model&#39; (type TFBertModel) I have been trying to run TFBertModel from Transformers, but it kept on throwing me this error ValueError Traceback (most recent call last) Cell In[9], line 1 ----> 1 bert_output = bert_model(...
https://stackoverflow.com/questions/79309854/valueerror-exception-encountered-when-calling-layer-tf-bert-model-type-tfber
tensorflow, tensorflow2.0, huggingface-transformers, bert-language-model, transformer-model
1,735,228,411
se_78923765
stackoverflow
MACHINE_LEARNING
How can I make Tensorflow 2.9.1 compatible with CUDA 12.4?
How can I make Tensorflow 2.9.1 compatible with CUDA 12.4? I have a .py training script using tensorflow==2.9.1 which successfully runs on my local CPU.I need to use this specific tensorflow version since I have some rust code using tflite for model inference which only supports tf versions up to 2.9.1 Now I want to u...
https://stackoverflow.com/questions/78923765/how-can-i-make-tensorflow-2-9-1-compatible-with-cuda-12-4
python, tensorflow
1,724,854,039
se_79307924
stackoverflow
MACHINE_LEARNING
Error processing frame: failed to allocate memory [Op:AddV2] - Deepface object detection
Error processing frame: failed to allocate memory [Op:AddV2] - Deepface object detection i'm a newbie to object detection, we wrote a script to identify gender and age of a person using the deepface library and then adds trackers using the Sort library. The code works well on the CPU and Google Collabs but when i run ...
https://stackoverflow.com/questions/79307924/error-processing-frame-failed-to-allocate-memory-opaddv2-deepface-object-d
python, tensorflow, gpu, object-detection, deepface
1,735,142,311
se_79307856
stackoverflow
MACHINE_LEARNING
How to write custom inference script when deploying TF2 models in sagemaker
How to write custom inference script when deploying TF2 models in sagemaker I have a model trained in TF2 and was trying to deploy it using TensorFlowModel using sagemaker. When using the model, I also need to load other utilities, such as json to map inputs and a tokenizer (transformer) as well. When using HuggingFac...
https://stackoverflow.com/questions/79307856/how-to-write-custom-inference-script-when-deploying-tf2-models-in-sagemaker
tensorflow, amazon-sagemaker
1,735,139,757
se_38282413
stackoverflow
MACHINE_LEARNING
How to change colors of function plots in Tensorboard?
How to change colors of function plots in Tensorboard? I'm trying to compare different learning-rate-decays using Tensorflow. Therefore I visualize the cost functions in Tensorboard ('EVENTS'-tab). My problem is that the different plots of the functions are in very similar colors making it hard to compare them. Is the...
https://stackoverflow.com/questions/38282413/how-to-change-colors-of-function-plots-in-tensorboard
tensorflow, tensorboard
1,468,071,554