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_79638347
stackoverflow
MACHINE_LEARNING
How to convert discrete choices (of a color) from neural network output to colors directly in tensorflow?
How to convert discrete choices (of a color) from neural network output to colors directly in tensorflow? Context: I am learning to use tensorflow and want to do a simple experiment where I provide a neural network with 4 color choices for each pixel. The network should learn to pick the best colors from choices avail...
https://stackoverflow.com/questions/79638347/how-to-convert-discrete-choices-of-a-color-from-neural-network-output-to-color
python, numpy, tensorflow, keras, neural-network
1,748,237,381
se_79605339
stackoverflow
MACHINE_LEARNING
Tokenize and pad text sequences using TensorFlow for NLP classification
Tokenize and pad text sequences using TensorFlow for NLP classification I'm working on a text classification problem using TensorFlow and NLP. I'm using the Tokenizer and pad_sequences utilities from tensorflow.keras.preprocessing.text. However, I'm encountering issues with sequence lengths and model input shapes. fro...
https://stackoverflow.com/questions/79605339/tokenize-and-pad-text-sequences-using-tensorflow-for-nlp-classification
python, tensorflow, nlp
1,746,339,824
se_73874287
stackoverflow
MACHINE_LEARNING
How do I resolve the error: Attempting to use a delegate that only supports static-sized tensors with a graph that has dynamic-sized tensors?
How do I resolve the error: Attempting to use a delegate that only supports static-sized tensors with a graph that has dynamic-sized tensors? I am trying to compile an image segmentation (U-net) model to run it on edge TPU (Coral Board). I have converted and quantized the model into .tflite and I am getting the follow...
https://stackoverflow.com/questions/73874287/how-do-i-resolve-the-error-attempting-to-use-a-delegate-that-only-supports-stat
python, tensorflow, deep-learning, tflite, edge-tpu
1,664,316,884
se_41567895
stackoverflow
MACHINE_LEARNING
Will scikit-learn utilize GPU?
Will scikit-learn utilize GPU? Reading implementation of scikit-learn in TensorFlow: http://learningtensorflow.com/lesson6/ and scikit-learn: http://scikit-learn.org/stable/modules/generated/sklearn.cluster.KMeans.html I'm struggling to decide which implementation to use. scikit-learn is installed as part of the tenso...
https://stackoverflow.com/questions/41567895/will-scikit-learn-utilize-gpu
python, tensorflow, scikit-learn, k-means, neuraxle
1,484,048,243
se_79634904
stackoverflow
MACHINE_LEARNING
Mismatch Between Quantized TFLite Layer Outputs and Expected Mathematical Values When Using get_tensor()
Mismatch Between Quantized TFLite Layer Outputs and Expected Mathematical Values When Using get_tensor() I am trying to extract intermediate outputs from a quantized TFLite model using the TFLite interpreter. The goal is to verify that the model's intermediate outputs match the mathematically expected values( tensorfl...
https://stackoverflow.com/questions/79634904/mismatch-between-quantized-tflite-layer-outputs-and-expected-mathematical-values
python, tensorflow, interpreter, tensorflow-lite
1,747,979,227
se_55472095
stackoverflow
MACHINE_LEARNING
AttributeError: module 'resource' has no attribute 'getpagesize'
AttributeError: module 'resource' has no attribute 'getpagesize' I am trying to use Tensorflow Object Detection API and I follow the steps mentioned in the given link - https://tensorflow-object-detection-api-tutorial.readthedocs.io/en/latest/install.html#tf-models-install When I try to access the Ob...
https://stackoverflow.com/questions/55472095/attributeerror-module-resource-has-no-attribute-getpagesize
python-3.x, tensorflow, jupyter-notebook, object-detection
1,554,199,618
se_63006575
stackoverflow
MACHINE_LEARNING
What is the difference between MaxPool and MaxPooling layers in Keras?
What is the difference between MaxPool and MaxPooling layers in Keras? I just started working with keras and noticed that there are two layers with very similar names for max-pooling: MaxPool and MaxPooling. I was surprised that I couldn't find the difference between these two on Google; so I am wondering what the dif...
https://stackoverflow.com/questions/63006575/what-is-the-difference-between-maxpool-and-maxpooling-layers-in-keras
python, tensorflow, machine-learning, keras, deep-learning
1,595,299,480
se_49175704
stackoverflow
MACHINE_LEARNING
How to reproduce results when using dropout regularization in Tensorflow
How to reproduce results when using dropout regularization in Tensorflow I am training a neural network using dropout regularization. I save the weights and biases the network is initialized with, so that I can repeat the experiment when I get good results. However, the use of dropout introduces some randomness in t...
https://stackoverflow.com/questions/49175704/how-to-reproduce-results-when-using-dropout-regularization-in-tensorflow
python, python-3.x, tensorflow, deterministic, regularized
1,520,519,846
se_68046380
stackoverflow
MACHINE_LEARNING
Loading a Keras model given an already opened file
Loading a Keras model given an already opened file The common way to load a saved model is with keras.models.load_model method. keras.models.load_model("/mypath/model.h5") My question is if this can be done giving a file object, something like this: file = open("/mypath/model.h5") keras.models.load_model(file) This ...
https://stackoverflow.com/questions/68046380/loading-a-keras-model-given-an-already-opened-file
python, file, tensorflow, keras
1,624,102,270
se_79624070
stackoverflow
MACHINE_LEARNING
Tensorflow allocates memory on GPU but GPU utilization 0% when running keras.model.fit()?
Tensorflow allocates memory on GPU but GPU utilization 0% when running keras.model.fit()? I am training a CNN using keras and tensorflow on my NVIDIA RTX 2000 Ada Generation Laptop GPU on Ubuntu 24.04 with recommended nvidia-driver-570. When I train my network on the cpu only version of tensorflow, it takes a long tim...
https://stackoverflow.com/questions/79624070/tensorflow-allocates-memory-on-gpu-but-gpu-utilization-0-when-running-keras-mod
tensorflow, keras, tensorflow2.0, tf.keras, nvidia-smi
1,747,337,124
se_79628711
stackoverflow
MACHINE_LEARNING
Grid search scikeras error : 'super' object has no attribute '__sklearn_tags__'
Grid search scikeras error : 'super' object has no attribute '__sklearn_tags__' I am trying to run a gridsearch in my pycharm jupyter notebook. Getting 'super' object has no attribute '__sklearn_tags__' error. This question was asked for RandomizedSearch previously, but none of the answers seem to wo...
https://stackoverflow.com/questions/79628711/grid-search-scikeras-error-super-object-has-no-attribute-sklearn-tags
python, tensorflow, keras, scikit-learn, pycharm
1,747,656,504
se_79597666
stackoverflow
MACHINE_LEARNING
RuntimeError: mat1 and mat2 shapes cannot be multiplied when using gradcam
RuntimeError: mat1 and mat2 shapes cannot be multiplied when using gradcam I made a cnn model like this and trained the batch dataset. My data preprocessing code was this train_dir = r'C:\Users\roobe\BACH\norm\train\patches\train' # 훈련 데이터 폴더 val_dir = r'C:\Users\roobe\BACH\norm\train\patches\val' # 검증 데이터 폴더 # 데이터...
https://stackoverflow.com/questions/79597666/runtimeerror-mat1-and-mat2-shapes-cannot-be-multiplied-when-using-gradcam
python, tensorflow, machine-learning, deep-learning
1,745,904,934
se_79629288
stackoverflow
MACHINE_LEARNING
ImportError: cannot import name 'applications' from 'tensorflow.python.keras'
ImportError: cannot import name 'applications' from 'tensorflow.python.keras' I am encountering issues importing the applications library to utilize the EfficientNetB0 model in an image classification model training. I have reviewed the TensorFlow documentation, and supposedly, I should use the followi...
https://stackoverflow.com/questions/79629288/importerror-cannot-import-name-applications-from-tensorflow-python-keras
python, tensorflow, keras, efficientnet
1,747,679,651
se_79535477
stackoverflow
MACHINE_LEARNING
How can I save a TFLite model with a fixed input shape after using interpreter.resize_input_tensor?
How can I save a TFLite model with a fixed input shape after using interpreter.resize_input_tensor? I am trying to run inference using the TFLite model of multipose-lightning-tflite-float16 distributed by movenet. https://www.kaggle.com/models/google/movenet/tfLite However, this model cannot be used unless you specify...
https://stackoverflow.com/questions/79535477/how-can-i-save-a-tflite-model-with-a-fixed-input-shape-after-using-interpreter-r
python, tensorflow, tensorflow-lite, pose-estimation
1,742,967,145
se_79565183
stackoverflow
MACHINE_LEARNING
How can I convert a TensorFlow 1 "BigGAN" model on Kaggle to TensorFlow Lite format?
How can I convert a TensorFlow 1 "BigGAN" model on Kaggle to TensorFlow Lite format? How can I convert a TensorFlow 1 "BigGAN" model on Kaggle to TensorFlow Lite format? https://www.tensorflow.org/hub/tutorials/biggan_generation_with_tf_hub?hl=ja I am trying to implement the following source code to define a...
https://stackoverflow.com/questions/79565183/how-can-i-convert-a-tensorflow-1-biggan-model-on-kaggle-to-tensorflow-lite-for
tensorflow, tensorflow-lite, kaggle
1,744,226,538
se_71978756
stackoverflow
MACHINE_LEARNING
Keras symbolic inputs/outputs do not implement `__len__` error
Keras symbolic inputs/outputs do not implement `__len__` error I want to make an AI playing my custom environment, unfortunately, when I run my code, following error accrues: File "C:\Program Files\JetBrains\PyCharm Community Edition 2021.2\plugins\python-ce\helpers\pydev\_pydev_bundle\pydev_umd.py", line 198, in ru...
https://stackoverflow.com/questions/71978756/keras-symbolic-inputs-outputs-do-not-implement-len-error
python, python-3.x, tensorflow, keras, reinforcement-learning
1,650,708,928
se_79626055
stackoverflow
MACHINE_LEARNING
One-Step Ahead Forecasting with TensorFlow Structural Time Series
One-Step Ahead Forecasting with TensorFlow Structural Time Series I have the following situation: I’m given a univariate time-series dataset y that I wish to model using feature variables X, which are provided alongside y. Naturally, my instinct is to split the data into a training set (y_train, X_train) and a testing...
https://stackoverflow.com/questions/79626055/one-step-ahead-forecasting-with-tensorflow-structural-time-series
tensorflow, time-series, modeling, tensorflow-probability
1,747,438,435
se_56754220
stackoverflow
MACHINE_LEARNING
Resolvilng: 'InvalidArgumentError: Number of channels must be 1, 3 or 4, was 0 [[{{node DecodeBmp_1}}]] [[{{node IteratorGetNext_11}}]]'
Resolvilng: 'InvalidArgumentError: Number of channels must be 1, 3 or 4, was 0 [[{{node DecodeBmp_1}}]] [[{{node IteratorGetNext_11}}]]' I am trying to train a neural network for it to find lines in images, the images are in bmp file format and grey-scale. After the network training phase has begun the program...
https://stackoverflow.com/questions/56754220/resolvilng-invalidargumenterror-number-of-channels-must-be-1-3-or-4-was-0
python, tensorflow, image-segmentation
1,561,466,143
se_70307952
stackoverflow
MACHINE_LEARNING
Get warning : You should probably TRAIN this model on a downstream task to be able to use it for predictions and inference. when loadin finetune model
Get warning : You should probably TRAIN this model on a downstream task to be able to use it for predictions and inference. when loadin finetune model I get this message when loading a finetune model of Bert with a forward neural network on the last layer from a checkpoint directory. This IS expected if you are initia...
https://stackoverflow.com/questions/70307952/get-warning-you-should-probably-train-this-model-on-a-downstream-task-to-be-ab
python, python-3.x, tensorflow, pytorch, huggingface-transformers
1,639,155,382
se_34240703
stackoverflow
MACHINE_LEARNING
What are logits? What is the difference between softmax and softmax_cross_entropy_with_logits?
What are logits? What is the difference between softmax and softmax_cross_entropy_with_logits? In the tensorflow API docs they use a keyword called logits. What is it? A lot of methods are written like: tf.nn.softmax(logits, name=None) If logits is just a generic Tensor input, why is it named logits? Secondly, what ...
https://stackoverflow.com/questions/34240703/what-are-logits-what-is-the-difference-between-softmax-and-softmax-cross-entrop
python, machine-learning, tensorflow
1,449,929,007
se_54249577
stackoverflow
MACHINE_LEARNING
ImportError: libcuda.so.1: cannot open shared object file
ImportError: libcuda.so.1: cannot open shared object file When I run my code with TensorFlow directly, everything is normal. However, when I run it in a screen window, I get the following error. ImportError: libcuda.so.1: cannot open shared object file: No such file or directory I have tried the command: source /etc/...
https://stackoverflow.com/questions/54249577/importerror-libcuda-so-1-cannot-open-shared-object-file
python, tensorflow, cuda, screen, cuda-driver
1,547,797,187
se_79615886
stackoverflow
MACHINE_LEARNING
Error: A KerasTensor is symbolic: it's a placeholder for a shape an a dtype. It doesn't have any actual numerical value
Error: A KerasTensor is symbolic: it's a placeholder for a shape an a dtype. It doesn't have any actual numerical value I have trying to recreate this tutorial that's found on tensorflow's docs. However, I've been having an error I cannot solve and seems to be related to the literal source code of the tutorial...
https://stackoverflow.com/questions/79615886/error-a-kerastensor-is-symbolic-its-a-placeholder-for-a-shape-an-a-dtype-it
python, tensorflow, keras, bert-language-model
1,746,908,546
se_78731754
stackoverflow
MACHINE_LEARNING
How do I fix an 'AttributeError: 'Sequential' object has no attribute '_get_save_spec' in Python
How do I fix an 'AttributeError: 'Sequential' object has no attribute '_get_save_spec' in Python This code produces error 'AttributeError: 'Sequential' object has no attribute '_get_save_spec': import tensorflow as tf model = tf.keras.models.load_model("../mymodel.keras") model.compile(optimizer='...
https://stackoverflow.com/questions/78731754/how-do-i-fix-an-attributeerror-sequential-object-has-no-attribute-get-save
tensorflow, keras, attributeerror, tensorflow-lite, sequential
1,720,629,036
se_79619981
stackoverflow
MACHINE_LEARNING
tflite model does not predict all the lines in hand as the .pt model does
tflite model does not predict all the lines in hand as the .pt model does I trained a YOLOv8 model for hand line detection. When I test the model in Python, it correctly detects all four hand lines, but when I convert the model to .tflite format and test it in Android Studio (Kotlin), it only predicts three lines. Pro...
https://stackoverflow.com/questions/79619981/tflite-model-does-not-predict-all-the-lines-in-hand-as-the-pt-model-does
kotlin, tensorflow, pytorch, artificial-intelligence
1,747,150,614
se_66843500
stackoverflow
MACHINE_LEARNING
How to convert a list of dictionaries to a tensorflow dataset?
How to convert a list of dictionaries to a tensorflow dataset? I have a .jsonl dataset that I am trying to convert into a tensorflow dataset. Each line of the .jsonl is of the form {"text": "some text", "meta": "irrelevant"} I need to get it into a tensorflow dataset where each element has a key "text" associated wit...
https://stackoverflow.com/questions/66843500/how-to-convert-a-list-of-dictionaries-to-a-tensorflow-dataset
python, json, tensorflow, tensorflow-datasets
1,616,948,012
se_50523674
stackoverflow
MACHINE_LEARNING
Deploying a microservice with Tensorflow at AWS Lambda
Deploying a microservice with Tensorflow at AWS Lambda I have been stuck here for too long. I am trying to deploy a microservice that uses tensorflow. There is a single file by the name of handler.py which has the simple code below: import json import tensorflow as tf import numpy as np def main(event, context): ...
https://stackoverflow.com/questions/50523674/deploying-a-microservice-with-tensorflow-at-aws-lambda
python, amazon-web-services, tensorflow, aws-lambda
1,527,233,142
se_62093781
stackoverflow
MACHINE_LEARNING
Run Tensorflow 2 prediction on AWS Lambda
Run Tensorflow 2 prediction on AWS Lambda I want to run a Tensorflow 2 LinearClassifier on AWS Lambda. I have a trained LinearClassifier tensorflow model. I want to run only the prediction in AWS Lambda, because of cost efficeny. Currently I'm not sure how to handle it. I tried to use normal TF2, but it is too big...
https://stackoverflow.com/questions/62093781/run-tensorflow-2-prediction-on-aws-lambda
python, amazon-web-services, tensorflow, aws-lambda
1,590,782,353
se_79617456
stackoverflow
MACHINE_LEARNING
TorchScript error: "The size of tensor a (3549) must match the size of tensor b (8400)" using YOLOv8 model on Android with PyTorch Mobile
TorchScript error: "The size of tensor a (3549) must match the size of tensor b (8400)" using YOLOv8 model on Android with PyTorch Mobile I'm developing an Android application that uses a YOLOv8 model exported to TorchScript, which I load with PyTorch Mobile for object detection. The model was exported using...
https://stackoverflow.com/questions/79617456/torchscript-error-the-size-of-tensor-a-3549-must-match-the-size-of-tensor-b
python, android, kotlin, tensorflow, torchscript
1,747,038,146
se_61385819
stackoverflow
MACHINE_LEARNING
Trying to use data from coco-ssd to draw a bounding box
Trying to use data from coco-ssd to draw a bounding box I have been recently inquiring about image recognition and found that JavaScript had an easy to use and beginner friendly way to do this using tensorflow.js. I managed to use the exemplar code for an interesting model I found called coco-ssd. It works really well...
https://stackoverflow.com/questions/61385819/trying-to-use-data-from-coco-ssd-to-draw-a-bounding-box
javascript, tensorflow, machine-learning, computer-vision, tensorflow.js
1,587,640,247
se_79598568
stackoverflow
MACHINE_LEARNING
Asynchronous multi-client Hugging Face inference server without blocking GPU utilization
Asynchronous multi-client Hugging Face inference server without blocking GPU utilization I'm building a local inference server that handles multiple user requests concurrently on a single GPU. Each user sends a prompt to a Hugging Face model (e.g., Llama-2, Mistral, Falcon). However, I noticed that: Running one large...
https://stackoverflow.com/questions/79598568/asynchronous-multi-client-hugging-face-inference-server-without-blocking-gpu-uti
python, tensorflow, huggingface-transformers, large-language-model
1,745,935,644
se_79614771
stackoverflow
MACHINE_LEARNING
tensorflow/core/framework/local_rendezvous.cc:407] Local rendezvous is aborting with status: OUT_OF_RANGE
tensorflow/core/framework/local_rendezvous.cc:407] Local rendezvous is aborting with status: OUT_OF_RANGE I am experiencing an issue with an image classification model. After extracting frames from videos, saving them in a suitable folder structure for creating an image dataset from a directory using tf.keras.utils.im...
https://stackoverflow.com/questions/79614771/tensorflow-core-framework-local-rendezvous-cc407-local-rendezvous-is-aborting
python, image, tensorflow, keras, model
1,746,819,177
se_79611424
stackoverflow
MACHINE_LEARNING
tf.keras.utils.image_dataset_from_directory Found 0 files belonging to 0 classes
tf.keras.utils.image_dataset_from_directory Found 0 files belonging to 0 classes I am currently attempting to develop an image classification model and have organized my data using the following DATASET/ ejercicio1/ train/ frames/ ejercicio1_train_0001.jpg ejercicio1_train_0002.jpg...
https://stackoverflow.com/questions/79611424/tf-keras-utils-image-dataset-from-directory-found-0-files-belonging-to-0-classes
python, tensorflow, keras
1,746,652,870
se_79611606
stackoverflow
MACHINE_LEARNING
Is it safe to save preprocessed features with numpy in one Python environment and load them in another for model training?
Is it safe to save preprocessed features with numpy in one Python environment and load them in another for model training? I'm working on a deepfake detection project using TensorFlow 2.6.2 on Windows. Due to package version conflicts (e.g. tensorflow==2.6.2 requires flatbuffers==1.12, but mediapipe requires flatbuffe...
https://stackoverflow.com/questions/79611606/is-it-safe-to-save-preprocessed-features-with-numpy-in-one-python-environment-an
python, tensorflow, deep-learning
1,746,668,140
se_67584663
stackoverflow
MACHINE_LEARNING
how to use GTX 1660 supper GPU in tensorflow?
how to use GTX 1660 supper GPU in tensorflow? Edit: it worked when I reinstall tensorflow. I have GTX 1660 supper GPU and I installed the latest version of CUDA, cuDNN and the Driver. when I import tensorflow as tf I get this message. 2021-05-18 12:19:45.541654: I tensorflow/stream_executor/platform/default/dso_loade...
https://stackoverflow.com/questions/67584663/how-to-use-gtx-1660-supper-gpu-in-tensorflow
python-3.x, tensorflow
1,621,334,705
se_33622842
stackoverflow
MACHINE_LEARNING
Error in python after 'import tensorflow': TypeError: __init__() got an unexpected keyword argument 'syntax'
Error in python after 'import tensorflow': TypeError: __init__() got an unexpected keyword argument 'syntax' I installed TensorFlow on my Ubuntu 15.10 machine as instructed for CPU only: $ pip install https://storage.googleapis.com/tensorflow/linux/cpu/tensorflow-0.5.0-cp27-none-linux_x86_64.whl The...
https://stackoverflow.com/questions/33622842/error-in-python-after-import-tensorflow-typeerror-init-got-an-unexpect
ubuntu, tensorflow
1,447,129,442
se_79608270
stackoverflow
MACHINE_LEARNING
Tensorflow timeseries cant predict Sine
Tensorflow timeseries cant predict Sine i am trying to validate a tensorflow code for simple timeseries prediction in where: X = np.arange(0, 2000, 0.5) y = 2 * np.sin(X) + 0.8 * np.random.rand(X.shape[0]) and the following parameters for the timeseries: LOOK_BACK = 100 FORECAST_HORIZON = 100 any model I use or try...
https://stackoverflow.com/questions/79608270/tensorflow-timeseries-cant-predict-sine
python, tensorflow, machine-learning
1,746,519,751
se_78409648
stackoverflow
MACHINE_LEARNING
TensorFlow/Transformers Compatibility Issue: ImportError from tensorflow.keras Causes Failure with TFElectraModel
TensorFlow/Transformers Compatibility Issue: ImportError from tensorflow.keras Causes Failure with TFElectraModel The following code is from two years ago and throws an error on my current setup. I was wondering if it is related to the change to Keras 3 or what't is going on here. I can get it to work by excluding al...
https://stackoverflow.com/questions/78409648/tensorflow-transformers-compatibility-issue-importerror-from-tensorflow-keras-c
python, tensorflow, keras
1,714,491,482
se_79607852
stackoverflow
MACHINE_LEARNING
GNN Loss NaN after first training example?
GNN Loss NaN after first training example? I am trying to train a GNN but am getting a NaN loss function immediately after the first training example. Below I have included all of the pertinent code. My input is 385 points in 3D space confined to a box with periodic boundary conditions. My model takes 5 inputs: a 385...
https://stackoverflow.com/questions/79607852/gnn-loss-nan-after-first-training-example
python, tensorflow, keras, deep-learning
1,746,496,141
se_69160892
stackoverflow
MACHINE_LEARNING
ValueError: No gradients provided for any variable while doing regression for integer values, which include negatives using keras
ValueError: No gradients provided for any variable while doing regression for integer values, which include negatives using keras I have a problem where I need to predict some integers from an image. The problem is that this includes some negative integers too. I have done some research and came across Poisson which d...
https://stackoverflow.com/questions/69160892/valueerror-no-gradients-provided-for-any-variable-while-doing-regression-for-in
python, tensorflow, keras
1,631,527,775
se_79606076
stackoverflow
MACHINE_LEARNING
How Can I Get Positive Responses Only from a Neural Net?
How Can I Get Positive Responses Only from a Neural Net? I'm using TensorFlow. I have many simulated datasets for which values are real. Each one consists of 200 rows and two columns (variables). I'm using a convolutional neural net. I want the simulated data to be the input, and the three parameters in the model that...
https://stackoverflow.com/questions/79606076/how-can-i-get-positive-responses-only-from-a-neural-net
python, tensorflow, neural-network, conv-neural-network
1,746,393,708
se_79604798
stackoverflow
MACHINE_LEARNING
How does the Tensorflow Gradient Tape calculation work at a low level?
How does the Tensorflow Gradient Tape calculation work at a low level? I have just seen some code which has sparked my interest. with tf.GradientTape() as g: y = f(x) dy_dx = g.gradient(y, x) (Code loosely taken from this reference.) There are two things which I think are interesting about this: The use of a co...
https://stackoverflow.com/questions/79604798/how-does-the-tensorflow-gradient-tape-calculation-work-at-a-low-level
python, tensorflow, machine-learning, neural-network
1,746,282,325
se_79603499
stackoverflow
MACHINE_LEARNING
Training a custom tokenizer with Huggingface gives weird token splits at inference
Training a custom tokenizer with Huggingface gives weird token splits at inference So I trained a tokenizer from scratch using Huggingface’s tokenizers library (not AutoTokenizer.from_pretrained, but actually trained a new one). Seemed to go fine, no errors. But when I try to use it during inference, it splits words i...
https://stackoverflow.com/questions/79603499/training-a-custom-tokenizer-with-huggingface-gives-weird-token-splits-at-inferen
python, tensorflow, nlp, bert-language-model
1,746,193,405
se_79603150
stackoverflow
MACHINE_LEARNING
Tensorflow Dimension Errors
Tensorflow Dimension Errors There is a problem when I'm using this model to classify images here is my scan screen code import 'dart:io'; import 'package:flutter/material.dart'; import 'package:camera/camera.dart'; import 'package:waste_pal/widgets/processing-image.dart'; import 'package:url_launcher/url_launcher.dart...
https://stackoverflow.com/questions/79603150/tensorflow-dimension-errors
flutter, tensorflow
1,746,179,442
se_79594764
stackoverflow
MACHINE_LEARNING
Increasing the size of the model
Increasing the size of the model 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): """ This function create m...
https://stackoverflow.com/questions/79594764/increasing-the-size-of-the-model
python, tensorflow, machine-learning
1,745,736,646
se_74832665
stackoverflow
MACHINE_LEARNING
Transfer Learning for Vanilla Neural Network
Transfer Learning for Vanilla Neural Network Is it possible to do transfer learning for vanilla neural network? I meant vanilla neural network as classic classification prediction such as whether the transaction is a fraud, the employee may quit the job, etc. I have a trained neural network model which I would like to...
https://stackoverflow.com/questions/74832665/transfer-learning-for-vanilla-neural-network
tensorflow, machine-learning, pytorch, neural-network
1,671,264,828
se_79599767
stackoverflow
MACHINE_LEARNING
ImportError: cannot import name 'pywrap_tensorflow' from 'tensorflow.python' after reinstalling Python and TensorFlow
ImportError: cannot import name 'pywrap_tensorflow' from 'tensorflow.python' after reinstalling Python and TensorFlow I'm encountering an issue when trying to import tensorflow after reinstalling both Python and TensorFlow. Here is the error I get when trying to simply import tensorflow: ImportError ...
https://stackoverflow.com/questions/79599767/importerror-cannot-import-name-pywrap-tensorflow-from-tensorflow-python-aft
python, python-3.x, tensorflow, pip, huggingface-transformers
1,745,998,040
se_39238057
stackoverflow
MACHINE_LEARNING
TypeError: argument of type 'float' is not iterable
TypeError: argument of type 'float' is not iterable I am new to python and TensorFlow. I recently started understanding and executing TensorFlow examples, and came across this one: https://www.tensorflow.org/versions/r0.10/tutorials/wide_and_deep/index.html I got the error, TypeError: argument of type 'float' ...
https://stackoverflow.com/questions/39238057/typeerror-argument-of-type-float-is-not-iterable
python, pandas, tensorflow
1,472,596,144
se_64743987
stackoverflow
MACHINE_LEARNING
Error while using Tensorflow: no attribute 'variable_scope'
Error while using Tensorflow: no attribute 'variable_scope' While using Tensorflow 2.x with 1.x code the following error occurs: Code: # load VAE model import tensorflow.compat.v1 as tf #version - 2.3.0 tf.disable_v2_behavior() tf.Variable tf.enable_eager_execution tf.variable_scope config = process_config('NA...
https://stackoverflow.com/questions/64743987/error-while-using-tensorflow-no-attribute-variable-scope
python, tensorflow
1,604,877,210
se_61078946
stackoverflow
MACHINE_LEARNING
How to Get Reproducible Results (Keras, Tensorflow):
How to Get Reproducible Results (Keras, Tensorflow): To make the results reproducible I've red more than 20 articles and added to my script maximum of the functions ... but failed. In the official source I red there are 2 kinds of seeds - global and operational. May be, the key to solving my problem is setting the o...
https://stackoverflow.com/questions/61078946/how-to-get-reproducible-results-keras-tensorflow
tensorflow, keras, neural-network, tensorflow2.0
1,586,258,800
se_76035213
stackoverflow
MACHINE_LEARNING
Compatibility issues of tensorflow with numpy versions
Compatibility issues of tensorflow with numpy versions I installed tensorflow via my Anaconda prompt and the command pip install tensorflow Thus, tensorflow-2.12.0 was installed. However, this came with the error message numba 0.55.1 requires numpy<1.22,>=1.18, but you have numpy 1.22.4 which is incompatible. When ...
https://stackoverflow.com/questions/76035213/compatibility-issues-of-tensorflow-with-numpy-versions
python, numpy, tensorflow
1,681,734,927
se_59402205
stackoverflow
MACHINE_LEARNING
Dose Chinese need WordPiece?
Dose Chinese need WordPiece? I want to use Chinese Bert model. In tokenization.py, I found a WordpieceTokenizer function, but I don't think it is needed to use WordPiece for Chinese, because the minimal unit of Chinese is character. WordpieceTokenizer is just for English text, am I right?
https://stackoverflow.com/questions/59402205/dose-chinese-need-wordpiece
tensorflow, nlp
1,576,719,035
se_79593658
stackoverflow
MACHINE_LEARNING
how to load a tensorflow model using tensorflowjs
how to load a tensorflow model using tensorflowjs i was building a simple demo that would load a model that i have converted a JSON and binary using tensorfjs. The model is utilizing the following architecture model = Sequential([ Flatten(input_shape=(28, 28)), Dense(128, activation='relu'), Dense(10, acti...
https://stackoverflow.com/questions/79593658/how-to-load-a-tensorflow-model-using-tensorflowjs
tensorflow, keras, tensorflow.js, tensorflowjs-converter
1,745,650,590
se_79592544
stackoverflow
MACHINE_LEARNING
Tensorflow - Trained model always wrong, on image it trained on
Tensorflow - Trained model always wrong, on image it trained on I'm currently learning Tensorflow. And the best way to do so is to get hands dirty right. As an exercise Im training a model with some pokemon data found on kaggle. After the model has been created and I check it with one of the pictures, that trained it,...
https://stackoverflow.com/questions/79592544/tensorflow-trained-model-always-wrong-on-image-it-trained-on
python, tensorflow, machine-learning, model
1,745,585,145
se_75686441
stackoverflow
MACHINE_LEARNING
TypeError: &#39;BatchDataset&#39; object is not subscriptable
TypeError: &#39;BatchDataset&#39; object is not subscriptable plt.figure(figsize = (15,15)) # data_files.take(count) : Creates a Dataset with at most 'count' elements(batch) from the dataset for image, label in data_files.take(1): for i in range(12): plt.subplot(3, 4,i+1) # many plots at a time =>subpots ...
https://stackoverflow.com/questions/75686441/typeerror-batchdataset-object-is-not-subscriptable
python, tensorflow
1,678,374,405
se_69168112
stackoverflow
MACHINE_LEARNING
Post processing output of Palm detector model from MediaPipe
Post processing output of Palm detector model from MediaPipe I'm trying to use the tflite hand models from: https://drive.google.com/file/d/1yiPfkhb4hSbXJZaSq9vDmhz24XVZmxpL/preview I'm having trouble post processing the outputs of the palm detection model to get the bounding box for the palm in an input image. "" Pal...
https://stackoverflow.com/questions/69168112/post-processing-output-of-palm-detector-model-from-mediapipe
tensorflow, machine-learning, computer-vision, tensorflow-lite, inference
1,631,561,270
se_74580987
stackoverflow
MACHINE_LEARNING
No module named &#39;tensorflow.keras&#39; ModuleNotFoundError:
No module named &#39;tensorflow.keras&#39; ModuleNotFoundError: My system information : Windows version : 11 Python version : 3.10.7 Tensorflow : 2.11.0 pip : 22.3.1 I have checked the previous questions which are similar to mine but they didn't help. ModuleNotFoundError: No module named 'tenso...
https://stackoverflow.com/questions/74580987/no-module-named-tensorflow-keras-modulenotfounderror
python, tensorflow, jupyter-notebook, modulenotfounderror
1,669,454,240
se_79592460
stackoverflow
MACHINE_LEARNING
Why does ML.NET Image Classification with Ampere Gpu return fixed results when it otherwise works with CPU and Turing Gpu support?
Why does ML.NET Image Classification with Ampere Gpu return fixed results when it otherwise works with CPU and Turing Gpu support? We currently have a trained ResnetV250 image classification model that performs as expected on CPU and with GPU support on Turing based cards with CUDA 10.1 and cudnn 7.6.4. When transferr...
https://stackoverflow.com/questions/79592460/why-does-ml-net-image-classification-with-ampere-gpu-return-fixed-results-when-i
tensorflow, nvidia, ml.net
1,745,581,889
se_79590419
stackoverflow
MACHINE_LEARNING
Trouble loading tensorflow when running cloned repo
Trouble loading tensorflow when running cloned repo So, I'm trying to get the code from this repo https://github.com/amin20/GBM_WSSM working but I'm running into a persistent error. Using TensorFlow backend. Traceback (most recent call last): File "C:\Users\trans\source\repos\GBM_WSSM\.venv\lib\site-packages\tensorf...
https://stackoverflow.com/questions/79590419/trouble-loading-tensorflow-when-running-cloned-repo
python, tensorflow, keras, deep-learning
1,745,492,847
se_79567564
stackoverflow
MACHINE_LEARNING
Oom-kill event by cgroup when using grid search with cross-validation for training LSTM with Keras
Oom-kill event by cgroup when using grid search with cross-validation for training LSTM with Keras I´m training LSTM models and doing grid search with cross-validation (10 kfolds per model), using parallel processes with MPI on SLURM environment. I'm using CPUs (not tried cuda yet) and getting the following error: slu...
https://stackoverflow.com/questions/79567564/oom-kill-event-by-cgroup-when-using-grid-search-with-cross-validation-for-traini
tensorflow, keras, out-of-memory, slurm, grid-search
1,744,318,586
se_79590090
stackoverflow
MACHINE_LEARNING
model.predict hangs in celery/uwsgi
model.predict hangs in celery/uwsgi import numpy as np import tensorflow as tf import tensorflow_hub as hub from apps.common.utils.error_handling import suppress_callable_to_sentry from django.conf import settings from threading import Lock MODEL_PATH = settings.BASE_DIR / "apps/core/utils/nsfw_detector/nsfw.299x299....
https://stackoverflow.com/questions/79590090/model-predict-hangs-in-celery-uwsgi
python, django, tensorflow, keras, celery
1,745,482,245
se_79588564
stackoverflow
MACHINE_LEARNING
my clasification A.I. model cant surpass a certain validation precision threshold
my clasification A.I. model cant surpass a certain validation precision threshold I've recently getting started with A.I. and for a project i wanted to create a model that can classify what kind of disease you have based on a chest x-ray, After writing the model and using the DenseNet architecture( as it was the best ...
https://stackoverflow.com/questions/79588564/my-clasification-a-i-model-cant-surpass-a-certain-validation-precision-threshol
python, tensorflow, keras, artificial-intelligence, densenet
1,745,409,389
se_64102020
stackoverflow
MACHINE_LEARNING
ModuleNotFoundError: No module named &#39;keras_preprocessing&#39;
ModuleNotFoundError: No module named &#39;keras_preprocessing&#39; I'm trying to implement YOLO3 object detection using tensorflow 2.0 on google colab : https://github.com/theAIGuysCode/Object-Detection-API And for this particular line: !python3 /content/Object-Detection-API/load_weights.py I'm facing this error: Mod...
https://stackoverflow.com/questions/64102020/modulenotfounderror-no-module-named-keras-preprocessing
tensorflow, keras, conda, google-colaboratory
1,601,295,341
se_42755129
stackoverflow
MACHINE_LEARNING
Installing Tensorflow - not supported wheel
Installing Tensorflow - not supported wheel I have installed Python version 3.5 and 3.6 and anaconda. The following error occures when trying to install tensorflow following the steps here https://www.tensorflow.org/install/install_windows unsing anaconda (tensorflow) C:> pip install --ignore-installed --upgrade htt...
https://stackoverflow.com/questions/42755129/installing-tensorflow-not-supported-wheel
python, tensorflow
1,489,366,854
se_44131295
stackoverflow
MACHINE_LEARNING
keras - cannot import name Conv2D
keras - cannot import name Conv2D I recently got the deep learning docker from https://github.com/floydhub/dl-docker running and while trying out the tutorials, received an error when importing the keras layers module. from __future__ import print_function import keras from keras.datasets import cifar10 from keras.p...
https://stackoverflow.com/questions/44131295/keras-cannot-import-name-conv2d
python, tensorflow, neural-network, keras, theano
1,495,532,775
se_79568511
stackoverflow
MACHINE_LEARNING
How can I create an iterative process when i have an TFF error with an inexisting module
How can I create an iterative process when i have an TFF error with an inexisting module When I try to create my iterative process for training my federated models with Tensorflow, I encounter this error module 'tensorflow_federated.python.learning.algorithms' has no attribute 'build_federated_averaging_process' The ...
https://stackoverflow.com/questions/79568511/how-can-i-create-an-iterative-process-when-i-have-an-tff-error-with-an-inexistin
tensorflow, tensorflow-federated, federated-learning
1,744,364,482
se_79561620
stackoverflow
MACHINE_LEARNING
how to convert a QAT quantization aware trained tensorflow graph into tflite model?
how to convert a QAT quantization aware trained tensorflow graph into tflite model? I have am quantizing a neural network using QAT and I want to convert it into tflite. Quantization nodes get added to the skeleton graph and we get a new graph. I am able to load the trained QAT weights on the new graph and I am able t...
https://stackoverflow.com/questions/79561620/how-to-convert-a-qat-quantization-aware-trained-tensorflow-graph-into-tflite-mod
tensorflow, quantization, tflite, quantization-aware-training
1,744,103,315
se_61553444
stackoverflow
MACHINE_LEARNING
There is a sudden increase in loss in my machine training. Is there any specific reason and how it could be addressed?
There is a sudden increase in loss in my machine training. Is there any specific reason and how it could be addressed? I have been training my dataset using a neural network as follows based on a dataset of a stock market index. But all of a sudden after running like over 60 times and the loss suddenly upsurge. Has ...
https://stackoverflow.com/questions/61553444/there-is-a-sudden-increase-in-loss-in-my-machine-training-is-there-any-specific
tensorflow, machine-learning, neural-network, conv-neural-network, lstm
1,588,383,929
se_76963864
stackoverflow
MACHINE_LEARNING
Low score and wrong answer for Flan-T5-XXL &quot;question-answering&quot; task
Low score and wrong answer for Flan-T5-XXL &quot;question-answering&quot; task I'm trying to run Flan-T5-XXL model for a "question-answering" task. Here's how I loaded and executed the model: model_id = "~/Downloads/test_LLM/flan-t5-xxl" tokenizer = AutoTokenizer.from_pretrained(model_id) model = AutoModelForQuestionA...
https://stackoverflow.com/questions/76963864/low-score-and-wrong-answer-for-flan-t5-xxl-question-answering-task
python, tensorflow, nlp, huggingface-transformers, huggingface
1,692,813,807
se_77425414
stackoverflow
MACHINE_LEARNING
How to remove duplicate matplotlib plot
How to remove duplicate matplotlib plot I am trying to develop a small feature that plots dynamically the loss or accuracy during the training of a Tensorflow model. I basically plot the history of accuracies at the end of each batch processing for each epoch (the code still needs some corrections but it works correct...
https://stackoverflow.com/questions/77425414/how-to-remove-duplicate-matplotlib-plot
python, tensorflow, matplotlib, jupyter-notebook, duplicates
1,699,177,124
se_52089601
stackoverflow
MACHINE_LEARNING
Keras Dense layer&#39;s input is not flattened
Keras Dense layer&#39;s input is not flattened This is my test code: from keras import layers input1 = layers.Input((2,3)) output = layers.Dense(4)(input1) print(output) The output is: <tf.Tensor 'dense_2/add:0' shape=(?, 2, 4) dtype=float32> But What Happend? The documentation says: Note: if the input to ...
https://stackoverflow.com/questions/52089601/keras-dense-layers-input-is-not-flattened
python, tensorflow, machine-learning, keras, keras-layer
1,535,605,858
se_79208766
stackoverflow
MACHINE_LEARNING
Install Tensorflow on M1 Max Mac using Conda and VS Code
Install Tensorflow on M1 Max Mac using Conda and VS Code I'm having the hardest time getting Tensorflow to install on my Mac and I've tried several approaches. Searching the internet for solutions led to recreating my Conda environments, trying pip, uninstalling things and trying again, downgrading Python, etc. Now ...
https://stackoverflow.com/questions/79208766/install-tensorflow-on-m1-max-mac-using-conda-and-vs-code
python, tensorflow, keras, installation, conda
1,732,132,483
se_79581077
stackoverflow
MACHINE_LEARNING
libtensorflow not installing on Mac Sillicon chip laptops
libtensorflow not installing on Mac Sillicon chip laptops I am trying to install face-api.js. When running npm install I get the error - npm error Error: Unsupported system: cpu-darwin-arm64. Full logs: npm error command sh -c node scripts/install.js npm error CPU-darwin-1.7.0.tar.gz npm error * Downloading libtensorf...
https://stackoverflow.com/questions/79581077/libtensorflow-not-installing-on-mac-sillicon-chip-laptops
tensorflow, apple-m1
1,744,981,191
se_59231793
stackoverflow
MACHINE_LEARNING
ModuleNotFoundError: No module named &#39;tensorflow.keras&#39;
ModuleNotFoundError: No module named &#39;tensorflow.keras&#39; I have installed DeepPoseKit using the guide on the github page. I have the following tensorflow-gpu version: [jalal@goku examples]$ python -c 'import tensorflow as tf; print(tf.__version__)' /scratch/sjn-p3/anaconda/anaconda3/lib/python3.6/site-package...
https://stackoverflow.com/questions/59231793/modulenotfounderror-no-module-named-tensorflow-keras
python, tensorflow, keras
1,575,769,737
se_79569006
stackoverflow
MACHINE_LEARNING
&#39;TypeError: Bases must be types&#39; when trying to import tensorflow
&#39;TypeError: Bases must be types&#39; when trying to import tensorflow When trying to import tensorflow I get the following error: File "E:/Users/jan/Python_Lernen/NN play_data.py", line 2, in <module> import tensorflow as tf File "E:\Users\jan\Anaconda3\lib\site-packages\tensorflow\__init__.py", line 98, i...
https://stackoverflow.com/questions/79569006/typeerror-bases-must-be-types-when-trying-to-import-tensorflow
tensorflow, tensorflow2.0
1,744,379,715
se_79577591
stackoverflow
MACHINE_LEARNING
Why are my tflite model outputs so much larger than expected?
Why are my tflite model outputs so much larger than expected? UPDATED FOR CLARITY: I'm trying to understand tensorflow at a hello world level I'm getting larger values than I should for my bounding boxes points the way I understand it is that when you normalize you get a value from 0 to 1 then you multiply that by im...
https://stackoverflow.com/questions/79577591/why-are-my-tflite-model-outputs-so-much-larger-than-expected
c++, tensorflow
1,744,818,608
se_79520909
stackoverflow
MACHINE_LEARNING
What&#39;s necessary for the `keras` tag to populate on TensorBoard?
What&#39;s necessary for the `keras` tag to populate on TensorBoard? I'm trying to view the conceptual graph of a fairly complex TensorFlow model in TensorBoard. However, the option is greyed out. (I have no issue viewing the op graph). My understanding is that in TensorBoard, the keras tag is necessary to view the ...
https://stackoverflow.com/questions/79520909/whats-necessary-for-the-keras-tag-to-populate-on-tensorboard
python, tensorflow, keras, tensorboard
1,742,403,813
se_79577892
stackoverflow
MACHINE_LEARNING
ValueError: Only images with two spatial dimensions are supported. If using with color/multichannel images, specify `channel_axis`
ValueError: Only images with two spatial dimensions are supported. If using with color/multichannel images, specify `channel_axis` def hog_transform(x): fd = hog(x.numpy() * 255, orientations=self.orientations, pixels_per_cell=self.pixels_per_cell, ...
https://stackoverflow.com/questions/79577892/valueerror-only-images-with-two-spatial-dimensions-are-supported-if-using-with
python, tensorflow
1,744,828,483
se_79578768
stackoverflow
MACHINE_LEARNING
How to reshape a tensor from [B, L, C] to [B, L * C] in tensorflow 1.x?
How to reshape a tensor from [B, L, C] to [B, L * C] in tensorflow 1.x? I have a tensor whose shape is [B, L, C]. I need to reshape it to [B, L * C]. I've tried this: shape = tf.shape(x) item_vec = tf.reshape(x, [shape[0], shape[1] * shape[2]]) But while I put it into a tf.contrib.layers.fully_connected, it throw out...
https://stackoverflow.com/questions/79578768/how-to-reshape-a-tensor-from-b-l-c-to-b-l-c-in-tensorflow-1-x
python, tensorflow
1,744,876,937
se_70043645
stackoverflow
MACHINE_LEARNING
How to convert from tensor to float
How to convert from tensor to float I am having a list of tensors I want to convert to floating points how can I do it. I have tried using .item but it is not working. I am getting ValueError: only one element tensors can be converted to Python scalars. tensor([[12.1834, 4.9616, 7.7913], [ 8.9394, 8.5784, ...
https://stackoverflow.com/questions/70043645/how-to-convert-from-tensor-to-float
python, tensorflow, pytorch, tensor, torch
1,637,388,382
se_79577327
stackoverflow
MACHINE_LEARNING
Reinforcement learning Atari video recording crashes
Reinforcement learning Atari video recording crashes I am learning Reinforcement Learning and picked the Atari Breakout environment to learn. I have trained the neural nets, and now am trying to create some videos to visualize the results. I am using the code below to save the video in MP4 format: import os os.enviro...
https://stackoverflow.com/questions/79577327/reinforcement-learning-atari-video-recording-crashes
tensorflow, pytorch, reinforcement-learning
1,744,811,398
se_76109047
stackoverflow
MACHINE_LEARNING
Integrate batch size in keras tuner
Integrate batch size in keras tuner I am new to Keras and have been using KerasTuner for the hyperparameters. This works very well, but I have not yet managed to tune the batch size. There is an official way from Keras, which was discussed here: How to tune the number of epochs and batch_size? I have tried to implemen...
https://stackoverflow.com/questions/76109047/integrate-batch-size-in-keras-tuner
python, tensorflow, keras, hyperparameters, keras-tuner
1,682,500,479
se_60602434
stackoverflow
MACHINE_LEARNING
Keras Tuner - Model-building function did not return a valid Keras Model instance
Keras Tuner - Model-building function did not return a valid Keras Model instance I'm trying to search Hyperparameters for a model using Keras Tuner, but I'm getting this error when I run the code: "RuntimeError: Model-building function did not return a valid Keras Model instance, found < keras.engine.sequential.Seque...
https://stackoverflow.com/questions/60602434/keras-tuner-model-building-function-did-not-return-a-valid-keras-model-instanc
python, tensorflow, keras
1,583,763,454
se_79574918
stackoverflow
MACHINE_LEARNING
Why is my TensorFlow CNN OCR model outputting incorrect characters for Persian license plates?
Why is my TensorFlow CNN OCR model outputting incorrect characters for Persian license plates? I’m building a FastAPI web API to detect Persian car license plates using YOLOv8 and extract their text with a custom TensorFlow CNN OCR model. YOLOv8 correctly detects the plate’s bounding box, but the OCR step outputs inco...
https://stackoverflow.com/questions/79574918/why-is-my-tensorflow-cnn-ocr-model-outputting-incorrect-characters-for-persian-l
python, tensorflow, keras, ocr, farsi
1,744,712,566
se_58424974
stackoverflow
MACHINE_LEARNING
Anaconda ImportError: /usr/lib64/libstdc++.so.6: version `GLIBCXX_3.4.21&#39; not found
Anaconda ImportError: /usr/lib64/libstdc++.so.6: version `GLIBCXX_3.4.21&#39; not found I am getting the following import error when I am trying to run a Python script in a conda environment (squad) azada@scholar-fe00:~/Desktop/Toy-Problem-Team-2 $ python3 train.py Traceback (most recent call last): File "train.py"...
https://stackoverflow.com/questions/58424974/anaconda-importerror-usr-lib64-libstdc-so-6-version-glibcxx-3-4-21-not-fo
python, c++, tensorflow, anaconda, glibc
1,571,286,889
se_79574127
stackoverflow
MACHINE_LEARNING
Cannot see all `Dense` layer info from `search_space_summary()` when using `RandomSearch Tuner` in Keras-Tuner?
Cannot see all `Dense` layer info from `search_space_summary()` when using `RandomSearch Tuner` in Keras-Tuner? I am trying to use keras-tuner to tune hyperparameters, like !pip install keras-tuner --upgrade import keras_tuner as kt from tensorflow.keras.models import Sequential from tensorflow.keras.layers import Den...
https://stackoverflow.com/questions/79574127/cannot-see-all-dense-layer-info-from-search-space-summary-when-using-rand
python, tensorflow, keras, hyperparameters, keras-tuner
1,744,670,731
se_79429910
stackoverflow
MACHINE_LEARNING
Using tf.keras.utils.image_dataset_from_directory mismatches labels on the images
Using tf.keras.utils.image_dataset_from_directory mismatches labels on the images Here's the code train_dset = image_dataset_from_directory( directory = data_path, batch_size = 32, image_size = (256,256), label_mode = "int", shuffle = True ) in data_path, I have -> dataset |-> train |-> ...
https://stackoverflow.com/questions/79429910/using-tf-keras-utils-image-dataset-from-directory-mismatches-labels-on-the-image
python, tensorflow, keras, deep-learning, conv-neural-network
1,739,275,721
se_74852225
stackoverflow
MACHINE_LEARNING
AttributeError: module &#39;numpy&#39; has no attribute &#39;typeDict&#39;
AttributeError: module &#39;numpy&#39; has no attribute &#39;typeDict&#39; I am trying to install TensorFlow in Python. I am getting the following error message, I tried uninstalling NumPy and re-installing NumPy but still getting the same error message. How to resolve this issue? AttributeError: module 'numpy' has no...
https://stackoverflow.com/questions/74852225/attributeerror-module-numpy-has-no-attribute-typedict
python, numpy, tensorflow
1,671,461,952
se_79573345
stackoverflow
MACHINE_LEARNING
Can Tensorflow or PyTorch work with json time series data in this format?
Can Tensorflow or PyTorch work with json time series data in this format? I'm trying to make a LSTM model to predict sign language sentence with this format of json file. This json file is containing the coordinates information of 21 hand landmark joints for each frames and each hands.(left hand, right hand) Here's th...
https://stackoverflow.com/questions/79573345/can-tensorflow-or-pytorch-work-with-json-time-series-data-in-this-format
json, tensorflow, machine-learning, lstm
1,744,639,882
se_79573648
stackoverflow
MACHINE_LEARNING
Why do model.evaluate() vs. manual loss computation with model.predict() in tf.keras do not add up?
Why do model.evaluate() vs. manual loss computation with model.predict() in tf.keras do not add up? I use keras and tensorflow to train a 'simple' Multilayer Perceptron (MLP) for a regression task, where I use the mean-squared error (MSE) as loss-function. I denote my training data as x_train, y_train and my test data...
https://stackoverflow.com/questions/79573648/why-do-model-evaluate-vs-manual-loss-computation-with-model-predict-in-tf-k
python, numpy, tensorflow, keras, regression
1,744,648,997
se_79567454
stackoverflow
MACHINE_LEARNING
Deploying an LSTM Model App on Streamlist Cloud
Deploying an LSTM Model App on Streamlist Cloud I am deploying an app that is using an LSTM Model saved as .h5. It worked perfectly locally, but while deploying on the Streamlit Cloud, it gives the this error: ValueError: Unrecognized keyword arguments passed to LSTM: {'time_major': False} in the streamlit cloud
https://stackoverflow.com/questions/79567454/deploying-an-lstm-model-app-on-streamlist-cloud
tensorflow, lstm, streamlit
1,744,314,019
se_79571609
stackoverflow
MACHINE_LEARNING
Getting ValueError: Unexpected object from deserialization, expected a layer or operation, got a &lt;class &#39;__main__.L1Dist&#39;&gt;
Getting ValueError: Unexpected object from deserialization, expected a layer or operation, got a &lt;class &#39;__main__.L1Dist&#39;&gt; here is the code from the Distance layer part because site is not allowing me to upload full code. embedding = make_embedding() distance layer class L1Dist(Layer): def __init__...
https://stackoverflow.com/questions/79571609/getting-valueerror-unexpected-object-from-deserialization-expected-a-layer-or
python, tensorflow, keras
1,744,551,739
se_78539937
stackoverflow
MACHINE_LEARNING
Computing effective sample size in tensorflow - Complex128 Warning
Computing effective sample size in tensorflow - Complex128 Warning When computing the effective sample size of a NumPy array as done below import numpy as np import tensorflow_probability as tfp x = np.random.randn(1000, 2, dtype=np.float64) ess = tfp.mcmc.effective_sample_size(x) I get the following cryptic warning...
https://stackoverflow.com/questions/78539937/computing-effective-sample-size-in-tensorflow-complex128-warning
python, numpy, tensorflow
1,716,823,518
se_73383268
stackoverflow
MACHINE_LEARNING
I am getting error like &quot;Input 1 of layer &quot;model_5&quot; is incompatible with the layer: expected shape=(None, 224, 224, 3), found shape=(None, 5)
I am getting error like &quot;Input 1 of layer &quot;model_5&quot; is incompatible with the layer: expected shape=(None, 224, 224, 3), found shape=(None, 5) I am trying to fuse features of two image inputs of shape (299, 299, 3), (224, 224, 3) and am getting shape errors. Here is my code from tensorFlow.keras.app...
https://stackoverflow.com/questions/73383268/i-am-getting-error-like-input-1-of-layer-model-5-is-incompatible-with-the-lay
python, numpy, tensorflow, tensorflow2.0
1,660,714,127
se_73450382
stackoverflow
MACHINE_LEARNING
Keras Functional replace intermediate layers
Keras Functional replace intermediate layers I would like to replace BatchNorm layers with GroupNorm in built-in keras models, e.g. ResNet50. I'm trying to reset nodes' layers to my new layer, however nothing changes when I query a model.summary(). import tensorflow as tf import tensorflow_addons as tfa from tensorflo...
https://stackoverflow.com/questions/73450382/keras-functional-replace-intermediate-layers
python, tensorflow, keras, deep-learning, neural-network
1,661,198,114
se_79086878
stackoverflow
MACHINE_LEARNING
Keras - Replace intermediate layer in Functional model
Keras - Replace intermediate layer in Functional model I am trying to make a custom implementation of LoRA for Keras, and I am running into some trouble trying to get my approach to work. I am using Keras 3.4.1 inside Google Collab. First, I have tried the solution explained in this Stack Overflow post and it works fo...
https://stackoverflow.com/questions/79086878/keras-replace-intermediate-layer-in-functional-model
python, tensorflow, keras
1,728,921,508
se_79568997
stackoverflow
MACHINE_LEARNING
Regression error with Python tensorflow keras
Regression error with Python tensorflow keras could someone please help me to fix the following error : [AttributeError: 'super' object has no attribute 'sklearn_tags'] based on my code : from tensorflow import keras from scikeras.wrappers import KerasRegressor def build_model(): model = keras.Sequential([ ...
https://stackoverflow.com/questions/79568997/regression-error-with-python-tensorflow-keras
python, tensorflow, keras, neural-network, regression
1,744,379,519
se_79566606
stackoverflow
MACHINE_LEARNING
Is there a reason that tensorflow is not working with Keras?
Is there a reason that tensorflow is not working with Keras? import os os.environ['TF_ENABLE_ONEDNN_OPTS'] = '0' import tensorflow as tf from tensorflow.keras.layers import Conv1D, MaxPooling1D, GlobalAveragePooling1D, Dense, Dropout, BatchNormalization from tensorflow.keras.models import Sequential from tensorflow.ke...
https://stackoverflow.com/questions/79566606/is-there-a-reason-that-tensorflow-is-not-working-with-keras
python, python-3.x, tensorflow, visual-studio-code, keras
1,744,287,052
se_79565121
stackoverflow
MACHINE_LEARNING
TensorFlow `next()` hangs in infinite loop after `take(1)`
TensorFlow `next()` hangs in infinite loop after `take(1)` When using TensorFlow's tf.data.Dataset.take(1) to get the first element of a dataset and then attempting to retrieve this element using iter() and next(), the next() call enters an infinite loop if the pandas library is imported before tensorflow. This behavi...
https://stackoverflow.com/questions/79565121/tensorflow-next-hangs-in-infinite-loop-after-take1
python, pandas, tensorflow
1,744,224,468
se_79565611
stackoverflow
MACHINE_LEARNING
Troubleshoot &quot;Invalid input shape for input Tensor&quot;
Troubleshoot &quot;Invalid input shape for input Tensor&quot; I am trying to build a model with keras and tensorflow to play Go: training_data = encode_from_file_info(training_files) testing_data = encode_from_file_info(testing_files) input_shape = (1, 19, 19) model = Sequential( [ ...
https://stackoverflow.com/questions/79565611/troubleshoot-invalid-input-shape-for-input-tensor
python, tensorflow, keras
1,744,250,416
se_78818728
stackoverflow
MACHINE_LEARNING
ValueError: The layer sequential_22 has never been called and thus has no defined output
ValueError: The layer sequential_22 has never been called and thus has no defined output I am trying to run a GradCAM that gives me the below error. I am confused as to why this is as Sequential is clearly being called. I have tried uninstalling tensorflow, restarting the kernel, and trying other environments. Any hel...
https://stackoverflow.com/questions/78818728/valueerror-the-layer-sequential-22-has-never-been-called-and-thus-has-no-define
tensorflow, keras
1,722,472,994