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_79641403
stackoverflow
MACHINE_LEARNING
Using evaluate library to evaluate BertScore only uses 1 busy GPU
Using evaluate library to evaluate BertScore only uses 1 busy GPU I'm using evaluate library to evaluate the BertScore. Here are my codes: import evaluate bertscore = evaluate.load("bertscore") bertscore_result = bertscore.compute(predictions=[sentence], references=references_sentence) bertscore_avg = np.mean(bertscor...
https://stackoverflow.com/questions/79641403/using-evaluate-library-to-evaluate-bertscore-only-uses-1-busy-gpu
python, tensorflow, gpu, huggingface-evaluate
1,748,397,198
se_79604384
stackoverflow
MACHINE_LEARNING
memory leak in prediction tensorflow
memory leak in prediction tensorflow Recently I trained two MLP model and saved weights for future work. I develop one module for loading model and use these model in another module. Load model module contain this code to load models: def creat_model_extractor(model_path, feature_count): try: tf.keras...
https://stackoverflow.com/questions/79604384/memory-leak-in-prediction-tensorflow
python, tensorflow, machine-learning
1,746,249,425
se_79784032
stackoverflow
MACHINE_LEARNING
Tensorflow gradient returns None
Tensorflow gradient returns None I am being implementing a custom layer that returns both the transformed output and an auxiliary loss term. The forward pass works fine, but when I try to compute gradients, I get None for the main output while the auxiliary term has the proper gradients. Code import tensorflow as tf ...
https://stackoverflow.com/questions/79784032/tensorflow-gradient-returns-none
tensorflow, keras, tensorflow2.0
1,759,780,898
se_79781281
stackoverflow
MACHINE_LEARNING
Unable to load an hdf5 model file in TensorFlow / Keras
Unable to load an hdf5 model file in TensorFlow / Keras I was given an hdf5 model file that was build with tensorflow / keras. Training data is no more available. Note: all Python code snippets shown hereunder are run against Python 3.9.23 inside a Dockerized Debian 13 (trixie) environment: # python3 Python 3.9.23 (ma...
https://stackoverflow.com/questions/79781281/unable-to-load-an-hdf5-model-file-in-tensorflow-keras
python, tensorflow, keras, hdf5
1,759,437,357
se_79783791
stackoverflow
MACHINE_LEARNING
TensorFlow 2.18.0 (conda-forge) fails on macOS with down_cast assertion in casts.h
TensorFlow 2.18.0 (conda-forge) fails on macOS with down_cast assertion in casts.h For several months, I have encountered this issue but postponed a thorough investigation due to the complexity introduced by multiple intervening layers, such as Positron, Quarto, and Conda. Recently, I successfully isolated and reprodu...
https://stackoverflow.com/questions/79783791/tensorflow-2-18-0-conda-forge-fails-on-macos-with-down-cast-assertion-in-casts
macos, tensorflow, conda, micromamba
1,759,760,269
se_61616735
stackoverflow
MACHINE_LEARNING
How to deal with school grades that are labelled '0' because of student grouping according to ability in a Neural Network?
How to deal with school grades that are labelled '0' because of student grouping according to ability in a Neural Network? I'm binary classifying student performance at university with Keras and Tensorflow, amongst others, with two inputs 'Math_A' (high school grade in course Mathematics A) & 'Math_B' (high sc...
https://stackoverflow.com/questions/61616735/how-to-deal-with-school-grades-that-are-labelled-0-because-of-student-grouping
python, tensorflow, keras, neural-network, prediction
1,588,692,284
se_73796400
stackoverflow
MACHINE_LEARNING
Error: No module named 'tensorflow.keras'
Error: No module named 'tensorflow.keras' I am writing the code for building extraction using deep learning but when I am trying to import the library files, it is showing the error "No module named 'tensorflow.keras'". I am unable to resolve it. Can anyone help? import os import cv2 import numpy as np import ...
https://stackoverflow.com/questions/73796400/error-no-module-named-tensorflow-keras
python, tensorflow, keras
1,663,742,723
se_43221730
stackoverflow
MACHINE_LEARNING
Tensorflow same code but get different result from CPU device to GPU device
Tensorflow same code but get different result from CPU device to GPU device I am trying to implement a program to test the Tensorflow performance on GPU device. Data test is MNIST data, supervised training using Multilayer perceptron(Neural networks). I followed this simple example but I change the number of performan...
https://stackoverflow.com/questions/43221730/tensorflow-same-code-but-get-different-result-from-cpu-device-to-gpu-device
python, tensorflow, gpu, cpu, multi-layer
1,491,365,893
se_79203477
stackoverflow
MACHINE_LEARNING
Pytorch in Azure Synapse causing problems
Pytorch in Azure Synapse causing problems I have a notebook in Azure Synapse that is using these libraries import pandas as pd import numpy as np from sqlalchemy import create_engine, text import sqlalchemy as sa from azure.core.credentials import AzureKeyCredential from azure.ai.textanalytics import TextAnalyticsClie...
https://stackoverflow.com/questions/79203477/pytorch-in-azure-synapse-causing-problems
tensorflow, pytorch, azure-synapse, torch
1,732,020,344
se_39460436
stackoverflow
MACHINE_LEARNING
How to create TFRecords file from png images
How to create TFRecords file from png images I'm just started working with TensorFlow a week ago, and I have some basic problems. The major one is that I didn't find a way to create a TFRecords that contains all my data. I understood that this process is necessary in order to train my own network with few millions 32x...
https://stackoverflow.com/questions/39460436/how-to-create-tfrecords-file-from-png-images
database, tensorflow, deep-learning, convolution, tensorflow-serving
1,473,725,206
se_56429967
stackoverflow
MACHINE_LEARNING
How to find prediction probability in given CNN in tensor flow?
How to find prediction probability in given CNN in tensor flow? I am very new to TensorFlow. Let us assume that I already have a trained convolutional neural network, now I give one new data to this CNN, and I want to see what's the prediction probability in each class. (e.g, the CNN is for handwriting 0-2, now I give...
https://stackoverflow.com/questions/56429967/how-to-find-prediction-probability-in-given-cnn-in-tensor-flow
python, tensorflow, deep-learning, conv-neural-network, prediction
1,559,574,050
se_79468572
stackoverflow
MACHINE_LEARNING
Register Keras neural network weights with GPflow kernel
Register Keras neural network weights with GPflow kernel I am trying to implement a neural kernel function (attentive kernels). The kernel uses a neural network to predict mixture component weights. Here's my init: class AttentiveKernel(gpflow.kernels.Kernel): def __init__(self, lengthscales, ...
https://stackoverflow.com/questions/79468572/register-keras-neural-network-weights-with-gpflow-kernel
tensorflow, keras, gpflow
1,740,545,849
se_79626546
stackoverflow
MACHINE_LEARNING
Why does my LSTM model raise max_seq_length <= 0 when predicting with new input of same shape?
Why does my LSTM model raise max_seq_length <= 0 when predicting with new input of same shape? I'm training a multi-branch LSTM model on Kaggle using 2x T4 GPUs, with multiple input sequences of different lengths. My target is the "close" column. 1. Normalization and Data: I normalize my data with a custom Normaliz...
https://stackoverflow.com/questions/79626546/why-does-my-lstm-model-raise-max-seq-length-0-when-predicting-with-new-input
python, tensorflow, lstm, kaggle
1,747,486,151
se_79411707
stackoverflow
MACHINE_LEARNING
Why is Hello Magenta Colab failing with 'metadata-generation-failed' error?
Why is Hello Magenta Colab failing with 'metadata-generation-failed' error? I'm currently trying out to use the Magenta (music generation) library using python, starting from the official 'Hello Magenta' colab notebook (https://colab.research.google.com/notebooks/magenta/hello_magenta/hello_magenta.ipynb). How...
https://stackoverflow.com/questions/79411707/why-is-hello-magenta-colab-failing-with-metadata-generation-failed-error
python, tensorflow, pip, google-colaboratory, magenta
1,738,672,392
se_79776800
stackoverflow
MACHINE_LEARNING
Mask image in tensorflow
Mask image in tensorflow Can I use keras.Layers to build custom layer to mask to whole dataset and return masked dataset. That is class AttnMask(Layer): def __init__(self, img_size, attention_map): super().__init__() self.imgSize = img_size self.attentionMap = attention_map def call(s...
https://stackoverflow.com/questions/79776800/mask-image-in-tensorflow
python, tensorflow, keras
1,758,980,703
se_79776858
stackoverflow
MACHINE_LEARNING
Multimodel for image captioning with CNN and LSTM over flickr30k does not learn. How to fuse image features and word embeddings?
Multimodel for image captioning with CNN and LSTM over flickr30k does not learn. How to fuse image features and word embeddings? I'm working on an image captioning project using a simple CNN + LSTM architecture, as required by the course I'm studying. The full code is available here on GitHub (note: some parts are mem...
https://stackoverflow.com/questions/79776858/multimodel-for-image-captioning-with-cnn-and-lstm-over-flickr30k-does-not-learn
python, tensorflow, keras, deep-learning, lstm
1,758,987,253
se_79775875
stackoverflow
MACHINE_LEARNING
How to install a compatible version of TensorFlow Federated on Google Colab (Python 3.12 + TensorFlow 2.19)?
How to install a compatible version of TensorFlow Federated on Google Colab (Python 3.12 + TensorFlow 2.19)? I am using Google Colab, which comes with: Python 3.12.11 TensorFlow 2.19.0 When I try: !pip uninstall -y numpy jax jaxlib !pip install tensorflow_federated Pip starts backtracking and tries to install very ol...
https://stackoverflow.com/questions/79775875/how-to-install-a-compatible-version-of-tensorflow-federated-on-google-colab-pyt
tensorflow, pip, google-colaboratory, tensorflow-federated, python-3.12
1,758,887,249
se_77972546
stackoverflow
MACHINE_LEARNING
pip._vendor.resolvelib.resolvers.ResolutionTooDeep: 200000
pip._vendor.resolvelib.resolvers.ResolutionTooDeep: 200000 I encountered the error ResolutionTooDeep: 200000 when attempting to install TensorFlow Extended (TFX) on Ubuntu 22.04 using the command pip install tfx Error Picture Install tfx I tried installing TFX using the pip command mentioned above. I expected the in...
https://stackoverflow.com/questions/77972546/pip-vendor-resolvelib-resolvers-resolutiontoodeep-200000
python, tensorflow, pip, tfx
1,707,558,721
se_79774394
stackoverflow
MACHINE_LEARNING
Can I visualize a neural network’s loss landscape to see if it’s stuck in a bad minimum? Any code example for this?
Can I visualize a neural network’s loss landscape to see if it’s stuck in a bad minimum? Any code example for this? So, I’m trying to understand why sometimes neural networks get stuck during training. I heard people talk about ‘local minima’ and ‘saddle points,’ but I can’t really picture them. I want to actually see...
https://stackoverflow.com/questions/79774394/can-i-visualize-a-neural-network-s-loss-landscape-to-see-if-it-s-stuck-in-a-bad
python, tensorflow, machine-learning, deep-learning, neural-network
1,758,778,581
se_78322183
stackoverflow
MACHINE_LEARNING
Got trouble during on building Mediapipe Example "hand_tracking_cpu"
Got trouble during on building Mediapipe Example "hand_tracking_cpu" I'm doing project with Mediapipe, and i successed install and built "hello_wolrd". But, I got trouble during on building "hand_tracking_cpu" like this: 참고: 포함 파일: external/org_tensorflow\tensorflow/lite/util.h 참고: 포함 파일: external/org_tenso...
https://stackoverflow.com/questions/78322183/got-trouble-during-on-building-mediapipe-example-hand-tracking-cpu
python, tensorflow, bazel, tensorflow-lite, mediapipe
1,713,046,608
se_68474451
stackoverflow
MACHINE_LEARNING
Custom Training Loop for Tensorflow Variational Autoencoder: `tape.gradient(loss, decoder_model.trainable_weights)` Always Returns List Full of None's
Custom Training Loop for Tensorflow Variational Autoencoder: `tape.gradient(loss, decoder_model.trainable_weights)` Always Returns List Full of None's I am trying to write a custom training loop for a variational autoencoder (VAE) that consists of two separate tf.keras.Model objects. The objective of this VAE is m...
https://stackoverflow.com/questions/68474451/custom-training-loop-for-tensorflow-variational-autoencoder-tape-gradientloss
tensorflow, machine-learning, autoencoder, gradienttape, custom-training
1,626,890,580
se_79759086
stackoverflow
MACHINE_LEARNING
n_jobs>=2 breaks reproducibility
n_jobs>=2 breaks reproducibility I am facing a problem in maintaining the reproducibility in the ML project. I believe the core snippet of my issue is clf = Clf(random_state=cfg.seed) # instantiate the K-fold cross-validation object cv = StratifiedKFold( n_splits=cfg.train.n_folds, shuffle=T...
https://stackoverflow.com/questions/79759086/n-jobs-2-breaks-reproducibility
python, tensorflow, machine-learning, scikit-learn, random-seed
1,757,345,007
se_79727623
stackoverflow
MACHINE_LEARNING
TensorFlow/Keras model accumulates system and GPU RAM during training
TensorFlow/Keras model accumulates system and GPU RAM during training I am training a model using TensorFlow/Keras using TensorFlow 2.19.0/Keras 3.10.0. During training, I monitor nvidia-smi and top, and the system RAM and the GPU RAM increase during the training period. Eventually, one or the other runs out of RAM an...
https://stackoverflow.com/questions/79727623/tensorflow-keras-model-accumulates-system-and-gpu-ram-during-training
numpy, tensorflow, keras, neural-network
1,754,499,957
se_79768360
stackoverflow
MACHINE_LEARNING
How do I convert TensorFlow SavedModel into TensorFlow.js format?
How do I convert TensorFlow SavedModel into TensorFlow.js format? I’m trying to convert my TensorFlow SavedModel into a TensorFlow.js format using tensorflowjs_converter. tensorflowjs_converter --input_format=tf_saved_model --output_format=tfjs_graph_model --saved_model_tags=serve --strip_debug_ops SavedModel TFJS 2...
https://stackoverflow.com/questions/79768360/how-do-i-convert-tensorflow-savedmodel-into-tensorflow-js-format
python, tensorflow, machine-learning, tensorflow.js, tensorflowjs-converter
1,758,194,802
se_79357798
stackoverflow
MACHINE_LEARNING
Google colab crashes for unknown reason when using TPU
Google colab crashes for unknown reason when using TPU I'm using the free version of Colab to train a small CNN for a regression task using audio data. The input pipeline consists of loading the audio using librosa, normalising the audio, cutting the audio into frames (this is important for the error), and then extrac...
https://stackoverflow.com/questions/79357798/google-colab-crashes-for-unknown-reason-when-using-tpu
tensorflow, jupyter-notebook, google-colaboratory, tpu
1,736,935,972
se_50473617
stackoverflow
MACHINE_LEARNING
How to authorize colab with Github?
How to authorize colab with Github? When selecting option on Google colab "Save a copy on Github" I receive message : From reading https://medium.com/tensorflow/colab-an-easy-way-to-learn-and-use-tensorflow-d74d1686e309 this option should be available ? Should another an Github authorization link appear as part ...
https://stackoverflow.com/questions/50473617/how-to-authorize-colab-with-github
github, tensorflow, google-colaboratory
1,527,010,969
se_64968807
stackoverflow
MACHINE_LEARNING
Why is a Keras custom metric not called after each epoch?
Why is a Keras custom metric not called after each epoch? I'm using tensorflow 2.1 and tf.keras, and whether adding a custom Metric as a simple function or Metric subclassed instance, during training the custom metric appears only be called at the start of training and not after each epoch as I was expecting. The star...
https://stackoverflow.com/questions/64968807/why-is-a-keras-custom-metric-not-called-after-each-epoch
tensorflow, keras
1,606,135,966
se_79765773
stackoverflow
MACHINE_LEARNING
Tensorflow lite sample code does not work from the tutorials
Tensorflow lite sample code does not work from the tutorials https://ai.google.dev/edge/litert/models/signatures#java I have the model generated, I have the model loaded. I verified this because I can see the signatures that are available: I don't know what the encoded_result and decoded_result variables should be. C...
https://stackoverflow.com/questions/79765773/tensorflow-lite-sample-code-does-not-work-from-the-tutorials
python, kotlin, tensorflow, tensorflow-lite
1,757,995,705
se_65701317
stackoverflow
MACHINE_LEARNING
How to visualise and choose parameters spectrogram tensorflow
How to visualise and choose parameters spectrogram tensorflow I have audio of 3 min duration ,I have Waveform shape: (2880000,) so what should be the value for frame_length and frame_step spectrogram = tf.signal.stft(waveform, frame_length=?, frame_step=?) spectrogram = tf.abs(spectrogram) On choosing frame_length=...
https://stackoverflow.com/questions/65701317/how-to-visualise-and-choose-parameters-spectrogram-tensorflow
python, tensorflow, machine-learning, data-science, tensorflow2.0
1,610,538,305
se_69031604
stackoverflow
MACHINE_LEARNING
Tensorflow running out of GPU memory: Allocator (GPU_0_bfc) ran out of memory trying to allocate
Tensorflow running out of GPU memory: Allocator (GPU_0_bfc) ran out of memory trying to allocate I am fairly new to Tensorflow and I am having trouble with Dataset. I work on Windows 10, and the Tensorflow version is 2.6.0 used with CUDA. I have 2 numpy arrays that are X_train and X_test (already split). The train is ...
https://stackoverflow.com/questions/69031604/tensorflow-running-out-of-gpu-memory-allocator-gpu-0-bfc-ran-out-of-memory-tr
python, tensorflow, tensorflow2.0, tensorflow-datasets
1,630,590,554
se_66083545
stackoverflow
MACHINE_LEARNING
Could not load dynamic library 'cudnn64_8.dll'; dlerror: cudnn64_8.dll not found
Could not load dynamic library 'cudnn64_8.dll'; dlerror: cudnn64_8.dll not found Using tensorflow 2.4.1 When I run my program, I'm getting this error and can't use my gpu. I'm using CUDA 11.0, cudnn 8.0 2021-02-07 03:36:18.132005: I tensorflow/stream_executor/platform/default/dso_loader.cc:49] Successfully ope...
https://stackoverflow.com/questions/66083545/could-not-load-dynamic-library-cudnn64-8-dll-dlerror-cudnn64-8-dll-not-found
python, tensorflow
1,612,659,452
se_79764132
stackoverflow
MACHINE_LEARNING
How to replace tf.placeholder in TensorFlow 2.x?
How to replace tf.placeholder in TensorFlow 2.x? I’m learning TensorFlow 2.x and I have some code from TF 1.x: X = tf.placeholder(tf.float32, shape=[None, 784]) Y = tf.placeholder(tf.float32, shape=[None, 10]) When I run this in TF 2.x, I get: AttributeError: module 'tensorflow' has no attribute 'placeholder' I unde...
https://stackoverflow.com/questions/79764132/how-to-replace-tf-placeholder-in-tensorflow-2-x
tensorflow, tensorflow2.0
1,757,832,946
se_79760189
stackoverflow
MACHINE_LEARNING
Why isn't my keras model throwing and error when different sizes are passed to the dense layer?
Why isn't my keras model throwing and error when different sizes are passed to the dense layer? I am working on a dynamic time series multi-class segmentation problem with keras (tensorflow version 2.12.0), and I wanted to see what would happen when I dropped in a dense layer into the network architecture. My expe...
https://stackoverflow.com/questions/79760189/why-isnt-my-keras-model-throwing-and-error-when-different-sizes-are-passed-to-t
python, tensorflow, machine-learning, keras, deep-learning
1,757,443,996
se_53949880
stackoverflow
MACHINE_LEARNING
Jointly training custom model with Tensorflow Object Detection API
Jointly training custom model with Tensorflow Object Detection API I am trying to use Tensorflow object detection API models in another custom model I built (in the same codebase). Specifically, I am trying to figure out how below can be handled (mutually exclusive points): jointly train Tensorflow object detection ...
https://stackoverflow.com/questions/53949880/jointly-training-custom-model-with-tensorflow-object-detection-api
python, tensorflow, machine-learning, deep-learning, computer-vision
1,545,938,657
se_77351982
stackoverflow
MACHINE_LEARNING
Why is this code returning an error about the shape of neural network?
Why is this code returning an error about the shape of neural network? When I tried running this code:- import pandas as pd import tensorflow as tf from sklearn.model_selection import train_test_split dataset = pd.read_csv ("/content/dataset/cancer.csv") x = dataset.drop(columns = ["diagnosis(1=m, 0=b)"]) y = dataset[...
https://stackoverflow.com/questions/77351982/why-is-this-code-returning-an-error-about-the-shape-of-neural-network
python, tensorflow, neural-network, artificial-intelligence
1,698,149,878
se_79756715
stackoverflow
MACHINE_LEARNING
Firebase Remote Model Downloader not working in android studio
Firebase Remote Model Downloader not working in android studio I am following this firebaseML guide from Google, but I was not able to import my firebase custom text classifier model into my android studio. I don't understand why since my model is only 12.5 mb. here is the code: Interpreter interpreter; private volati...
https://stackoverflow.com/questions/79756715/firebase-remote-model-downloader-not-working-in-android-studio
java, android, firebase, tensorflow, firebase-machine-learning
1,757,070,223
se_79755062
stackoverflow
MACHINE_LEARNING
Best method to create generator for TensorFlow with list of array inputs
Best method to create generator for TensorFlow with list of array inputs I am using TensorFlow/Keras to create a deep learning model. The network is built as follows: inps = [] features = [] for i in range(number_windows): inp = Input(shape=(window_length,), name=f"input_{i}") inps.append(inp) feat = ...
https://stackoverflow.com/questions/79755062/best-method-to-create-generator-for-tensorflow-with-list-of-array-inputs
python, tensorflow, keras, dataloader
1,756,931,393
se_79754606
stackoverflow
MACHINE_LEARNING
TensorFlow data loader from generator error "Dataset had more than one element"
TensorFlow data loader from generator error "Dataset had more than one element" I am trying to implement a TensorFlow dataset from a Python generator because I am having problems with my model consuming memory, inevitably resulting in a OOM crash (see my question on that here). So, I am thinking that a gener...
https://stackoverflow.com/questions/79754606/tensorflow-data-loader-from-generator-error-dataset-had-more-than-one-element
python, tensorflow, keras, dataloader
1,756,903,239
se_78365586
stackoverflow
MACHINE_LEARNING
AttributeError: module 'tree' has no attribute 'flatten' while loading Keras model in Flask app (TensorFlow 2)
AttributeError: module 'tree' has no attribute 'flatten' while loading Keras model in Flask app (TensorFlow 2) I'm encountering an AttributeError: module 'tree' has no attribute 'flatten' when trying to load a Keras model in my Flask application. I'm using TensorFlow 2 (version: [12.16.1]), and the c...
https://stackoverflow.com/questions/78365586/attributeerror-module-tree-has-no-attribute-flatten-while-loading-keras-mod
python, tensorflow, flask, keras
1,713,782,166
se_65740979
stackoverflow
MACHINE_LEARNING
How does argmax work when given a 3d tensor - tensorflow
How does argmax work when given a 3d tensor - tensorflow I was wondering how does argmax work when given a 3D tensor. I know what happens when it has a 2D tesnor but 3D is confusing me a lot. Example: import tensorflow as tf import numpy as np sess = tf.Session() coordinates = np.random.randint(0, 100, size=(3, 3, 2...
https://stackoverflow.com/questions/65740979/how-does-argmax-work-when-given-a-3d-tensor-tensorflow
python, numpy, tensorflow, argmax
1,610,732,474
se_45040400
stackoverflow
MACHINE_LEARNING
Why using Anaconda environments to install tensorflow on Windows?
Why using Anaconda environments to install tensorflow on Windows? In tensorflow installation guide it is said, that I should use "environment" to install tensorflow: https://www.tensorflow.org/install/install_windows#installing_with_anaconda Why? Can't I just install with pip? If installed with environment, should ...
https://stackoverflow.com/questions/45040400/why-using-anaconda-environments-to-install-tensorflow-on-windows
python, windows, tensorflow, pip, anaconda
1,499,791,782
se_44483233
stackoverflow
MACHINE_LEARNING
Is using batch size as 'powers of 2' faster on tensorflow?
Is using batch size as 'powers of 2' faster on tensorflow? I read from somewhere that if you choose a batch size that is a power 2, training will be faster. What is this rule? Is this applicable to other applications? Can you provide a reference paper?
https://stackoverflow.com/questions/44483233/is-using-batch-size-as-powers-of-2-faster-on-tensorflow
tensorflow, machine-learning, deep-learning, batchsize
1,497,179,856
se_79375672
stackoverflow
MACHINE_LEARNING
Does keras/TF support non-time-step masking?
Does keras/TF support non-time-step masking? Masking is a very broad term which normally means ignore part of. However, the docs on masking describe it as: Masking is a way to tell sequence-processing layers that certain timesteps in an input are missing, and thus should be skipped when processing the data. It seems...
https://stackoverflow.com/questions/79375672/does-keras-tf-support-non-time-step-masking
tensorflow, keras, tensorflow2.0, tf.keras
1,737,486,215
se_53643252
stackoverflow
MACHINE_LEARNING
Is it possible to save the class/label mapping directly inside a keras model.h5 file?
Is it possible to save the class/label mapping directly inside a keras model.h5 file? Using model.save() I am able to save the trained model. However, upon using the model for predictions, I still need to recover the respective class/label mappings (0: 'cat', 1: 'dog' ... etc.). Currently I am saving the .class_indice...
https://stackoverflow.com/questions/53643252/is-it-possible-to-save-the-class-label-mapping-directly-inside-a-keras-model-h5
python, tensorflow, keras
1,544,059,341
se_78543578
stackoverflow
MACHINE_LEARNING
ImportError: cannot import name 'LSTM' from 'tensorflow.python.keras.layers'
ImportError: cannot import name 'LSTM' from 'tensorflow.python.keras.layers' I am trying to build a ML model with LSTM. I want to import the 'LSTM' layer. However, my code does not lead to correct results. The error forces me to use 'LSTMV1' instead. But, I want to use 'LSTM'. I tried this, and this di...
https://stackoverflow.com/questions/78543578/importerror-cannot-import-name-lstm-from-tensorflow-python-keras-layers
tensorflow, lstm
1,716,892,888
se_54721703
stackoverflow
MACHINE_LEARNING
ModuleNotFoundError: No module named 'numpy.core._multiarray_umath' (While installing TensorFlow)
ModuleNotFoundError: No module named 'numpy.core._multiarray_umath' (While installing TensorFlow) I am following this tutorial to install TensorFlow(https://www.tensorflow.org/install/pip), but in the last command: python -c "import tensorflow as tf; tf.enable_eager_execution(); print(tf.reduce_sum(tf.random_...
https://stackoverflow.com/questions/54721703/modulenotfounderror-no-module-named-numpy-core-multiarray-umath-while-insta
python, numpy, tensorflow, installation, windows-10
1,550,309,643
se_79747243
stackoverflow
MACHINE_LEARNING
KFold cross-validation in Keras: model not resetting between folds (MobileNet backbone)
KFold cross-validation in Keras: model not resetting between folds (MobileNet backbone) I am trying to perform KFold cross-validation on a Keras model. The first fold runs exactly as expected, but from the second fold onwards the model doesn’t seem to reset. The training behaves strangely, as if the weights from the p...
https://stackoverflow.com/questions/79747243/kfold-cross-validation-in-keras-model-not-resetting-between-folds-mobilenet-ba
python, tensorflow, keras, deep-learning, neural-network
1,756,236,458
se_69115621
stackoverflow
MACHINE_LEARNING
CUDA_ERROR_NOT_INITIALIZED on A100 after server reset
CUDA_ERROR_NOT_INITIALIZED on A100 after server reset I'm running on a server with a A100 GPU. When trying to run tensorflow code after a server reset, tensorflow does not recognize the GPU. Running tf.config.list_physical_devices('GPU') yields CUDA_ERROR_NOT_INITIALIZED: 2021-09-09 07:41:42.956917: I tensorflow/strea...
https://stackoverflow.com/questions/69115621/cuda-error-not-initialized-on-a100-after-server-reset
tensorflow, cuda, gpu, nvidia
1,631,179,665
se_79745664
stackoverflow
MACHINE_LEARNING
Layer "dense" expects 1 input(s), but it received 2 input tensors
Layer "dense" expects 1 input(s), but it received 2 input tensors Environment Raspberry Pi 4: 8 GB RAM Relevant Dependencies: keras 3.11.3 numpy 1.26.4 opencv-python 4.12.0.88 pillow 11.3.0 tensorflow 2.20.0 Issue Trained MobileNetV...
https://stackoverflow.com/questions/79745664/layer-dense-expects-1-inputs-but-it-received-2-input-tensors
tensorflow, deep-learning, raspberry-pi, valueerror
1,756,120,182
se_79744026
stackoverflow
MACHINE_LEARNING
Ram Memory leak when scripting a Sampling Trainer for a Bert Encoder and LSTM Decoder Tensorflow on GPU
Ram Memory leak when scripting a Sampling Trainer for a Bert Encoder and LSTM Decoder Tensorflow on GPU I wrote the module attached below. However, I notice a constant increase of RAM until I get an out of memory error. The code runs on CPU without a problem (except the slow training time). It can finish the first tra...
https://stackoverflow.com/questions/79744026/ram-memory-leak-when-scripting-a-sampling-trainer-for-a-bert-encoder-and-lstm-de
python, python-3.x, tensorflow, deep-learning, lstm
1,755,927,646
se_79465820
stackoverflow
MACHINE_LEARNING
Select TensorFlow op(s), included in the given model, is(are) not supported by this interpreter. when trying load the model in flutter
Select TensorFlow op(s), included in the given model, is(are) not supported by this interpreter. when trying load the model in flutter getting this error while trying to load a tf model I converted to tflite so I can use it in my app I did what the message suggests and added the org.tensorflow:tensorflow-lite-select-t...
https://stackoverflow.com/questions/79465820/select-tensorflow-ops-included-in-the-given-model-isare-not-supported-by-t
flutter, tensorflow, tensorflow-lite
1,740,471,009
se_79744362
stackoverflow
MACHINE_LEARNING
import tensorflow statement crashes or hangs on macOS
import tensorflow statement crashes or hangs on macOS I have the following Python statement, which I cannot execute in Jupyter Notebook or Python REPL: import tensorflow Python 3.11.10 (main, Sep 20 2024, 14:23:57) [Clang 16.0.0 (clang-1600.0.26.3)] on darwin Type "help", "copyright", "credits" or "license" for more ...
https://stackoverflow.com/questions/79744362/import-tensorflow-statement-crashes-or-hangs-on-macos
python, tensorflow, pyarrow
1,755,962,194
se_79743297
stackoverflow
MACHINE_LEARNING
Why am I getting ModuleNotFoundError: No module named 'numpy._utils' when importing scikit-learn or TensorFlow on Python 3.12?
Why am I getting ModuleNotFoundError: No module named 'numpy._utils' when importing scikit-learn or TensorFlow on Python 3.12? I’m trying to run Python scripts that import scikit-learn and TensorFlow, but I keep running into a NumPy-related error. code example: from packaging import version import sklearn as...
https://stackoverflow.com/questions/79743297/why-am-i-getting-modulenotfounderror-no-module-named-numpy-utils-when-import
numpy, tensorflow, scikit-learn
1,755,859,320
se_65780506
stackoverflow
MACHINE_LEARNING
How to enable AVX / AVX2 in VirtualBox with Ubuntu
How to enable AVX / AVX2 in VirtualBox with Ubuntu TL;DR: Tensorflow 1.15 crashes on my virtual machine when imported by Python (error message is Illegal instruction (core dumped)), very probably thanks to AVX and AVX2 being disabled on it. My host machine (Windows 10 64bit) has AVX and AVX2 (validated using Cygwin, ...
https://stackoverflow.com/questions/65780506/how-to-enable-avx-avx2-in-virtualbox-with-ubuntu
tensorflow, virtual-machine, virtualbox, avx, avx2
1,610,996,199
se_79743671
stackoverflow
MACHINE_LEARNING
Python TensorFlow Speech Recognition -1073741819 (0xC0000005) Error
Python TensorFlow Speech Recognition -1073741819 (0xC0000005) Error I'm working on a speech recognition project using TensorFlow in Python. Normally, TensorFlow can only be used with a CPU or an NVIDIA GPU. I have an AMD Radeon 7600S GPU. Because of this, I installed the tensorflow-directml-plugin developed by Microso...
https://stackoverflow.com/questions/79743671/python-tensorflow-speech-recognition-1073741819-0xc0000005-error
python, python-3.x, tensorflow, artificial-intelligence, speech-recognition
1,755,882,240
se_79552668
stackoverflow
MACHINE_LEARNING
Tensorflow runs out of range during fitting: Local rendezvous is aborting with status: OUT_OF_RANGE: End of sequence
Tensorflow runs out of range during fitting: Local rendezvous is aborting with status: OUT_OF_RANGE: End of sequence I have a dataset containing semantic vectors of length 384. I group them to windows each containing a 100. I batch them to batch sizes of 32. However, I get an error when fitting the model. I feel like ...
https://stackoverflow.com/questions/79552668/tensorflow-runs-out-of-range-during-fitting-local-rendezvous-is-aborting-with-s
python, tensorflow, keras, tf.keras
1,743,676,109
se_79637640
stackoverflow
MACHINE_LEARNING
Tensorflow Lite (LiteRn) Deployment in Android using Kotlin, Error 'FULLY_CONNECTED' version '12' not found
Tensorflow Lite (LiteRn) Deployment in Android using Kotlin, Error 'FULLY_CONNECTED' version '12' not found I am trying to integrate deep learning model to my android application. But I am getting stuck on running the model in my application. I have created a model that uses tensorflow for detecting th...
https://stackoverflow.com/questions/79637640/tensorflow-lite-litern-deployment-in-android-using-kotlin-error-fully-connec
python, android, kotlin, tensorflow, tensorflow-lite
1,748,174,477
se_65271399
stackoverflow
MACHINE_LEARNING
VS Code / Pylance / Pylint Cannot resolve import
VS Code / Pylance / Pylint Cannot resolve import The Summary I have a python import that works when run from the VS Code terminal, but that VS Code's editor is giving warnings about. Also, "Go to Definition" doesn't work. The Problem I have created a docker container from the image tensorflow/tensorflow:1.15.2-py3, th...
https://stackoverflow.com/questions/65271399/vs-code-pylance-pylint-cannot-resolve-import
python, tensorflow, visual-studio-code, pylint, pylance
1,607,820,680
se_79431023
stackoverflow
MACHINE_LEARNING
Tracing CustomMaskWarning to its source
Tracing CustomMaskWarning to its source I am working with old TensorFlow (2.7) and Java Tensorflow but the answer may still help others tracing similar issues. My model produces the error when saved to the 2.7 save() format: CustomMaskWarning: Custom mask layers require a config and must override get_config. When load...
https://stackoverflow.com/questions/79431023/tracing-custommaskwarning-to-its-source
python, java, tensorflow
1,739,299,267
se_64875304
stackoverflow
MACHINE_LEARNING
Why is Tensorflow 2.2 taking a long time to start?
Why is Tensorflow 2.2 taking a long time to start? I am trying to run Tensorflow on windows 10 with the following setup: Anaconda3 with Python 3.8 Tensorflow 2.2.0 GPU: RTX3090 cuda_10.1.243 cudnn-v7.6.5.32 for windows10-x64 Running the following code takes between 5 ~ 10 minutes to print the output. import te...
https://stackoverflow.com/questions/64875304/why-is-tensorflow-2-2-taking-a-long-time-to-start
tensorflow, tensorflow2.0, tensorflow2
1,605,616,101
se_70028946
stackoverflow
MACHINE_LEARNING
How is the input_matrix * weight_matrix + bias_vector possible in tensorflow?
How is the input_matrix * weight_matrix + bias_vector possible in tensorflow? Given an N x M input matrix X, an M x U weight matrix W, and a bias vector b of length U, how is the affine transformation XW + b possible? If the result R of the matrix multiplication is of shape N x U, how is the bias vector b added to to ...
https://stackoverflow.com/questions/70028946/how-is-the-input-matrix-weight-matrix-bias-vector-possible-in-tensorflow
python, tensorflow, linear-algebra
1,637,287,237
se_79427474
stackoverflow
MACHINE_LEARNING
TensorFlow Model Training High Loss Rate
TensorFlow Model Training High Loss Rate I am creating a very simple algorithm for TensorFlow for training for the equation X^3 + Y^2. But for some reason when I train TensorFlow model is comes with extremely high loss rate. I am not sure what I am doing wrong and why the loss is so high. import tensorflow as tf from ...
https://stackoverflow.com/questions/79427474/tensorflow-model-training-high-loss-rate
tensorflow
1,739,199,659
se_79740448
stackoverflow
MACHINE_LEARNING
How to calculate the jacobian of a tensorflow NN model w.r.t. the trainable variables and store it as a matrix
How to calculate the jacobian of a tensorflow NN model w.r.t. the trainable variables and store it as a matrix Salve amici! I need to evaluate the derivative of an objective function in an external optimization scheme. Part of the model is constructed using NN, thus, through the chain rule, I have a bit of the derivat...
https://stackoverflow.com/questions/79740448/how-to-calculate-the-jacobian-of-a-tensorflow-nn-model-w-r-t-the-trainable-vari
tensorflow
1,755,641,487
se_66874100
stackoverflow
MACHINE_LEARNING
What is the logic of the extra columns in Tensorflow categorical encoding?
What is the logic of the extra columns in Tensorflow categorical encoding? I am following the official Tensorflow tutorial for preprocessing layers, and I am not sure I get why I end up getting these extra columns after the categorical encoding. [UPDATE 2024: the default behavior has now changed, so the current tutori...
https://stackoverflow.com/questions/66874100/what-is-the-logic-of-the-extra-columns-in-tensorflow-categorical-encoding
tensorflow, keras
1,617,118,830
se_77743390
stackoverflow
MACHINE_LEARNING
How to load a dataset(.npz) locally in tensorflow?
How to load a dataset(.npz) locally in tensorflow? I'm working on a handwritten didgits recognition project. I need to load the data from mnist dataset. My problem is that I can't use the load_data() function because when it starts downloading the dataset, it returns an error: URL fetch failure on https://storage.goog...
https://stackoverflow.com/questions/77743390/how-to-load-a-dataset-npz-locally-in-tensorflow
python, tensorflow, artificial-intelligence
1,704,143,918
se_75305082
stackoverflow
MACHINE_LEARNING
Tensorflow dataset crashing VsCode
Tensorflow dataset crashing VsCode So I'm trying to make a simple image classifier using a CNN and an already labeled data set called "places 365". However, whenever I run model.fit() my RAM usage maxes out and VS Code crashes or I restart the kernel. In the past, I have gotten model.fit() to work just fine when I imp...
https://stackoverflow.com/questions/75305082/tensorflow-dataset-crashing-vscode
python, numpy, tensorflow
1,675,218,535
se_79736231
stackoverflow
MACHINE_LEARNING
How do I format my a tensorflow dataset for a multi output model?
How do I format my a tensorflow dataset for a multi output model? I have an image dataset where each image has multiple categorical features that I want to predict. I am getting this error when trying to train: ValueError: y_true and y_pred have different structures. y_true: * y_pred: ['*', '*', '*', '*'] Here's is m...
https://stackoverflow.com/questions/79736231/how-do-i-format-my-a-tensorflow-dataset-for-a-multi-output-model
python, tensorflow, machine-learning, keras, deep-learning
1,755,246,327
se_79653092
stackoverflow
MACHINE_LEARNING
CNN Constant Predictions
CNN Constant Predictions I’m building a Keras model based on MobileNetV2 for frame-level prediction of 6 human competencies. Each output head represents a competency and is a softmax over 100 classes (scores 0–99). The model takes in 224x224 RGB frames, normalized to [-1, 1] (compatible with MobileNetV2 preprocessing)...
https://stackoverflow.com/questions/79653092/cnn-constant-predictions
python, tensorflow, machine-learning, deep-learning, conv-neural-network
1,749,051,612
se_70530259
stackoverflow
MACHINE_LEARNING
InvalidArgumentError: Must have updates.shape = indices.shape + params.shape[1:] or updates.shape = [] in TF-Agents
InvalidArgumentError: Must have updates.shape = indices.shape + params.shape[1:] or updates.shape = [] in TF-Agents I have a problem with this simple code. I am looking for an experience replay code that is compatible with graph operations and TF Functions. import tensorflow as tf import numpy as np !pip ...
https://stackoverflow.com/questions/70530259/invalidargumenterror-must-have-updates-shape-indices-shape-params-shape1
python, tensorflow, reinforcement-learning, tf-agent
1,640,859,557
se_79727860
stackoverflow
MACHINE_LEARNING
how to solve ValueError: Failed to construct dataset "imdb_reviews"?
how to solve ValueError: Failed to construct dataset "imdb_reviews"? ValueError: Failed to construct dataset "imdb_reviews", builder_kwargs "{'config': 'subwords8k', 'data_dir': None}": BuilderConfig subwords8k not found with version None. Here are 10 BuilderConfigs whose name closely match: I've got thi...
https://stackoverflow.com/questions/79727860/how-to-solve-valueerror-failed-to-construct-dataset-imdb-reviews
python, tensorflow, machine-learning, nlp, artificial-intelligence
1,754,514,942
se_68614547
stackoverflow
MACHINE_LEARNING
TensorFlow libdevice not found. Why is it not found in the searched path?
TensorFlow libdevice not found. Why is it not found in the searched path? Win 10 64-bit 21H1; TF2.5, CUDA 11 installed in environment (Python 3.9.5 Xeus) I am not the only one seeing this error; see also (unanswered) here and here. The issue is obscure and the proposed resolutions are unclear/don't seem to work (see e...
https://stackoverflow.com/questions/68614547/tensorflow-libdevice-not-found-why-is-it-not-found-in-the-searched-path
python, tensorflow, configuration
1,627,853,847
se_41017346
stackoverflow
MACHINE_LEARNING
In tensorflow MNIST beginner tutorial, how to actually use the results
In tensorflow MNIST beginner tutorial, how to actually use the results I'm following the next tutorial: https://www.tensorflow.org/versions/r0.12/tutorials/mnist/beginners/index.html The problem is that I have not found any information on how to actually use this piece of code. The normal thing a newbie in the area...
https://stackoverflow.com/questions/41017346/in-tensorflow-mnist-beginner-tutorial-how-to-actually-use-the-results
python, tensorflow
1,481,113,190
se_54878105
stackoverflow
MACHINE_LEARNING
TensorFlow Keras Optimise prediction
TensorFlow Keras Optimise prediction I'm using TensorFlow and Keras to predict handwriting digits. For training, I'm using the MNIST dataset. The accuracy is about 98.8% after training, but sometimes in testing it gets confused between 4 and 9, and also between 7 and 3. I already optimized the image input with OpenCV,...
https://stackoverflow.com/questions/54878105/tensorflow-keras-optimise-prediction
tensorflow, keras
1,551,152,250
se_45861547
stackoverflow
MACHINE_LEARNING
neural network - Predict MNIST digits only with one neuron in the output layer
neural network - Predict MNIST digits only with one neuron in the output layer Is it possible to create a neural network where we have one neuron in the output layer which can directly predict digit from MNIST dataset after training? e.g., if we give digit 3 as input, the output layer neuron should give output value c...
https://stackoverflow.com/questions/45861547/neural-network-predict-mnist-digits-only-with-one-neuron-in-the-output-layer
tensorflow, neural-network, mnist
1,503,577,346
se_48443886
stackoverflow
MACHINE_LEARNING
What is regularization loss in tensorflow?
What is regularization loss in tensorflow? When training an Object Detection DNN with Tensorflows Object Detection API it's Visualization Plattform Tensorboard plots a scalar named regularization_loss_1 What is this? I know what regularization is (to make the Network good at generalizing through various methods like ...
https://stackoverflow.com/questions/48443886/what-is-regularization-loss-in-tensorflow
tensorflow, tensorboard, regularized
1,516,886,542
se_79450826
stackoverflow
MACHINE_LEARNING
Incorrect header check error when trying to access a tf_record file
Incorrect header check error when trying to access a tf_record file I've recently ran into an error when trying to evaluate my training model onto my testing files. The error is thrown at the batch_raw = raw_iter.get_next(): try: while N_b<max_batches: batch_raw = raw_iter.get_next() batch_test = t...
https://stackoverflow.com/questions/79450826/incorrect-header-check-error-when-trying-to-access-a-tf-record-file
python, tensorflow, gpu, conda, tfrecord
1,739,957,879
se_64926141
stackoverflow
MACHINE_LEARNING
N timeseries feed to one layer with N lstm cells, how to concatenate lstm horizontally as a layer?
N timeseries feed to one layer with N lstm cells, how to concatenate lstm horizontally as a layer? I am trying to implement https://dl.acm.org/doi/pdf/10.1145/3269206.3271794 . It has a network structure like this: timeseries1 -> lstm1 timeseries2 -> lstm2 .... timeseriesN -> lstmN [lstm1, lstm2, ... , lstmN] -> CNN...
https://stackoverflow.com/questions/64926141/n-timeseries-feed-to-one-layer-with-n-lstm-cells-how-to-concatenate-lstm-horizo
tensorflow, keras, lstm, tensorflow2.0, tf.keras
1,605,861,168
se_56226621
stackoverflow
MACHINE_LEARNING
How to extract data/labels back from TensorFlow dataset
How to extract data/labels back from TensorFlow dataset There are plenty of examples how to create and use TensorFlow datasets, e.g. dataset = tf.data.Dataset.from_tensor_slices((images, labels)) My question is how to get back the data/labels from the TF dataset in numpy form? In other words want would be reverse ope...
https://stackoverflow.com/questions/56226621/how-to-extract-data-labels-back-from-tensorflow-dataset
tensorflow, tensorflow-datasets
1,558,378,399
se_63823395
stackoverflow
MACHINE_LEARNING
How can I get the number of CUDA cores in my GPU using Python and Numba?
How can I get the number of CUDA cores in my GPU using Python and Numba? I would like to know how to obtain the total number of CUDA Cores in my GPU using Python, Numba and cudatoolkit.
https://stackoverflow.com/questions/63823395/how-can-i-get-the-number-of-cuda-cores-in-my-gpu-using-python-and-numba
python, tensorflow, cuda, gpu, numba
1,599,716,076
se_63191717
stackoverflow
MACHINE_LEARNING
How to create input layer in keras for class label also?
How to create input layer in keras for class label also? I wanted the class label information for my model to build a custom loss function similar to arcface how do I get input values of shape(1) in keras X_input = Input(InputShape) label = Input(shape=(1,)) #there are some more layers in between model = Model(inputs...
https://stackoverflow.com/questions/63191717/how-to-create-input-layer-in-keras-for-class-label-also
python, tensorflow, keras
1,596,197,998
se_62986313
stackoverflow
MACHINE_LEARNING
keras 2.4. producing completely different output than 2.3.1
keras 2.4. producing completely different output than 2.3.1 I am trying to implement autoencoders. Using MNIST dataset, I am first encoding the images and then decoding them. When I use keras version 2.3.1 I am getting decoded Images very close to original but on using Keras 2.4.3 and no change to code I am getting co...
https://stackoverflow.com/questions/62986313/keras-2-4-producing-completely-different-output-than-2-3-1
python, tensorflow, machine-learning, keras, deep-learning
1,595,197,223
se_67770595
stackoverflow
MACHINE_LEARNING
How to extract the hidden vector (the output of the ReLU after the third encoder layer) as the image representation
How to extract the hidden vector (the output of the ReLU after the third encoder layer) as the image representation I am implementing an autoencoder using the Fashion MNIST dataset. The code for the encoder- class MNISTClassifier(Model): def __init__(self): super(MNISTClassifier, self).__init__() s...
https://stackoverflow.com/questions/67770595/how-to-extract-the-hidden-vector-the-output-of-the-relu-after-the-third-encoder
tensorflow, keras, deep-learning, tensorflow2.0, autoencoder
1,622,451,050
se_38664487
stackoverflow
MACHINE_LEARNING
Neural Network - Working with a imbalanced dataset
Neural Network - Working with a imbalanced dataset I am working on a Classification problem with 2 labels : 0 and 1. My training dataset is a very imbalanced dataset (and so will be the test set considering my problem). The proportion of the imbalanced dataset is 1000:4 , with label '0' appearing 250 times more than...
https://stackoverflow.com/questions/38664487/neural-network-working-with-a-imbalanced-dataset
neural-network, tensorflow, random-forest
1,469,813,646
se_79398217
stackoverflow
MACHINE_LEARNING
InaccessibleTensorError when using multiple TensorArrays in a list
InaccessibleTensorError when using multiple TensorArrays in a list I am implementing a fairly complex network structure where I need to loop over a (possibly variable) time dimension, compute values at each step, and collect all these values, and do this for multiple layers. The values at each layer could have differe...
https://stackoverflow.com/questions/79398217/inaccessibletensorerror-when-using-multiple-tensorarrays-in-a-list
python, tensorflow, tensorflow2.0, tensorflow-autograph
1,738,185,587
se_56640990
stackoverflow
MACHINE_LEARNING
How to match the output shape of generator and the input shape of discriminator in GAN?
How to match the output shape of generator and the input shape of discriminator in GAN? I am working on my first GANs model, I've followed Tensorflow's official documentation using MNIST dataset. I've run it smoothly. I tried to replace MNIST with my own dataset, I've prepared it to match the same size as MNIST: 28 * ...
https://stackoverflow.com/questions/56640990/how-to-match-the-output-shape-of-generator-and-the-input-shape-of-discriminator
python, tensorflow, keras, neural-network, deep-learning
1,560,824,690
se_53324596
stackoverflow
MACHINE_LEARNING
Why does my MNIST dataset model only get an accuracy of around 11%?
Why does my MNIST dataset model only get an accuracy of around 11%? For a model to classify digits in the MNIST dataset I used Keras: from keras.models import Sequential from keras.layers import Dense from keras.datasets import mnist from os import path import numpy as np network = Sequential() network.add(Dense(700...
https://stackoverflow.com/questions/53324596/why-does-my-mnist-dataset-model-only-get-an-accuracy-of-around-11
python, python-3.x, tensorflow, keras, neural-network
1,542,301,619
se_62760477
stackoverflow
MACHINE_LEARNING
Changing MobileNet Dropout After Loading
Changing MobileNet Dropout After Loading I am working a transfer learning problem. When I create a new model from just the Mobilenet, I set a dropout. base_model = MobileNet(weights='imagenet', include_top=False, input_shape=(200,200,3), dropout=.15) x = base_model.output x = GlobalAveragePooling2D()(x) x = Dense(10, ...
https://stackoverflow.com/questions/62760477/changing-mobilenet-dropout-after-loading
python, tensorflow, keras, dropout, mobilenet
1,594,053,103
se_79726822
stackoverflow
MACHINE_LEARNING
Google Colab shows TPU connected, but TensorFlow can&#39;t detect TPU (COLAB_TPU_ADDR: None)
Google Colab shows TPU connected, but TensorFlow can&#39;t detect TPU (COLAB_TPU_ADDR: None) I'm trying to use TPU in Google Colab for training a TensorFlow/Keras model. I selected TPU under: Runtime > Change runtime type > Hardware accelerator > TPU And Colab shows this at the top: Connected to Python 3 Google Compu...
https://stackoverflow.com/questions/79726822/google-colab-shows-tpu-connected-but-tensorflow-cant-detect-tpu-colab-tpu-add
tensorflow, google-colaboratory, tpu, google-cloud-tpu
1,754,454,260
se_55072299
stackoverflow
MACHINE_LEARNING
Neural network weights too large?
Neural network weights too large? I'm implementing a neural network with backward propagation. The weights are initialized to (-0.5, 0.5). However, after the first time the inputs are sent forward and errors and propagated back, the weights are increased to be around 1000, sometimes even 2000. (between the input layer...
https://stackoverflow.com/questions/55072299/neural-network-weights-too-large
tensorflow, machine-learning, neural-network
1,552,086,877
se_79529428
stackoverflow
MACHINE_LEARNING
What is wrong with my Python and Tensorflow install?
What is wrong with my Python and Tensorflow install? I work on a PC with Windows 11 and have installed Python 3.11.9 which is supposed to be the required Python version for Tensorflow. I also installed numpy 1.26.4, scipy 1.15.2, Orange3 3.38.1 which were requested during earlier failures to install Tensorflow. The co...
https://stackoverflow.com/questions/79529428/what-is-wrong-with-my-python-and-tensorflow-install
python, python-3.x, numpy, tensorflow
1,742,753,974
se_79727624
stackoverflow
MACHINE_LEARNING
TensorFlow hangs indefinitely on model.fit() even with synthetic data
TensorFlow hangs indefinitely on model.fit() even with synthetic data I have my dataset with images to classify, using an ML model in TensorFlow. When I train the model for a number of epochs, TensorFlow automatically prints out which epoch we are on. Mine is always stuck on 1/n. None of the batches are ever processed...
https://stackoverflow.com/questions/79727624/tensorflow-hangs-indefinitely-on-model-fit-even-with-synthetic-data
python, tensorflow, machine-learning
1,754,500,172
se_59480642
stackoverflow
MACHINE_LEARNING
Why is every prediction for my MNIST digit project wrong?
Why is every prediction for my MNIST digit project wrong? I have done this basic project with Anaconda notebook. Everything runs fine, but every prediction with my own digit picture is wrong. I am using the MNIST Set for digital numbers and I am trying to paint my own digit with black background and white painting. B...
https://stackoverflow.com/questions/59480642/why-is-every-prediction-for-my-mnist-digit-project-wrong
python, tensorflow, machine-learning, neural-network, mnist
1,577,295,656
se_78419755
stackoverflow
MACHINE_LEARNING
TensorFlow.keras namespace not recognized by PyLance in Visual Studio Code
TensorFlow.keras namespace not recognized by PyLance in Visual Studio Code I'm encountering an issue with PyLance in Visual Studio Code where the tensorflow.keras namespace isn't being recognized, leading to incomplete IntelliSense and auto-completion. It appears that this problem stems from the lazy loading functiona...
https://stackoverflow.com/questions/78419755/tensorflow-keras-namespace-not-recognized-by-pylance-in-visual-studio-code
python, tensorflow, visual-studio-code, machine-learning, intellisense
1,714,659,118
se_49702795
stackoverflow
MACHINE_LEARNING
Augment MNIST dataset tensorflow
Augment MNIST dataset tensorflow I am trying to augment the MNIST dataset. This is what I tried. Can't get any success. from tensorflow.examples.tutorials.mnist import input_data import tensorflow as tf X = mnist.train.images y = mnist.train.labels def flip_images(X_imgs): X_flip = [] tf.reset_default_graph(...
https://stackoverflow.com/questions/49702795/augment-mnist-dataset-tensorflow
python, tensorflow, machine-learning, computer-vision, mnist
1,523,062,725
se_49932993
stackoverflow
MACHINE_LEARNING
ImportError: DLL load failed: A dynamic link library (DLL) initialization routine failed
ImportError: DLL load failed: A dynamic link library (DLL) initialization routine failed I installed TensorFlow with CPU support with CUDA Toolkit v9.0 and cuDNNv7.1 and Python 3.6 in Conda enviroment. I followed the instructions described in TensorFlow website, and when I tried: import tensorflow as tf I got this er...
https://stackoverflow.com/questions/49932993/importerror-dll-load-failed-a-dynamic-link-library-dll-initialization-routin
python, tensorflow
1,524,191,357
se_79722645
stackoverflow
MACHINE_LEARNING
How to decode a tfrecord based on the available meta data
How to decode a tfrecord based on the available meta data I have a three tfrecords (train,test valid) from the a deepmind github repo (https://github.com/google-deepmind/deepmind-research/tree/master/meshgraphnets) that I am trying to decode (at the minute just to interrogate the data but long term to train a GNN) how...
https://stackoverflow.com/questions/79722645/how-to-decode-a-tfrecord-based-on-the-available-meta-data
python, tensorflow, tfrecord, graph-neural-network
1,754,058,689
se_47145841
stackoverflow
MACHINE_LEARNING
How to install TensorFlow in MacOS?
How to install TensorFlow in MacOS? Can anyone tell me easiest way to install TensorFlow in my MacOS specifically Apple Silicon & Intel MacBook? I have tried below command using virtualenv in my Mac but it doesn't worked! virtualenv --system-site-packages ~/tensorflow -bash: virtualenv: command not found Is there any...
https://stackoverflow.com/questions/47145841/how-to-install-tensorflow-in-macos
macos, tensorflow, machine-learning, apple-silicon
1,510,002,629
se_47599145
stackoverflow
MACHINE_LEARNING
Is it possible to reduce sum while ignoring the NaN values?
Is it possible to reduce sum while ignoring the NaN values? Suppose I have a 2-D tensor of (batch_size, loss_dim) and I hope to get the sum of each of the loss dimensions for each data sample, which can be done with tf.reduce_mean(tensor, axis=-1). However, what if there are NaN values in my tensor and I want to simp...
https://stackoverflow.com/questions/47599145/is-it-possible-to-reduce-sum-while-ignoring-the-nan-values
tensorflow
1,512,151,826
se_77179215
stackoverflow
MACHINE_LEARNING
TF Lite shows only zeros on prediction
TF Lite shows only zeros on prediction I'm building a model in Tensorflow 2.10 for a classification problem. The model works fine on PC, but when converted to TF Lite, it shows only zeros in the prediction list. Model was tested on Android 13 using Flutter. I want to repair the model but I don't see any error that wou...
https://stackoverflow.com/questions/77179215/tf-lite-shows-only-zeros-on-prediction
python, dart, tensorflow, machine-learning, tensorflow-lite
1,695,724,702
se_65831968
stackoverflow
MACHINE_LEARNING
tensor board output is not shown when I am trying to run the jupyter notebook on VSC
tensor board output is not shown when I am trying to run the jupyter notebook on VSC I am trying to run this code on my system (Windows,VSC, Python 3.8): https://www.tensorflow.org/tensorboard/graphs I can see a message saying that tensorboard is launching but nothing show: What is the problem and how I can fix it? E...
https://stackoverflow.com/questions/65831968/tensor-board-output-is-not-shown-when-i-am-trying-to-run-the-jupyter-notebook-on
python, tensorflow, visual-studio-code, jupyter-notebook, tensorboard
1,611,247,596