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_69960522 | stackoverflow | MACHINE_LEARNING | Why does my cross-validation consistently perform better than train-test split? | Why does my cross-validation consistently perform better than train-test split?
I have the code below (using sklearn) that first uses the training set for cross-validation, and for a final check, uses the test set. However, the cross-validation consistently performs better, as shown below. Am I over-fitting on the tra... | https://stackoverflow.com/questions/69960522/why-does-my-cross-validation-consistently-perform-better-than-train-test-split | python, machine-learning, scikit-learn, cross-validation, train-test-split | 1,636,867,755 |
se_54646709 | stackoverflow | MACHINE_LEARNING | Sklearn Pipeline: Get feature names after OneHotEncode In ColumnTransformer | Sklearn Pipeline: Get feature names after OneHotEncode In ColumnTransformer
I want to get feature names after I fit the pipeline.
categorical_features = ['brand', 'category_name', 'sub_category']
categorical_transformer = Pipeline(steps=[
('imputer', SimpleImputer(strategy='constant', fill_value='missing')),
(... | https://stackoverflow.com/questions/54646709/sklearn-pipeline-get-feature-names-after-onehotencode-in-columntransformer | python, scikit-learn, pipeline | 1,549,963,626 |
se_78463937 | stackoverflow | MACHINE_LEARNING | How to use the Agglomerative Clustering algorithm from scikit-learn python library with a declared number of objects in the cluster? | How to use the Agglomerative Clustering algorithm from scikit-learn python library with a declared number of objects in the cluster?
I use the scikit-learn Agglomerative Clustering python library in my code to automatically cluster points and place a new, larger point in the center of the cluster. I have a set of seve... | https://stackoverflow.com/questions/78463937/how-to-use-the-agglomerative-clustering-algorithm-from-scikit-learn-python-libra | python, scikit-learn, cluster-analysis, hierarchical-clustering | 1,715,416,675 |
se_78460290 | stackoverflow | MACHINE_LEARNING | Error Encountered When Wrapping PyTorch Model with Text Embeddings: Skorch Internal Code Operates on Raw X Data Instead of Embeddings | Error Encountered When Wrapping PyTorch Model with Text Embeddings: Skorch Internal Code Operates on Raw X Data Instead of Embeddings
I'm trying to wrap a pytorch model, the model expects some text embeddings, For my wrapped model I want it to do the embeddings internally for a future purpose. Here is my code :
from s... | https://stackoverflow.com/questions/78460290/error-encountered-when-wrapping-pytorch-model-with-text-embeddings-skorch-inter | scikit-learn, pytorch, skorch | 1,715,346,128 |
se_68965100 | stackoverflow | MACHINE_LEARNING | why my PCA and PCA from sklearn get different results? | why my PCA and PCA from sklearn get different results?
I tried to use the PCA provided in "machine learning in action", but I found that the results obtained by it are not the same as those obtained by the PCA in sklearn. I don't quite understand what is going on.
Below is my code:
import numpy as np
from sklearn.deco... | https://stackoverflow.com/questions/68965100/why-my-pca-and-pca-from-sklearn-get-different-results | python, numpy, scikit-learn, pca | 1,630,159,667 |
se_70648152 | stackoverflow | MACHINE_LEARNING | What will be the Information Gain for the variable that will be placed in the root of the tree? | What will be the Information Gain for the variable that will be placed in the root of the tree?
I am trying to solve this problem from Stepic:
Download a dataset with three variables: sex, exang, num. Imagine that
we want to use a decision tree to classify whether or not a patient
has heart disease (variable num) bas... | https://stackoverflow.com/questions/70648152/what-will-be-the-information-gain-for-the-variable-that-will-be-placed-in-the-ro | python, pandas, scikit-learn | 1,641,792,531 |
se_73379562 | stackoverflow | MACHINE_LEARNING | Calculate memory usage of RandomForestClassifier and IsolationForest | Calculate memory usage of RandomForestClassifier and IsolationForest
I'd like to evaluate how many memory is used up by both
sklearn.ensemble.IsolationForest
sklearn.ensemble.RandomForestClassifier
But
sys.sizeof(my_isolation_forest_model)
sys.sizeof(my_random_forest_classifier_model)
always returns a value of 48, n... | https://stackoverflow.com/questions/73379562/calculate-memory-usage-of-randomforestclassifier-and-isolationforest | scikit-learn, random-forest, isolation-forest | 1,660,679,335 |
se_61208808 | stackoverflow | MACHINE_LEARNING | How to use pandas DataFrames with sklearn? | How to use pandas DataFrames with sklearn?
The goal of my project is to predict the accuracy level of some textual descriptions.
I made the vectors with FASTTEXT.
TSV output:
0 1:0.0033524514 2:-0.021896651 3:0.05087798 4:0.0072637126 ...
1 1:0.003118149 2:-0.015105667 3:0.040879637 4:0.000539902 ...
Resources are ... | https://stackoverflow.com/questions/61208808/how-to-use-pandas-dataframes-with-sklearn | python, pandas, scikit-learn | 1,586,870,612 |
se_54690453 | stackoverflow | MACHINE_LEARNING | Unable to import from imblearn.over_sampling import SMOTE | Unable to import from imblearn.over_sampling import SMOTE
I have installed imblearn using
pip install -U imbalanced-learn
#version:
conda version : 4.4.10
conda-build version : 3.4.1
python version : 3.6.4.final.0
I keep getting error related to numpy and scipy like
module 'numpy.random' has no attribute 'mtrand'... | https://stackoverflow.com/questions/54690453/unable-to-import-from-imblearn-over-sampling-import-smote | python, scikit-learn, imblearn | 1,550,147,405 |
se_54745482 | stackoverflow | MACHINE_LEARNING | what is the difference between tfidf vectorizer and tfidf transformer | what is the difference between tfidf vectorizer and tfidf transformer
I know that the formula for tfidf vectorizer is
Count of word/Total count * log(Number of documents / no.of documents where word is present)
I saw there's tfidf transformer in the scikit learn and I just wanted to difference between them. I coul... | https://stackoverflow.com/questions/54745482/what-is-the-difference-between-tfidf-vectorizer-and-tfidf-transformer | python, scikit-learn, nltk, tf-idf, tfidfvectorizer | 1,550,486,753 |
se_78451297 | stackoverflow | MACHINE_LEARNING | For my Data Analysis on House Prices with GB, Tree, and Random Forest, my MSE is too high | For my Data Analysis on House Prices with GB, Tree, and Random Forest, my MSE is too high
I've tried using all the variables vs also selecting certain variables, however the MSE stays high. I'm wondering if its a mistake in my code instead. I'm also was trying to add some feature engineering but commented it out for n... | https://stackoverflow.com/questions/78451297/for-my-data-analysis-on-house-prices-with-gb-tree-and-random-forest-my-mse-is | python, machine-learning, scikit-learn | 1,715,204,992 |
se_78445171 | stackoverflow | MACHINE_LEARNING | Why my Pickled class giving me AttributeError: Can't get attribute 'MyClass'? | Why my Pickled class giving me AttributeError: Can't get attribute 'MyClass'?
I tried running this in 2 different computer, but whenever I tried to load the pickle file, I get:
AttributeError: Can't get attribute 'MyClass'
I'm trying to understand what am I doing wrong or if I have a wrong understanding of... | https://stackoverflow.com/questions/78445171/why-my-pickled-class-giving-me-attributeerror-cant-get-attribute-myclass | python, class, scikit-learn, pickle | 1,715,117,519 |
se_78436672 | stackoverflow | MACHINE_LEARNING | Alphanumeric inputs in my independent feature- error: ValueError: could not convert string to float: '01232COM002-222' | Alphanumeric inputs in my independent feature- error: ValueError: could not convert string to float: '01232COM002-222'
I have 2 columns, one is independent which signifies PART_NO and other is dependent which is QUANTITY.
I am trying to predict the quantity of a particular machinery on the basis of which machi... | https://stackoverflow.com/questions/78436672/alphanumeric-inputs-in-my-independent-feature-error-valueerror-could-not-conv | python, machine-learning, scikit-learn, regression, random-forest | 1,714,999,078 |
se_78443992 | stackoverflow | MACHINE_LEARNING | Specifying custom arguments in sklear-style classes | Specifying custom arguments in sklear-style classes
I'm trying to implement my own, sklearn-compatible classifier in Python. To that end, I inherit from BaseEstimator and ClassifierMixin, but I also define my own arguments in the constructor.
While debugging, I noticed that invoking __repr__() interactively, in the IP... | https://stackoverflow.com/questions/78443992/specifying-custom-arguments-in-sklear-style-classes | python, inheritance, scikit-learn, spyder | 1,715,100,530 |
se_69947649 | stackoverflow | MACHINE_LEARNING | AttributeError: Estimator ordinalencoder does not provide get_feature_names_out. Did you mean to call pipeline[:-1].get_feature_names_out()? | AttributeError: Estimator ordinalencoder does not provide get_feature_names_out. Did you mean to call pipeline[:-1].get_feature_names_out()?
I have implemented one pipeline for my categorical features (cat_transformer_ordinal) with an Ordinal Encoder, but when I want get the features names, the method (get_feature_nam... | https://stackoverflow.com/questions/69947649/attributeerror-estimator-ordinalencoder-does-not-provide-get-feature-names-out | python, scikit-learn | 1,636,742,309 |
se_78429448 | stackoverflow | MACHINE_LEARNING | Pipeline for ML model using LabelEncoding in a Transformer | Pipeline for ML model using LabelEncoding in a Transformer
I'm attempting to incorporate various transformations into a scikit-learn pipeline along with a LightGBM model. This model aims to predict the prices of second-hand vehicles. Once trained, I plan to integrate this model into an HTML page for practical use.
fro... | https://stackoverflow.com/questions/78429448/pipeline-for-ml-model-using-labelencoding-in-a-transformer | python, scikit-learn, pipeline, label-encoding | 1,714,835,564 |
se_78440720 | stackoverflow | MACHINE_LEARNING | Defining a custom distance metric using k-means class of sklearn | Defining a custom distance metric using k-means class of sklearn
As suggested in this answer https://stackoverflow.com/a/74232665/4042725,
is it possible to define a custom distance metric in the _transform method of a custom kmeans class inheriting sklearn's Kmeans class?
class custom_Kmeans(sklearn.cluster.Kmeans):... | https://stackoverflow.com/questions/78440720/defining-a-custom-distance-metric-using-k-means-class-of-sklearn | python, scikit-learn, cluster-analysis, k-means | 1,715,066,092 |
se_78440154 | stackoverflow | MACHINE_LEARNING | Understanding and Validating PLS Regression Coefficients | Understanding and Validating PLS Regression Coefficients
In this problem, the goal is to understand and validate the coefficients of a Partial Least Squares (PLS) regression model. The PLS regression equation is assumed to be in the form of y = b + b_1(X_1) + b_n(X_n)..., where y is the dependent variable, b is th... | https://stackoverflow.com/questions/78440154/understanding-and-validating-pls-regression-coefficients | python, scikit-learn, pca, pls | 1,715,056,827 |
se_73031395 | stackoverflow | MACHINE_LEARNING | Accuracy Ratio (Gini coef) computation in Python by Definition and ROC Method | Accuracy Ratio (Gini coef) computation in Python by Definition and ROC Method
Why do the following methods of computing the accuracy ratio give different results?
Approach 1: Cumulative Accuracy Profile (CAP) curve
The accuracy ratio is computed from definition as the difference between the area under curve of the CAP... | https://stackoverflow.com/questions/73031395/accuracy-ratio-gini-coef-computation-in-python-by-definition-and-roc-method | python-3.x, machine-learning, scikit-learn, statistics, gini | 1,658,207,387 |
se_63189787 | stackoverflow | MACHINE_LEARNING | TypeError: __init__() got an unexpected keyword argument 'sparse' | TypeError: __init__() got an unexpected keyword argument 'sparse'
I want to one-hot-encoding the columns of an array using the OneHotEncoder in sklearn, but I encontered the following error:
TypeError: __init__() got an unexpected keyword argument 'sparse'
Here is my code :
a = np.array([[2, 3, 5], [4, 6, 8],... | https://stackoverflow.com/questions/63189787/typeerror-init-got-an-unexpected-keyword-argument-sparse | python, scikit-learn | 1,596,189,994 |
se_77069146 | stackoverflow | MACHINE_LEARNING | How do I import KerasClassifier now? | How do I import KerasClassifier now?
How to import KerasClassifier for use with Gridsearch?
The following
from tensorflow.keras.layers.wrappers.scikit_learn import KerasClassifier
Used to work, but now returns:
ModuleNotFoundError: No module named 'tensorflow.keras.wrappers'
I understand there have been several chan... | https://stackoverflow.com/questions/77069146/how-do-i-import-kerasclassifier-now | tensorflow, keras, scikit-learn | 1,694,197,793 |
se_40155128 | stackoverflow | MACHINE_LEARNING | Plot trees for a Random Forest in Python with Scikit-Learn | Plot trees for a Random Forest in Python with Scikit-Learn
I want to plot a decision tree of a random forest. So, i create the following code:
clf = RandomForestClassifier(n_estimators=100)
import pydotplus
import six
from sklearn import tree
dotfile = six.StringIO()
i_tree = 0
for tree_in_forest in clf.estimators_:
i... | https://stackoverflow.com/questions/40155128/plot-trees-for-a-random-forest-in-python-with-scikit-learn | python, tree, scikit-learn, random-forest, pydot | 1,476,968,211 |
se_58632706 | stackoverflow | MACHINE_LEARNING | Drawing Decision tree with python | Drawing Decision tree with python
I working on a draw decision tree with python,
tree.plot_tree(clf.fit(X_train, y_train))
plt.suptitle("Decision surface of a decision tree using paired features")
plt.show()
but when I run this code, the tree shows up like this
Decision Tree
Is there any possible way to make t... | https://stackoverflow.com/questions/58632706/drawing-decision-tree-with-python | python, matplotlib, scikit-learn, decision-tree | 1,572,465,078 |
se_79991283 | stackoverflow | MACHINE_LEARNING | Why does tf.function retrace when only the RaggedTensor row-splits dtype changes? | Why does tf.function retrace when only the RaggedTensor row-splits dtype changes?
I am passing two equivalent RaggedTensor objects to a function:
import tensorflow as tf
@tf.function(reduce_retracing=True)
def row_sum(x):
print("Tracing")
return tf.reduce_sum(x, axis=1)
x1 = tf.ragged.constant([[1.0, 2.0],[3.... | https://stackoverflow.com/questions/79991283/why-does-tf-function-retrace-when-only-the-raggedtensor-row-splits-dtype-changes | python, tensorflow, tensorflow2.0 | 1,786,095,035 |
se_61528547 | stackoverflow | MACHINE_LEARNING | ValueError:Tensor("inputs:0", shape=(None, 256, 256, 3), dtype=uint8) | ValueError:Tensor("inputs:0", shape=(None, 256, 256, 3), dtype=uint8)
I don't know how to solve this error i also tried converting it into float32
import cv2
import tensorflow as tf
import numpy as np
CATEGORIES = ["gas", "break","stop"]
model = tf.keras.models.load_model("trained")
def prepare(filepath... | https://stackoverflow.com/questions/61528547/valueerrortensorinputs0-shape-none-256-256-3-dtype-uint8 | python, tensorflow, keras | 1,588,265,054 |
se_33712178 | stackoverflow | MACHINE_LEARNING | Tensorflow NaN bug? | Tensorflow NaN bug?
I'm using TensorFlow and I modified the tutorial example to take my RGB images.
The algorithm works flawlessly out of the box on the new image set, until suddenly (still converging, it's around 92% accuracy usually), it crashes with the error that ReluGrad received non-finite values. Debugging sho... | https://stackoverflow.com/questions/33712178/tensorflow-nan-bug | nan, tensorflow | 1,447,527,718 |
se_79974413 | stackoverflow | MACHINE_LEARNING | Should I learn TensorFlow in parallel while taking Andrew Ng's Machine Learning course? | Should I learn TensorFlow in parallel while taking Andrew Ng's Machine Learning course?
I'm currently taking Andrew Ng's Machine Learning course and have completed the supervised machine learning section. I want to build a strong understanding of machine learning concepts, but I'm also eager to start learning Tens... | https://stackoverflow.com/questions/79974413/should-i-learn-tensorflow-in-parallel-while-taking-andrew-ngs-machine-learning | tensorflow, machine-learning | 1,783,164,086 |
se_79990938 | stackoverflow | MACHINE_LEARNING | How to correctly apply causal masking in Keras Multi-Head Attention for multi-step time series forecasting? | How to correctly apply causal masking in Keras Multi-Head Attention for multi-step time series forecasting?
I am building a Transformer-based model in TensorFlow/Keras to predict river discharge multiple steps ahead using historical climate data (precipitation, temperature).
Since it’s a multi-step forecasting task, I... | https://stackoverflow.com/questions/79990938/how-to-correctly-apply-causal-masking-in-keras-multi-head-attention-for-multi-st | tensorflow, keras, deep-learning, time-series, transformer-model | 1,786,003,072 |
se_79990696 | stackoverflow | MACHINE_LEARNING | Tensorflow lite uses all of my flash (Seeeduino) | Tensorflow lite uses all of my flash (Seeeduino)
I'm compiling on a Seeed studio XIAO SAMD21 and trying to reproduce something like what is being done here: https://wiki.seeedstudio.com/XIAO-BLE-Sense-TFLite-Getting-Started/
TL;DR (training a small deepnet on accelerometer data). After fighting with different libs fo... | https://stackoverflow.com/questions/79990696/tensorflow-lite-uses-all-of-my-flash-seeeduino | tensorflow, arduino, tensorflow-lite, tflite, seeeduino | 1,785,932,891 |
se_78010704 | stackoverflow | MACHINE_LEARNING | cannot import name 'ops' from 'keras' | cannot import name 'ops' from 'keras'
I am trying to run this example Colab notebook from Keras.io, but When I run the first cell (imports section) I get ImportError: cannot import name 'ops' from 'keras' (/usr/local/lib/python3.10/dist-packages/keras/__init__.py) error. As suggested in this thread, I ... | https://stackoverflow.com/questions/78010704/cannot-import-name-ops-from-keras | python, tensorflow, keras, google-colaboratory | 1,708,134,585 |
se_60255470 | stackoverflow | MACHINE_LEARNING | Exception: URL fetch failure when loading data | Exception: URL fetch failure when loading data
I'm trying to set up my machine to run Tensorflow 2. I've never used Tensorflow and just downloaded Python 3.7. I'm not sure if this is a problem with my machine or not. I followed the installation directions listed on TensorFlow's website. I followed the installation ins... | https://stackoverflow.com/questions/60255470/exception-url-fetch-failure-when-loading-data | python, tensorflow, keras, tensorflow2.0 | 1,581,909,293 |
se_50219808 | stackoverflow | MACHINE_LEARNING | Installing tensorflow 1.8.0 gpu | Installing tensorflow 1.8.0 gpu
I am installing tensorflow gpu using pip following the instruction on https://www.tensorflow.org/install/install_windows
pip3 install --upgrade tensorflow-gpu
Which seems to work and indicates that the version 1.8.0 is installed.
The only warning was about pip being not up to date, ... | https://stackoverflow.com/questions/50219808/installing-tensorflow-1-8-0-gpu | tensorflow | 1,525,715,256 |
se_58756817 | stackoverflow | MACHINE_LEARNING | Segmentation fault with tensorboard 1.14 | Segmentation fault with tensorboard 1.14
I am using deeplab network. I think it is using tensorflow 1.14 since there are still packages of slim, which is removed from tensorflow 2.0. The python version is always Python 3.6.8 in my case.
I have sucessfullt run tensorboard from a venv(tensor2env) with
tensorboard ... | https://stackoverflow.com/questions/58756817/segmentation-fault-with-tensorboard-1-14 | python-3.x, tensorflow, segmentation-fault, tensorboard | 1,573,160,324 |
se_49869805 | stackoverflow | MACHINE_LEARNING | Categorical classification in Keras Python | Categorical classification in Keras Python
I am doing multi-class classification of 5 classes. I am using Tensorflow with Keras. My code is like this:
# load dataset
dataframe = pandas.read_csv("Data5Class.csv", header=None)
dataset = dataframe.values
# split into input (X) and output (Y) variables
X = dataset[:,0:4... | https://stackoverflow.com/questions/49869805/categorical-classification-in-keras-python | python-3.x, tensorflow, scikit-learn, keras, multiclass-classification | 1,523,938,386 |
se_46236566 | stackoverflow | MACHINE_LEARNING | inline assembly requires more registers than available while cross compiling tensroflow for arm cortex a15 using clang-3.8 | inline assembly requires more registers than available while cross compiling tensroflow for arm cortex a15 using clang-3.8
I am trying to cross compile tensorflow for armv7a cortex a15 using clang-3.8 and I am using bazel 0.5.4 to build tensorflow.
My Environment details are,
Ubuntu - 16.04
Clang - 3.8
bazel - 0.5.4
t... | https://stackoverflow.com/questions/46236566/inline-assembly-requires-more-registers-than-available-while-cross-compiling-ten | tensorflow, clang, bazel | 1,505,468,630 |
se_51603324 | stackoverflow | MACHINE_LEARNING | ImportError: cannot import name 'input_reader_pb2' | ImportError: cannot import name 'input_reader_pb2'
working on win10 64-bit
when i trying to train my model by E:\projectx\model-master\models-master>python train.py --logtostderr --train_dir=training/ --pipeline_config_path=training/ssd_mobilenet_v1_pets.config
this error appear
File "train.py", line 4... | https://stackoverflow.com/questions/51603324/importerror-cannot-import-name-input-reader-pb2 | python, tensorflow, protoc | 1,532,991,336 |
se_65874441 | stackoverflow | MACHINE_LEARNING | tensorflow: Could not load dynamic library 'cudnn64_8.dll'; dlerror: cudnn64_8.dll not found | tensorflow: Could not load dynamic library 'cudnn64_8.dll'; dlerror: cudnn64_8.dll not found
When i run my program i see this error:
I have CUDA 11 and there is not such dll file in bin folder:
I use:
Python 3.8.7
CUDA 11.0
tensorflow 2.4.1
On this page there is information https://www.tensorflow.org/install... | https://stackoverflow.com/questions/65874441/tensorflow-could-not-load-dynamic-library-cudnn64-8-dll-dlerror-cudnn64-8-d | python, tensorflow | 1,611,513,171 |
se_45552856 | stackoverflow | MACHINE_LEARNING | Prediction of MNIST hand-written digit classifier | Prediction of MNIST hand-written digit classifier
I am new to Deep Learning and am using Keras to learn it. I followed these instructions to build a handwritten digit recognition classifier using MNIST dataset. It worked fine in terms of seeing comparable evaluation results. I used Tensorflow as the backend of Keras.
... | https://stackoverflow.com/questions/45552856/prediction-of-mnist-hand-written-digit-classifier | python, tensorflow, keras, mnist, handwriting-recognition | 1,502,128,236 |
se_65583992 | stackoverflow | MACHINE_LEARNING | Data augmentation on GPU | Data augmentation on GPU
As tf.data augmentations are executed only on CPUs. I need a way to run certain augmentations on the TPU for an audio project.
For example,
CPU: tf.recs read -> audio crop -> noise addition.
TPU: spectogram -> Mixup Augmentation.
Most augmentations can be done as a Keras Layer on top of the ... | https://stackoverflow.com/questions/65583992/data-augmentation-on-gpu | tensorflow, keras, tensorflow2.0, keras-layer | 1,609,868,885 |
se_76959604 | stackoverflow | MACHINE_LEARNING | Can't install tensorflow on python 3.11 | Can't install tensorflow on python 3.11
I am currently working with anaconda on a project using python 3.11.4. I wish to install tensorflow using the command
conda install tensorflow
But when doing so I get the following message :
UnsatisfiableError: The following specifications were found
to be incompatible wit... | https://stackoverflow.com/questions/76959604/cant-install-tensorflow-on-python-3-11 | python, tensorflow | 1,692,779,249 |
se_67145884 | stackoverflow | MACHINE_LEARNING | Failed copying input tensor from /job:localhost/replica:0/task:0/device:CPU:0 to /job:localhost/replica:0/task:0/device:GPU:0 in order to run Cast | Failed copying input tensor from /job:localhost/replica:0/task:0/device:CPU:0 to /job:localhost/replica:0/task:0/device:GPU:0 in order to run Cast
I have an autoencoder class where I try to feed normal_test_data with shape (2933314, 600) to the encoder. I get an Failed copying input tensor from /job:localhost/replica:... | https://stackoverflow.com/questions/67145884/failed-copying-input-tensor-from-joblocalhost-replica0-task0-devicecpu0-to | python, tensorflow, autoencoder | 1,618,728,740 |
se_79980878 | stackoverflow | MACHINE_LEARNING | CNN digit recognition model: high local accuracy but poor predictions after deployment (Flask API) | CNN digit recognition model: high local accuracy but poor predictions after deployment (Flask API)
I trained a CNN on MNIST for digit recognition that gets ~98% accuracy during local testing (Jupyter/Colab). After deploying it behind a Flask API (React frontend sends canvas-drawn digit images), predictions are frequen... | https://stackoverflow.com/questions/79980878/cnn-digit-recognition-model-high-local-accuracy-but-poor-predictions-after-depl | python, tensorflow, flask, keras, conv-neural-network | 1,784,097,809 |
se_79962062 | stackoverflow | MACHINE_LEARNING | what are minimum image per class requied for max efficiency for efficientnet-lite0 and mobilenetv2 models | what are minimum image per class requied for max efficiency for efficientnet-lite0 and mobilenetv2 models
I am working on an image classification project for plant disease detection using transfer learning models such as MobileNetV2 and EfficientNetLite. My datasets include 11 classes for maize diseases and 6 classes ... | https://stackoverflow.com/questions/79962062/what-are-minimum-image-per-class-requied-for-max-efficiency-for-efficientnet-lit | python, tensorflow, image-processing, deep-learning | 1,781,685,482 |
se_61768883 | stackoverflow | MACHINE_LEARNING | ModuleNotFoundError: No module named 'tensorflow.python.keras.applications.MobileNetV2' | ModuleNotFoundError: No module named 'tensorflow.python.keras.applications.MobileNetV2'
I am trying to import
import tensorflow.python.keras.applications.MobileNetV2
but it gives the bellow error:
ModuleNotFoundError: No module named
'tensorflow.python.keras.applications.MobileNetV2'
my tensorflow version i... | https://stackoverflow.com/questions/61768883/modulenotfounderror-no-module-named-tensorflow-python-keras-applications-mobil | python, tensorflow, keras | 1,589,355,473 |
se_56010733 | stackoverflow | MACHINE_LEARNING | Error: Installation of TensorFlow not found | Error: Installation of TensorFlow not found
Overview
I am having trouble loading Python TensorFlow from the tensorflow R package.
library(tensorflow)
sess <- tf$Session()
#> Error: Installation of TensorFlow not found.
#>
#> Python environments searched for 'tensorflow' package:
#> /home/[username]/anaconda3/env... | https://stackoverflow.com/questions/56010733/error-installation-of-tensorflow-not-found | r, tensorflow | 1,557,168,244 |
se_61924299 | stackoverflow | MACHINE_LEARNING | Prevent Keras EarlyStopping from canceling due to early metric spike | Prevent Keras EarlyStopping from canceling due to early metric spike
This is an issue I've run into recently when training various models using Keras. Particularly, this occurs often when training on imbalanced datasets -- archived Medium.com article
The Problem
There are times when model fitting begins with a large s... | https://stackoverflow.com/questions/61924299/prevent-keras-earlystopping-from-canceling-due-to-early-metric-spike | python, tensorflow, machine-learning, keras, tf.keras | 1,590,015,285 |
se_78227298 | stackoverflow | MACHINE_LEARNING | GPU is not detected in Tensorflow | GPU is not detected in Tensorflow
I am using Tensorflow on Windows, and I am trying to use my GPU. But Tensorflow seems unable to detect my GPU.
I created a Python virtual environment and installed Python (3.8) and TensorFlow. My environment is:
NVIDIA GeForce RTX 3080 GPUs (10+10)
Processor: Intel Xeon Gold 6348 CPU... | https://stackoverflow.com/questions/78227298/gpu-is-not-detected-in-tensorflow | tensorflow, gpu, nvidia, windows-server-2019 | 1,711,475,495 |
se_49162202 | stackoverflow | MACHINE_LEARNING | Usage of 'learning_phase' in keras for tensorflow backend? | Usage of 'learning_phase' in keras for tensorflow backend?
I am trying to train a resnet network using keras backend in tensorflow. The feed dictionary for each batch update is written as:
feed_dict= {x:X_train[indices[start:end]], y:Y_train[indices[start:end]], keras.backend.learning_phase():1}
I am us... | https://stackoverflow.com/questions/49162202/usage-of-learning-phase-in-keras-for-tensorflow-backend | python, tensorflow, neural-network, deep-learning, keras | 1,520,461,440 |
se_79972302 | stackoverflow | MACHINE_LEARNING | How to use `class_weights` for the validation data when fitting a tensorflow model | How to use `class_weights` for the validation data when fitting a tensorflow model
I am training a tensorflow model and want to use class_weight for evaluating both the training batches and the validation batches. However, I am only able to use the weights with the training data. This is demonstrated in the following ... | https://stackoverflow.com/questions/79972302/how-to-use-class-weights-for-the-validation-data-when-fitting-a-tensorflow-mod | tensorflow, keras, deep-learning | 1,782,930,547 |
se_79939094 | stackoverflow | MACHINE_LEARNING | How Do Machine Learning Algorithms Improve Accuracy Over Time? | How Do Machine Learning Algorithms Improve Accuracy Over Time?
I recently started learning Python and machine learning. I noticed that many developers use libraries like TensorFlow and Scikit-learn for predictive modeling. What are the main advantages of using supervised learning algorithms compared to unsupervised le... | https://stackoverflow.com/questions/79939094/how-do-machine-learning-algorithms-improve-accuracy-over-time | javascript, python, java, tensorflow, scikit-learn | 1,778,460,227 |
se_74640695 | stackoverflow | MACHINE_LEARNING | Convert .ckpt to .h5 | Convert .ckpt to .h5
I have trained the model using resnet18 for mask R-CNN detection. For every epoch, it created a ".ckpt" file only.
Now I want to use that .ckpt file as the detector for detecting images. I have python code that takes a ".h5" file for detection.
Please help me with How I can use the ".ckpt" file fo... | https://stackoverflow.com/questions/74640695/convert-ckpt-to-h5 | python-3.x, tensorflow, machine-learning, object-detection, resnet | 1,669,891,858 |
se_49756909 | stackoverflow | MACHINE_LEARNING | InvalidArgumentError: You must feed a value for placeholder tensor 'Placeholder_1' | InvalidArgumentError: You must feed a value for placeholder tensor 'Placeholder_1'
I trained a simple neural network with TensorFlow on the MNIST dataset. The training portion of the code works fine. However, when I feed a single image into the network, it gives me the following traceback:
Traceback (most rec... | https://stackoverflow.com/questions/49756909/invalidargumenterror-you-must-feed-a-value-for-placeholder-tensor-placeholder | python, python-3.x, tensorflow, neural-network, invalid-argument | 1,523,372,296 |
se_60658198 | stackoverflow | MACHINE_LEARNING | Difficulty in GAN training | Difficulty in GAN training
I am attempting to train a GAN to learn the distribution of a number of features in an event. The Discriminator and Generator trained have a low loss but the generated events have different shaped distributions but I am unsure why.
I define the GAN as follow:
def create_generator():
g... | https://stackoverflow.com/questions/60658198/difficulty-in-gan-training | python, tensorflow, keras, generative-adversarial-network | 1,584,030,379 |
se_63728800 | stackoverflow | MACHINE_LEARNING | How to deal with different state space size in reinforcement learning? | How to deal with different state space size in reinforcement learning?
I'm working in A2C reinforcement learning where my environment has an increasing and decreasing in the number of agents. As a result of the increasing and decreasing the number of agents, the state space will also change. I have tried to solve the... | https://stackoverflow.com/questions/63728800/how-to-deal-with-different-state-space-size-in-reinforcement-learning | python, tensorflow, reinforcement-learning | 1,599,154,034 |
se_67921779 | stackoverflow | MACHINE_LEARNING | TensorflowJs - Rescale image with factor | TensorflowJs - Rescale image with factor
Is it possible to achieve the same Python operation in Javascript using TensorflowJs?
from tensorflow.keras.preprocessing.image import ImageDataGenerator
test_datagen = ImageDataGenerator(rescale=1./255) # NOTE: Re-scaling operation as part of the pre-processing step
I am try... | https://stackoverflow.com/questions/67921779/tensorflowjs-rescale-image-with-factor | javascript, tensorflow, opencv, tensorflow.js | 1,623,330,396 |
se_43310962 | stackoverflow | MACHINE_LEARNING | Tensorflow installation problems in Windows | Tensorflow installation problems in Windows
I went through the official documentation to install tensorflow from https://www.tensorflow.org/install/install_windows but I always get this error.
tensorflow-1.0.1-cp35-cp35m-win_amd64.whl is not a supported wheel on this platform.
You are using pip version 8.1.1, however... | https://stackoverflow.com/questions/43310962/tensorflow-installation-problems-in-windows | python, tensorflow, pip | 1,491,766,159 |
se_59930781 | stackoverflow | MACHINE_LEARNING | How to extract features from an image for training a CNN model | How to extract features from an image for training a CNN model
I am working on a project to classify waste as plastics and non-plastics using only images to train them. However, I still don't know which features the model take into account while classifying them.
I am using a CNN, however the accuracy of prediction is... | https://stackoverflow.com/questions/59930781/how-to-extract-features-from-an-image-for-training-a-cnn-model | python-3.x, tensorflow, conv-neural-network | 1,580,126,491 |
se_79926844 | stackoverflow | MACHINE_LEARNING | Analysis with Modeling on Spotify Tracks Dataset | Analysis with Modeling on Spotify Tracks Dataset
Context: I’m predicting 8 music genre families using 114,000 Spotify tracks based only on raw audio DNA (danceability, acousticness, energy, etc.).
The Plot Twist: My baseline Neural Network hit 82% accuracy. But after running a label permutation test (shuffling the lab... | https://stackoverflow.com/questions/79926844/analysis-with-modeling-on-spotify-tracks-dataset | python, tensorflow, model, pipeline | 1,776,361,175 |
se_63859309 | stackoverflow | MACHINE_LEARNING | ModuleNotFoundError: No module named 'tensorflow.compat' | ModuleNotFoundError: No module named 'tensorflow.compat'
tensorflow module not found
version of keras and tensorflow
I just want to know why it doesn't work., Because I read through the threads but still not working. | https://stackoverflow.com/questions/63859309/modulenotfounderror-no-module-named-tensorflow-compat | python-3.x, tensorflow, keras, module | 1,599,906,157 |
se_47143521 | stackoverflow | MACHINE_LEARNING | Where to apply batch normalization on standard CNNs | Where to apply batch normalization on standard CNNs
I have the following architecture:
Conv1
Relu1
Pooling1
Conv2
Relu2
Pooling3
FullyConnect1
FullyConnect2
My question is, where do I apply batch normalization? And what would be the best function to do this in TensorFlow? | https://stackoverflow.com/questions/47143521/where-to-apply-batch-normalization-on-standard-cnns | python, machine-learning, tensorflow, conv-neural-network, batch-normalization | 1,509,993,421 |
se_75540947 | stackoverflow | MACHINE_LEARNING | Error message in TensorFlow: "could not open file to read NUMA node" and missing directory in /sys/bus/pci/devices | Error message in TensorFlow: "could not open file to read NUMA node" and missing directory in /sys/bus/pci/devices
I'm using TensorFlow in my project, and every time I run my code, I get the following error message:
2023-02-23 13:17:55.003041: I tensorflow/compiler/xla/stream_executor/cuda/cuda_gpu_executor.... | https://stackoverflow.com/questions/75540947/error-message-in-tensorflow-could-not-open-file-to-read-numa-node-and-missing | tensorflow, windows-subsystem-for-linux, cudnn, numa | 1,677,130,609 |
se_43708413 | stackoverflow | MACHINE_LEARNING | uninstall virtualenv in mac | uninstall virtualenv in mac
I try to install tensorflow via virtualenv in mac, the reference is here:
for I have python already, so I install virtualenv by:
sudo pip install --upgrade virtualenv
build a new virtualenv environment in ~/development project/tensorflow, not in ~/tensorflow as is said in the reference:
... | https://stackoverflow.com/questions/43708413/uninstall-virtualenv-in-mac | tensorflow, installation, virtualenv | 1,493,568,294 |
se_79956442 | stackoverflow | MACHINE_LEARNING | TensorFlow tf.data.Dataset.map() becomes slower after adding a Python function | TensorFlow tf.data.Dataset.map() becomes slower after adding a Python function
I am using tf.data.Dataset to pre-process data. When I use TensorFlow operations inside map(), the pipeline runs fast. But, after adding a small custom Python function inside map(), training becomes more slower.
import tensorflow as tf
def... | https://stackoverflow.com/questions/79956442/tensorflow-tf-data-dataset-map-becomes-slower-after-adding-a-python-function | python, tensorflow, tensorflow2.0 | 1,781,174,224 |
se_79947686 | stackoverflow | MACHINE_LEARNING | How to integrate CNN model with Flutter app for plant disease detection - API vs TFLite? | How to integrate CNN model with Flutter app for plant disease detection - API vs TFLite?
I'm building a Flutter app for rice leaf disease detection using CNN as my thesis project.
I'm confused about the best architecture:
Option 1: Deploy CNN model as REST API (Python Flask/FastAPI), Flutter sends image and receives p... | https://stackoverflow.com/questions/79947686/how-to-integrate-cnn-model-with-flutter-app-for-plant-disease-detection-api-vs | tensorflow, flask, conv-neural-network, tensorflow-lite, image-classification | 1,779,944,674 |
se_79957179 | stackoverflow | MACHINE_LEARNING | Running Inference on CPU and C++ using LiteRT | Running Inference on CPU and C++ using LiteRT
Problem:
I have two outputs, out_buffers.size() == 2 but when I read the data in the second tensor output_buffers[1] the data is rubbish. The first tensor, output_buffers[0] gives the same output as my python code. This is using tensorflows new CompiledModel API.
I have fo... | https://stackoverflow.com/questions/79957179/running-inference-on-cpu-and-c-using-litert | c++, tensorflow, tensorflow-lite | 1,781,275,270 |
se_79956615 | stackoverflow | MACHINE_LEARNING | Why is it so difficult to train an accuracte GAN model? | Why is it so difficult to train an accuracte GAN model?
I'm trying to train a GAN model, but its results are very bad. The Generator doesn't seem to work. Can someone suggest how this can be improved? What is the best way to remember the code? Can this also be done using a builtin library?
import os
import torch
impor... | https://stackoverflow.com/questions/79956615/why-is-it-so-difficult-to-train-an-accuracte-gan-model | python, tensorflow, machine-learning, neural-network | 1,781,190,778 |
se_79956866 | stackoverflow | MACHINE_LEARNING | Best pre-trained vision model for multi-plant disease detection in async web back-end | Best pre-trained vision model for multi-plant disease detection in async web back-end
I'm building a web app with FastAPI + async/await Python backend. Users upload leaf photos via API and the server should return: 1) plant species, 2) disease label or "healthy".
Constraints:
Generalization: Must handle multiple crop... | https://stackoverflow.com/questions/79956866/best-pre-trained-vision-model-for-multi-plant-disease-detection-in-async-web-bac | tensorflow, machine-learning, nlp, artificial-intelligence, huggingface-transformers | 1,781,234,440 |
se_79956581 | stackoverflow | MACHINE_LEARNING | How to visualize the convolution layer of a CNN? | How to visualize the convolution layer of a CNN?
While working on a CNN model, I got confused.
My questions are:
Is visualizing RGB convolution filters by permuting from (out,in,h,w) to (h,w,in) the correct approach?
Is normalizing all filters globally (using the min/max of the entire weight tensor) appropriate, or ... | https://stackoverflow.com/questions/79956581/how-to-visualize-the-convolution-layer-of-a-cnn | python, tensorflow, conv-neural-network | 1,781,187,475 |
se_78016775 | stackoverflow | MACHINE_LEARNING | How to address warning that tf.losses.sparse_softmax_cross_entropy is deprecated? | How to address warning that tf.losses.sparse_softmax_cross_entropy is deprecated?
When attempting to import TensorFlow in a Jupyter Notebook, I encounter the following warning message
import tensorflow as tf
WARNING:tensorflow:From C:\Users\bhara\anaconda3\Lib\site-packages\keras\src\losses.py:2976: The name
tf.loss... | https://stackoverflow.com/questions/78016775/how-to-address-warning-that-tf-losses-sparse-softmax-cross-entropy-is-deprecated | tensorflow | 1,708,278,215 |
se_72672993 | stackoverflow | MACHINE_LEARNING | ModuleNotFoundError: No module named 'keras.saving' | ModuleNotFoundError: No module named 'keras.saving'
Complete Error:
Using TensorFlow backend.
Traceback (most recent call last):
File "file.py", line 32, in <module>
pickled_model = pickle.load(open('model.pkl', 'rb'))
ModuleNotFoundError: No module named 'keras.saving'
I am not able to solve this error... | https://stackoverflow.com/questions/72672993/modulenotfounderror-no-module-named-keras-saving | python, tensorflow, machine-learning, keras, deep-learning | 1,655,589,140 |
se_59921248 | stackoverflow | MACHINE_LEARNING | How to update libstdc++.so.6 or change the file to use on Tensorflow, Python | How to update libstdc++.so.6 or change the file to use on Tensorflow, Python
I am using Python3 and Tensorflow 1.15 on Apache server CentOS6.
Now, I am Struggling with this error.
It requires GLIBCXX_3.4.17
ImportError: /usr/lib64/libstdc++.so.6: version `GLIBCXX_3.4.17' not found (required by /home/app/anaconda3/... | https://stackoverflow.com/questions/59921248/how-to-update-libstdc-so-6-or-change-the-file-to-use-on-tensorflow-python | python, linux, tensorflow, libstdc++ | 1,580,062,038 |
se_68757787 | stackoverflow | MACHINE_LEARNING | How to convert Mat object to tensorflow Tensor in RUST Language? | How to convert Mat object to tensorflow Tensor in RUST Language?
this is my opencv code, how to convert padded_f32 mat object to tensorflow Tensor ?
let image = imgcodecs::imread("image_2021_08_02T09_11_01_447Z.png", imgcodecs::IMREAD_GRAYSCALE).unwrap();
let mut resized_image = Mat::default();
imgproc::resize(&image... | https://stackoverflow.com/questions/68757787/how-to-convert-mat-object-to-tensorflow-tensor-in-rust-language | tensorflow, opencv, rust | 1,628,772,479 |
se_79313934 | stackoverflow | MACHINE_LEARNING | TypeError: (0 , util_1.isNullOrUndefined) is not a function using @tensorflow/tfjs-node on mac | TypeError: (0 , util_1.isNullOrUndefined) is not a function using @tensorflow/tfjs-node on mac
I am trying to do some image recognition using @tensorflow/tfjs-node and mobilenet. Here is the code:
import fs from 'fs';
import * as tf from '@tensorflow/tfjs-node'; // TensorFlow.js for Node.js
import * as mobilenet from ... | https://stackoverflow.com/questions/79313934/typeerror-0-util-1-isnullorundefined-is-not-a-function-using-tensorflow-tf | tensorflow, mobilenet, tfjs-node | 1,735,395,731 |
se_60043772 | stackoverflow | MACHINE_LEARNING | gRPC server responds with OS Error, grpc_status: 14 | gRPC server responds with OS Error, grpc_status: 14
Using a basic gRPC client from the Tensorflow Serving examples to get predictions from a model running on docker I get this response:
grpc._channel._Rendezvous: <_Rendezvous of RPC that terminated with:
status = StatusCode.UNAVAILABLE
details = "OS Er... | https://stackoverflow.com/questions/60043772/grpc-server-responds-with-os-error-grpc-status-14 | docker, tensorflow, grpc, tensorflow-serving, grpc-python | 1,580,748,981 |
se_79939120 | stackoverflow | MACHINE_LEARNING | Issue when loading model with hub.KerasLayer layer... NameError: Exception encountered when calling Lambda.call() | Issue when loading model with hub.KerasLayer layer... NameError: Exception encountered when calling Lambda.call()
I am doing some NLP exercises. I am unable to use a saved model with a hub.KerasLayer layer :(
Here are the steps I done:
Create the model - OK
Compile the model - OK
Fit/Train the model - OK
import t... | https://stackoverflow.com/questions/79939120/issue-when-loading-model-with-hub-keraslayer-layer-nameerror-exception-encou | tensorflow, lambda, deep-learning, keras-layer, tensorflow-hub | 1,778,467,851 |
se_43358621 | stackoverflow | MACHINE_LEARNING | tensorflow.python.framework.errors_impl.NotFoundError: NewRandomAccessFile failed to Create/Open: ..\vocab | tensorflow.python.framework.errors_impl.NotFoundError: NewRandomAccessFile failed to Create/Open: ..\vocab
I use tensorflow1.0 python3.5.2 in windows platform,used tensorflow cnn example to do sentiment analysis,but have an error:tensorflow.python.framework.errors_impl.NotFoundError: NewRandomAccessFile failed to Crea... | https://stackoverflow.com/questions/43358621/tensorflow-python-framework-errors-impl-notfounderror-newrandomaccessfile-faile | python, tensorflow | 1,491,959,646 |
se_77992031 | stackoverflow | MACHINE_LEARNING | TypeError: __init__() takes from 2 to 3 positional arguments but 4 were given | TypeError: __init__() takes from 2 to 3 positional arguments but 4 were given
I want to use scaled_input = Rescaling(1./255, 0.0, "rescaling")(input_) to rescale the dataset including 600 images with 5 labels but it got error:
scaled_input = Rescaling(1./255, 0.0, "rescaling")(input_)
TypeError: init() takes from 2 t... | https://stackoverflow.com/questions/77992031/typeerror-init-takes-from-2-to-3-positional-arguments-but-4-were-given | python, tensorflow, keras | 1,707,883,610 |
se_68333819 | stackoverflow | MACHINE_LEARNING | Error: import tensorflow.keras.backend as K could not be resolved Pylance(reportMissingImports) | Error: import tensorflow.keras.backend as K could not be resolved Pylance(reportMissingImports)
I'm using tensorflow 1.15.0 in docker container and have issue in importing keras sub-modules.
from tensorflow import keras
import tensorflow.keras.backend as K
from tensorflow.keras.optimizers import Adam, SGD
Both ba... | https://stackoverflow.com/questions/68333819/error-import-tensorflow-keras-backend-as-k-could-not-be-resolved-pylancereport | python, docker, tensorflow, keras, tf.keras | 1,625,985,681 |
se_47321058 | stackoverflow | MACHINE_LEARNING | FATAL Flags parsing error:Unknown command line flag 'logtostderr' | FATAL Flags parsing error:Unknown command line flag 'logtostderr'
System information
OS Platform and Distribution: Windows 10 64 Bit
TensorFlow installed from (source or binary): binary
TensorFlow version:1.5.0-dev20171115'
Python version 3.5.2(v3.5.2:4def2a2901a5, Jun 25 2016, 22:18:55)
GPU: nVidia GeForce... | https://stackoverflow.com/questions/47321058/fatal-flags-parsing-errorunknown-command-line-flag-logtostderr | python, tensorflow, deep-learning, object-detection, tensorboard | 1,510,802,698 |
se_72068138 | stackoverflow | MACHINE_LEARNING | Which TensorFlow version is compatible with NumPy version==1.18? | Which TensorFlow version is compatible with NumPy version==1.18?
I need to use the librosa and tensorflow packages for a Neural Network audio classification project.
librosa has a dependency on the numba package, which requires numpy version==1.18.
But, tensorflow requires numpy version==1.2.
Can I install both versio... | https://stackoverflow.com/questions/72068138/which-tensorflow-version-is-compatible-with-numpy-version-1-18 | python, numpy, tensorflow, librosa | 1,651,318,324 |
se_48729620 | stackoverflow | MACHINE_LEARNING | Python Tensorflow:UnimplementedError: Cast string to int32 is not supported | Python Tensorflow:UnimplementedError: Cast string to int32 is not supported
everyone.
I am new to Tensorflow
When I wrote the code like this in this part :
def get_batch(image,label,new_height,new_width,batch_size,capacity):
image=tf.cast(image,tf.string)
label=tf.cast(image,tf.int32)
input_queue= tf.train.slice_inp... | https://stackoverflow.com/questions/48729620/python-tensorflowunimplementederror-cast-string-to-int32-is-not-supported | python-3.x, tensorflow, tensorflow-datasets | 1,518,336,903 |
se_70961988 | stackoverflow | MACHINE_LEARNING | Layer count mismatch when loading weights from file. Model expected 106 layers, found 4 saved layers | Layer count mismatch when loading weights from file. Model expected 106 layers, found 4 saved layers
I have this network (from SimClR paper):
base_model = tf.keras.applications.ResNet50(include_top=False, weights=None, input_shape=(224, 224, 3))
base_model.trainable = True
#inputs = Input((224, 224, 3))
in... | https://stackoverflow.com/questions/70961988/layer-count-mismatch-when-loading-weights-from-file-model-expected-106-layers | python, tensorflow, keras | 1,643,831,468 |
se_48660051 | stackoverflow | MACHINE_LEARNING | Yocto recipe python whl package | Yocto recipe python whl package
I am writing a custom yocto recipe that should install a python package from a .whl file.
I tried it using a recipe that contains:
inherit pypi setuptools
PYPI_SRC_URI="http://ci.tensorflow.org/view/Nightly/job/nightly-pi-zero/lastSuccessfulBuild/artifact/output-artifacts/tensorflow-... | https://stackoverflow.com/questions/48660051/yocto-recipe-python-whl-package | python, tensorflow, yocto, python-wheel, recipe | 1,517,995,370 |
se_42741738 | stackoverflow | MACHINE_LEARNING | Getting InvalidArgumentError in Tensorflow | Getting InvalidArgumentError in Tensorflow
I created a CNN for predicting the labels of an image. I trained it. Now i want to use my model for predicting the labels for new image. My code for CNN is this:-
def LeNet(x):
# Arguments used for tf.truncated_normal, randomly defines variables for the weights ... | https://stackoverflow.com/questions/42741738/getting-invalidargumenterror-in-tensorflow | python, numpy, tensorflow, conv-neural-network, invalid-argument | 1,489,273,551 |
se_79927242 | stackoverflow | MACHINE_LEARNING | FID score computation while training WGAN-GP | FID score computation while training WGAN-GP
I am training WGAN-GP on Eurosat dataset, splitted into train/val/test sets in counts 18900/4050/4050. Since FID scores are widely used in GANs in image generation, I based my hyperparameter search on FID score: I have 12 combinations of hyperparameters in a for loop. Each ... | https://stackoverflow.com/questions/79927242/fid-score-computation-while-training-wgan-gp | tensorflow, deep-learning, generative-adversarial-network, hyperparameters, image-generation | 1,776,417,460 |
se_64944065 | stackoverflow | MACHINE_LEARNING | TensorFlow ImportError: DLL load failed while importing _pywrap_tensorflow_internal: The specified module could not be found | TensorFlow ImportError: DLL load failed while importing _pywrap_tensorflow_internal: The specified module could not be found
System specifications:
Python==3.8.5
tensorflow==2.3.1
I am trying to import tensorflow... but I am getting import error. Please help me rectify the problem. I tried following...
pip uninstall... | https://stackoverflow.com/questions/64944065/tensorflow-importerror-dll-load-failed-while-importing-pywrap-tensorflow-inter | python-3.x, tensorflow, importerror, dllimport, tensorflow2.x | 1,605,968,389 |
se_43702546 | stackoverflow | MACHINE_LEARNING | TensorBoard doesn't show all data points | TensorBoard doesn't show all data points
I was running a very long training (reinforcement learning with 20M steps) and writing summary every 10k steps. In between step 4M and 6M, I saw 2 peaks in my TensorBoard scalar chart for game score, then I let it run and went to sleep. In the morning, it was running at abo... | https://stackoverflow.com/questions/43702546/tensorboard-doesnt-show-all-data-points | tensorflow, tensorboard | 1,493,521,967 |
se_48035887 | stackoverflow | MACHINE_LEARNING | How to resolve keras.callbacks import errors for TensorBoard? | How to resolve keras.callbacks import errors for TensorBoard?
Attempt 1
from keras.callbacks import TensorBoard
from keras.models import Sequential
from keras import layers
from keras.optimizers import RMSprop
tb_callback = keras.callbacks.TensorBoard(log_dir="/Users/baldur009/Documents/Scripts/log/model_gru", histo... | https://stackoverflow.com/questions/48035887/how-to-resolve-keras-callbacks-import-errors-for-tensorboard | python, tensorflow, keras, tensorboard | 1,514,652,102 |
se_79932640 | stackoverflow | MACHINE_LEARNING | TensorFlow models DoS via input-controlled tensor sizes? | TensorFlow models DoS via input-controlled tensor sizes?
Running untrusted TensorFlow models and noticed this:
import tensorflow as tf
import time
class TestLayer(tf.keras.layers.Layer):
def call(self, inputs):
n = tf.cast(inputs[0][0], tf.int32)
n = tf.minimum(n, 12000)
x = tf.ones((n, n)... | https://stackoverflow.com/questions/79932640/tensorflow-models-dos-via-input-controlled-tensor-sizes | tensorflow, security, keras, denial-of-service | 1,777,306,420 |
se_70775762 | stackoverflow | MACHINE_LEARNING | How to make a Confusion Matrix with Keras? | How to make a Confusion Matrix with Keras?
I have trained my model (multiclass classification) of CNN using keras and now I want to evaluate the model on my test set of images. Is there a way to create confusion matrix? | https://stackoverflow.com/questions/70775762/how-to-make-a-confusion-matrix-with-keras | python, tensorflow, machine-learning, keras, confusion-matrix | 1,642,616,069 |
se_78853781 | stackoverflow | MACHINE_LEARNING | Deserializing an "over-serialized" TF Sparse Tensor | Deserializing an "over-serialized" TF Sparse Tensor
adj_mx = tf.SparseTensor(indices=indices, values=values, dense_shape=dense_shape)
adj_mx_serialized = tf.io.serialize_sparse(adj_mx).numpy().tobytes()
I did this and saved as blob to sql.
I know what I did is probably a mistake, but I didn't notice it at th... | https://stackoverflow.com/questions/78853781/deserializing-an-over-serialized-tf-sparse-tensor | python, numpy, tensorflow, serialization, deserialization | 1,723,220,637 |
se_79934736 | stackoverflow | MACHINE_LEARNING | what is the best way to produce a dynamic dictionary | what is the best way to produce a dynamic dictionary
I construct two files on Microsoft Excel. One containing Totonaco words with Spanish Meaning and the second one containing Spanish words with Totonaco meaning. I would like to know which is the optimal estructure to run just in my computer (not live in the web) as H... | https://stackoverflow.com/questions/79934736/what-is-the-best-way-to-produce-a-dynamic-dictionary | python, database, tensorflow, dataset | 1,777,651,809 |
se_78899700 | stackoverflow | MACHINE_LEARNING | How to transfer a Keras model to onnx format in Sagemaker Studio? | How to transfer a Keras model to onnx format in Sagemaker Studio?
I am studying how to use Tensorflow, onnx in Sagemaker Studio. I have this code:
tf2onnx.convert.from_keras(model_f,
output_path="2024-08-22-autocat-default.onnx",
opset=14,
... | https://stackoverflow.com/questions/78899700/how-to-transfer-a-keras-model-to-onnx-format-in-sagemaker-studio | tensorflow, keras, amazon-sagemaker, onnx | 1,724,297,788 |
se_33709598 | stackoverflow | MACHINE_LEARNING | TensorFlow cholesky decomposition | TensorFlow cholesky decomposition
From reading the TensorFlow documentation I see that there is a method for computing the Cholesky decomposition of a square matrix. However, usually when I want to use Cholesky decomposition, I do it for the purposes of solving a linear system where direct matrix inversion might be un... | https://stackoverflow.com/questions/33709598/tensorflow-cholesky-decomposition | scipy, tensorflow | 1,447,512,210 |
se_75309542 | stackoverflow | MACHINE_LEARNING | Tensorflow 2.4.0 Cannot dlopen some GPU libraries | Tensorflow 2.4.0 Cannot dlopen some GPU libraries
My cuda is 11.0, and I have pip install this.
python install tensorflow==2.4.0
After input
import tensorflow as tf
gpus = tf.config.experimental.list_physical_devices(device_type='GPU')
cpus = tf.config.experimental.list_physical_devices(device_type='CPU')
print(gpus,... | https://stackoverflow.com/questions/75309542/tensorflow-2-4-0-cannot-dlopen-some-gpu-libraries | python, tensorflow | 1,675,251,034 |
se_64532940 | stackoverflow | MACHINE_LEARNING | Multi-Head attention layers - what is a warpper multi-head layer in Keras? | Multi-Head attention layers - what is a warpper multi-head layer in Keras?
I am new to attention mechanisms and I want to learn more about it by doing some practical examples. I came across a Keras implementation for multi-head attention found it in this website Pypi keras multi-head. I found two different ways to imp... | https://stackoverflow.com/questions/64532940/multi-head-attention-layers-what-is-a-warpper-multi-head-layer-in-keras | tensorflow, keras, deep-learning, transformer-model, attention-model | 1,603,697,157 |
se_38578505 | stackoverflow | MACHINE_LEARNING | Tensorflow: Convert Tensor to numpy array then pass into a feed_dict | Tensorflow: Convert Tensor to numpy array then pass into a feed_dict
I'm trying to build a softmax regression model for CIFAR classification. At first when I tried to pass in my images and labels into the feed dictionary, I got an error that said that feed dictionaries do not accept Tensors. I then converted them into... | https://stackoverflow.com/questions/38578505/tensorflow-convert-tensor-to-numpy-array-then-pass-into-a-feed-dict | python, neural-network, tensorflow, mnist, softmax | 1,469,486,631 |
se_56367049 | stackoverflow | MACHINE_LEARNING | LSTM/GRU and the use of overlapping sliding windows | LSTM/GRU and the use of overlapping sliding windows
Context
I am currently running some experiments with LSTMs / GRUs in Keras. Anyhow, the following questions also relate to the general functionality of these networks, which means an answer does not have to be Keras-specific.
For my experiments I choosed to predict... | https://stackoverflow.com/questions/56367049/lstm-gru-and-the-use-of-overlapping-sliding-windows | tensorflow, keras, deep-learning, lstm, gated-recurrent-unit | 1,559,156,962 |
se_46010571 | stackoverflow | MACHINE_LEARNING | AttributeError: module 'tensorflow.python.pywrap_tensorflow' has no attribute 'TFE_Py_RegisterExceptionClass' | AttributeError: module 'tensorflow.python.pywrap_tensorflow' has no attribute 'TFE_Py_RegisterExceptionClass'
I am trying to develop some time-series sequence prediction, using the latest resources available. To that end, I did check the example code from TensorFlow time-series, but I'm getting this er... | https://stackoverflow.com/questions/46010571/attributeerror-module-tensorflow-python-pywrap-tensorflow-has-no-attribute-t | python, tensorflow, machine-learning, time-series, recurrent-neural-network | 1,504,327,731 |
se_43019852 | stackoverflow | MACHINE_LEARNING | Tensorflow: Getting scalar tensor value as int for pass to set_shape() | Tensorflow: Getting scalar tensor value as int for pass to set_shape()
I'm attempting to load 3D images and their labels from a numpy array to TensorFlow records, then read them from a queue while training my network. The code for conversion is based on the conversion for TensorFlow's Inception model.
Each image has ... | https://stackoverflow.com/questions/43019852/tensorflow-getting-scalar-tensor-value-as-int-for-pass-to-set-shape | python, tensorflow | 1,490,464,242 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.