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_79360262 | stackoverflow | MACHINE_LEARNING | use matplotlib_inline and torch、d2l show error :NotImplementedError: Implement enable_gui in a subclass | use matplotlib_inline and torch、d2l show error :NotImplementedError: Implement enable_gui in a subclass
I learning the "DIVE INTO DEEP LEARNING" pytorch version, in https://d2l.ai/chapter_preliminaries/calculus.html, I used 'jupyter notebook' command, and ran the pytorch code in the jupyter ,everything run ok, I rewro... | https://stackoverflow.com/questions/79360262/use-matplotlib-inline-and-torch-d2l-show-error-notimplementederror-implement-e | matplotlib, deep-learning, pytorch, d2l | 1,736,996,497 |
se_71642653 | stackoverflow | MACHINE_LEARNING | How to resolve the error: RuntimeError: received 0 items of ancdata | How to resolve the error: RuntimeError: received 0 items of ancdata
I have a torch.utils.data.DataLoader. I have created them with the following code.
transform_train = transforms.Compose([
transforms.RandomCrop(32, padding=4),
transforms.RandomHorizontalFlip(),
transforms.ToTensor(),
transforms.Normal... | https://stackoverflow.com/questions/71642653/how-to-resolve-the-error-runtimeerror-received-0-items-of-ancdata | python-3.x, pytorch, dataset, dataloader, pytorch-dataloader | 1,648,444,206 |
se_77119831 | stackoverflow | MACHINE_LEARNING | Sagemaker SDK on lambda function | Sagemaker SDK on lambda function
I'm getting the following message while running the Sagemaker SDK on my lambda function.
I have installed the correct libraries that are comparable with python 3.11 and the lambda.
The log data from lambda:
sagemaker.config INFO - Not applying SDK defaults from location: /etc/xdg/sagem... | https://stackoverflow.com/questions/77119831/sagemaker-sdk-on-lambda-function | python-3.x, amazon-web-services, aws-lambda, pytorch, amazon-sagemaker | 1,694,903,031 |
se_79355534 | stackoverflow | MACHINE_LEARNING | TrOCR fine tuning in Mac M4 chip (MPS) | TrOCR fine tuning in Mac M4 chip (MPS)
I’m encountering an issue when switching my device to mps. My training runs smoothly on cpu, but when I set the device to mps, I get the following error:
RuntimeError: view size is not compatible with input tensor's size and stride (at least one dimension spans across two contigu... | https://stackoverflow.com/questions/79355534/trocr-fine-tuning-in-mac-m4-chip-mps | python, macos, pytorch, ocr, fine-tuning | 1,736,869,190 |
se_78583802 | stackoverflow | MACHINE_LEARNING | How to count total number of pixels of each class for semantic segmentation in detectron2 | How to count total number of pixels of each class for semantic segmentation in detectron2
I want to count the total number of pixels for each segmented class, I only need the count for each general objects, like one class for every vehicle, one for every person and so on. For this reason, I'm using semantic segmentati... | https://stackoverflow.com/questions/78583802/how-to-count-total-number-of-pixels-of-each-class-for-semantic-segmentation-in-d | python, machine-learning, pytorch, semantic-segmentation, detectron | 1,717,627,227 |
se_79356290 | stackoverflow | MACHINE_LEARNING | PyTorch custom module classes with property sub-modules | PyTorch custom module classes with property sub-modules
I have a nn.Module subclass with a property which is also a module, but setting a new value does not work.
I realize nn.Module overrides __setattr__ and therefore a lot of usual Python attribute behavior, but does that really mean the property mechanism is broken... | https://stackoverflow.com/questions/79356290/pytorch-custom-module-classes-with-property-sub-modules | pytorch, module, properties | 1,736,885,986 |
se_79354215 | stackoverflow | MACHINE_LEARNING | OutOfMemoryError: CUDA out of memory (StableDiffusionInpaintPipeline) | OutOfMemoryError: CUDA out of memory (StableDiffusionInpaintPipeline)
The error explains:
Tried to allocate 8.00 GiB. GPU 0 has a total
capacity of 39.56 GiB of which 3.94 GiB is free. Process 3162 has
35.61 GiB memory in use.
Runtime: A-100, High RAM (best option to choose from)
Above error occurred, when running a... | https://stackoverflow.com/questions/79354215/outofmemoryerror-cuda-out-of-memory-stablediffusioninpaintpipeline | python, pytorch, google-colaboratory, stable-diffusion | 1,736,839,041 |
se_79342834 | stackoverflow | MACHINE_LEARNING | Jupyter lab torch module not found installed | Jupyter lab torch module not found installed
I installed the torch library and when I try to upload it to jupyter lab I get the following error. The library in question is pytorch and on Python it loads correctly but when I try on Jupyter it tells me that ModuleNotFoundError: No module named 'torch' | https://stackoverflow.com/questions/79342834/jupyter-lab-torch-module-not-found-installed | jupyter-notebook, pytorch, runtime-error | 1,736,430,082 |
se_79353689 | stackoverflow | MACHINE_LEARNING | SLRUM torch distributed:The client socket cannot be initialized to connect to [localhost]:29500 (errno: 97 - Address family not supported by protocol) | SLRUM torch distributed:The client socket cannot be initialized to connect to [localhost]:29500 (errno: 97 - Address family not supported by protocol)
I am new to pytorch-distributed, and any input will help. I have a code working with a single GPU. I am trying to make it distributed. I am getting a socket connect err... | https://stackoverflow.com/questions/79353689/slrum-torch-distributedthe-client-socket-cannot-be-initialized-to-connect-to-l | python, pytorch, gpu, slurm, multi-gpu | 1,736,812,130 |
se_79350425 | stackoverflow | MACHINE_LEARNING | How to calculate neural net for different weights and inputs in parallel in pytorch? | How to calculate neural net for different weights and inputs in parallel in pytorch?
I am working with machine learning using pytorch.
There is some class implementing neural network inherited from nn.Module. Some network structure is implemented.
There are different parameters (weights, biases) stored in a list:
para... | https://stackoverflow.com/questions/79350425/how-to-calculate-neural-net-for-different-weights-and-inputs-in-parallel-in-pyto | python, machine-learning, pytorch, gpu, genetic-algorithm | 1,736,704,835 |
se_60912744 | stackoverflow | MACHINE_LEARNING | Install PyTorch from requirements.txt | Install PyTorch from requirements.txt
Torch documentation says use
pip install torch==1.4.0+cpu torchvision==0.5.0+cpu -f https://download.pytorch.org/whl/torch_stable.html
to install the latest version of PyTorch. This works when I do it manually but when I add it to req.txt and do pip install -r req.txt, it fails a... | https://stackoverflow.com/questions/60912744/install-pytorch-from-requirements-txt | python, pip, pytorch, requirements.txt | 1,585,476,903 |
se_79352559 | stackoverflow | MACHINE_LEARNING | Suitable Mesh Libraries for a Differentiable ML Pipeline | Suitable Mesh Libraries for a Differentiable ML Pipeline
I'm working on a project that involves constructing a watertight triangle mesh from a point cloud (potentially using alpha shapes), optimizing point positions (with minimal recomputation of the mesh), projecting the mesh to 2D and finding boundary points, preven... | https://stackoverflow.com/questions/79352559/suitable-mesh-libraries-for-a-differentiable-ml-pipeline | python, pytorch, mesh, open3d, pytorch3d | 1,736,779,732 |
se_79350403 | stackoverflow | MACHINE_LEARNING | Calculate formulas on PyTorch using matrix | Calculate formulas on PyTorch using matrix
I have equations:
$e_{ij} = \frac{X_i W^Q (X_j W^K + A^K_{ij}) }{\sqrt{D_z}}$
$\alpha_{ij} = softmax(e_{ij})$
$z_{i} = \sum_j \alpha_{ij} (X_j W^V + A^V_{ij})$
where sizes:
X: [B, S, H,D]
each W: [H,D,D]
each A: [S, S, H,D]
how i can calculate it via matrix operations?
i ha... | https://stackoverflow.com/questions/79350403/calculate-formulas-on-pytorch-using-matrix | python, machine-learning, math, pytorch | 1,736,704,103 |
se_76479777 | stackoverflow | MACHINE_LEARNING | List direct parameters of pytorch module excluding submodule parameters | List direct parameters of pytorch module excluding submodule parameters
Pytorch nn.Module has named_parameters function which returns all parameters of this module including parameters of submodules. What is the most efficient way to access parameters of this module without submodules? | https://stackoverflow.com/questions/76479777/list-direct-parameters-of-pytorch-module-excluding-submodule-parameters | pytorch | 1,686,811,336 |
se_79222803 | stackoverflow | MACHINE_LEARNING | LLM output repeating itself [typo] | LLM output repeating itself [typo]
I am currently following this tutorial on making a basic LLM that spews Shakespeare like text(The full code for the transformer is at the the end). I am at the end but when I train it and get an output the output just keeps repeating itself with the same stuff. Here is my code
import... | https://stackoverflow.com/questions/79222803/llm-output-repeating-itself-typo | python, pytorch, large-language-model | 1,732,533,453 |
se_76742427 | stackoverflow | MACHINE_LEARNING | ModuleNotFoundError: No module named 'torchvision.transforms.functional'; 'torchvision.transforms' is not a package | ModuleNotFoundError: No module named 'torchvision.transforms.functional'; 'torchvision.transforms' is not a package
Im currently perfoming A object detection using Rasperrypi model 4B 8 GB ram.The Error is
Code :
import torch
import matplotlib.pyplot as plt
import numpy as np
import cv2
import uuid
imp... | https://stackoverflow.com/questions/76742427/modulenotfounderror-no-module-named-torchvision-transforms-functional-torch | python-3.x, pytorch, raspberry-pi4, torchvision, yolov5 | 1,690,003,610 |
se_79348677 | stackoverflow | MACHINE_LEARNING | Calculating CrossEntropyLoss over sparse tensors | Calculating CrossEntropyLoss over sparse tensors
While the following works as expected:
import torch
from torch.nn import CrossEntropyLoss
loss = CrossEntropyLoss()
T1 = torch.randn(10, 20, 4, 4) # The BatchSize is a 10 times repeated tensor (1,20,4,4)
T2 = torch.randint(1,20, (10, 4, 4))
loss(T1, T2)
works as exp... | https://stackoverflow.com/questions/79348677/calculating-crossentropyloss-over-sparse-tensors | python, pytorch, sparse-matrix | 1,736,620,810 |
se_78215347 | stackoverflow | MACHINE_LEARNING | Load EMNIST dataset from within the Pytorch | Load EMNIST dataset from within the Pytorch
I'm working on EMNIST dataset and want to load it from PyTorch, but it returns a strange error as:
RuntimeError: File not found or corrupted.
Here's how i have tried to load the dataset:
trainset = torchvision.datasets.EMNIST(root="emnist",
... | https://stackoverflow.com/questions/78215347/load-emnist-dataset-from-within-the-pytorch | python, machine-learning, deep-learning, pytorch, mnist | 1,711,299,233 |
se_75952444 | stackoverflow | MACHINE_LEARNING | Huggingface Transformers (PyTorch) - Custom training loop doubles speed? | Huggingface Transformers (PyTorch) - Custom training loop doubles speed?
I've found something quite strange when using Huggingface Transformers with a custom training loop in PyTorch.
But first, some context: I'm currently trying to fine tune a pretrained GPT2 small (GPT2LMHeadModel; the ~170M param version) on multip... | https://stackoverflow.com/questions/75952444/huggingface-transformers-pytorch-custom-training-loop-doubles-speed | pytorch, huggingface-transformers, huggingface, gpt-2, huggingface-datasets | 1,680,803,910 |
se_79345260 | stackoverflow | MACHINE_LEARNING | torchrl: Using SyncDataCollector with a custom pytorch dqn | torchrl: Using SyncDataCollector with a custom pytorch dqn
I'm trying to use torchrl's SyncDataCollector with a DQN I implemented myself in torch. As the DQN uses Conv2d and Linear Layer I have to calculate the correct size for the input of the first Linear Layer, the size param in the following net
class PixelDQN(nn.... | https://stackoverflow.com/questions/79345260/torchrl-using-syncdatacollector-with-a-custom-pytorch-dqn | machine-learning, deep-learning, pytorch, reinforcement-learning | 1,736,502,545 |
se_79346700 | stackoverflow | MACHINE_LEARNING | mlflow.pytorch.load_model failing due to failure "No module named 'src.<mymodelname>'" issue with unpickler.load | mlflow.pytorch.load_model failing due to failure "No module named 'src.<mymodelname>'" issue with unpickler.load
I am working to support some model developers by prototyping some functionality with MLflow model registry.
We successfully register versions of the model fine (it's a Pytorch Lightn... | https://stackoverflow.com/questions/79346700/mlflow-pytorch-load-model-failing-due-to-failure-no-module-named-src-mymodeln | python, pytorch, mlflow, pytorch-lightning | 1,736,533,916 |
se_79344153 | stackoverflow | MACHINE_LEARNING | Getting AttributeError: Can't get attribute 'MulticlassRegression' on <module 'models' while following repo instructions | Getting AttributeError: Can't get attribute 'MulticlassRegression' on <module 'models' while following repo instructions
I am trying to run this GitHub repository locally. However, when I try to run their test command (with their test images), I run into this error:
AttributeError: Can't get at... | https://stackoverflow.com/questions/79344153/getting-attributeerror-cant-get-attribute-multiclassregression-on-module-m | python, pytorch | 1,736,460,294 |
se_79346172 | stackoverflow | MACHINE_LEARNING | Torch Matrix with indexes | Torch Matrix with indexes
I have a n.n torch matrix A containing indexes from 10 to n-1. I want to Build another torch matrix B where B[A[i,j]]=1 not using loop.
Additionally I want to build another matrix C of 1.n size where it will store index of first 0 in the each array. | https://stackoverflow.com/questions/79346172/torch-matrix-with-indexes | pytorch | 1,736,522,767 |
se_62999144 | stackoverflow | MACHINE_LEARNING | Why does OpenCV's deep learning face detector not work on images that are rotated to one side? | Why does OpenCV's deep learning face detector not work on images that are rotated to one side?
I have tried out pyimagesearch tutorial on OpenCV's deep learning face detector model but am running into an issue with images that are rotated. It does not work on images like the one below. For context I have roughly 1... | https://stackoverflow.com/questions/62999144/why-does-opencvs-deep-learning-face-detector-not-work-on-images-that-are-rotate | python, opencv, deep-learning, computer-vision, face-detection | 1,595,260,028 |
se_79884485 | stackoverflow | MACHINE_LEARNING | Training Tesseract to decode the Epstein Files | Training Tesseract to decode the Epstein Files
The Department of Justice has recently released Volumes 09 and 10 of the Epstein files. Among them is a PDF: https://www.justice.gov/epstein/files/DataSet%209/EFTA01012650.pdf
This PDF contains screenshots of an EMail that shows the Base64 encoded version of two JPEG imag... | https://stackoverflow.com/questions/79884485/training-tesseract-to-decode-the-epstein-files | python, deep-learning, ocr, tesseract, tesstrain | 1,770,396,882 |
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_56147685 | stackoverflow | MACHINE_LEARNING | How to split a Keras model, with a non-sequential architecture like ResNet, into sub-models? | How to split a Keras model, with a non-sequential architecture like ResNet, into sub-models?
My model is a resnet-152 i wanna cutting it into two submodels and the problem is with the second one i can't figure out how to build a model from an intermediate layer to the output
I tried this code from this response and... | https://stackoverflow.com/questions/56147685/how-to-split-a-keras-model-with-a-non-sequential-architecture-like-resnet-into | python, keras, deep-learning, keras-layer, resnet | 1,557,917,814 |
se_69983492 | stackoverflow | MACHINE_LEARNING | How to leverage the Neural Engine on Apple Silicon/M1 processors as a developer? | How to leverage the Neural Engine on Apple Silicon/M1 processors as a developer?
I am struggling to find an answer for this on SO, Google, or Apple's Developer Documentation.
Does Apple provide a APIs for any languages that allow developers to leverage the Neural Engine of the new M1 chips on macOS?
Searching Apple's ... | https://stackoverflow.com/questions/69983492/how-to-leverage-the-neural-engine-on-apple-silicon-m1-processors-as-a-developer | machine-learning, deep-learning, neural-network, apple-m1, apple-silicon | 1,637,033,881 |
se_54250584 | stackoverflow | MACHINE_LEARNING | Deep learning on Google Colab: loading large image dataset is very long, how to accelerate the process? | Deep learning on Google Colab: loading large image dataset is very long, how to accelerate the process?
I'm working on a Deep Learning model using Keras and to speed up the computation I'd like to use the GPU available on google colab.
My image files are already loaded on my google drive. I have 24'000 images for tra... | https://stackoverflow.com/questions/54250584/deep-learning-on-google-colab-loading-large-image-dataset-is-very-long-how-to | python, keras, deep-learning, google-colaboratory | 1,547,802,139 |
se_79448910 | stackoverflow | MACHINE_LEARNING | Why facing "CUDA error: device-side assert triggered" while training LSTM model? | Why facing "CUDA error: device-side assert triggered" while training LSTM model?
I am learning Pytorch and deep learning, I am working on a dataset containing 4-features. My problem statement is multiclass classification problem, total 9 possible output 1 to 9.
Gene which is categorical type.
Variation which... | https://stackoverflow.com/questions/79448910/why-facing-cuda-error-device-side-assert-triggered-while-training-lstm-model | python, machine-learning, deep-learning, pytorch | 1,739,894,755 |
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_75701437 | stackoverflow | MACHINE_LEARNING | Why do we multiply learning rate by gradient accumulation steps in PyTorch? | Why do we multiply learning rate by gradient accumulation steps in PyTorch?
Loss functions in pytorch use "mean" reduction. So it means that the model gradient will have roughly the same magnitude given any batch size. It makes sense that you want to scale the learning rate up when you increase batch size because your... | https://stackoverflow.com/questions/75701437/why-do-we-multiply-learning-rate-by-gradient-accumulation-steps-in-pytorch | python, deep-learning, pytorch, gradient-descent, learning-rate | 1,678,486,502 |
se_72417747 | stackoverflow | MACHINE_LEARNING | ModuleNotFoundError: No module named 'torchvision.models.feature_extraction' | ModuleNotFoundError: No module named 'torchvision.models.feature_extraction'
I want to extract features in ResNet101, however, I have trouble importing torchvision.models.feature_extraction.
Here is my code:
from torchvision import models
from torchvision.models.feature_extractor import create_feature_extr... | https://stackoverflow.com/questions/72417747/modulenotfounderror-no-module-named-torchvision-models-feature-extraction | deep-learning, pytorch, feature-extraction, torchvision | 1,653,758,340 |
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_79955889 | stackoverflow | MACHINE_LEARNING | Will a 80 GB GPU and a 48 GB GPU give identical results on an open source text-to-video model for the same quantization and seed? | Will a 80 GB GPU and a 48 GB GPU give identical results on an open source text-to-video model for the same quantization and seed?
I am considering to buy GPUs for my project of open source text-to-video models like ltx-2-19b (lightricks) or wan-v2.2-a14b. I read online that the same configuration/quantization and seed... | https://stackoverflow.com/questions/79955889/will-a-80-gb-gpu-and-a-48-gb-gpu-give-identical-results-on-an-open-source-text-t | machine-learning, deep-learning, artificial-intelligence | 1,781,073,669 |
se_79902067 | stackoverflow | MACHINE_LEARNING | can V-JEPA be used to detect audience engagement during a seminar from live video | can V-JEPA be used to detect audience engagement during a seminar from live video
I am experimenting with the V-JEPA model developed by Meta for video understanding.
My goal is to analyze a live video stream of people attending a seminar and determine their engagement level (for example: bored, attentive, or intereste... | https://stackoverflow.com/questions/79902067/can-v-jepa-be-used-to-detect-audience-engagement-during-a-seminar-from-live-vide | machine-learning, deep-learning, pytorch, computer-vision, video-processing | 1,772,782,100 |
se_79956997 | stackoverflow | MACHINE_LEARNING | Trigram Language Model :Two implementations give different loss, are they equivalent? | Trigram Language Model :Two implementations give different loss, are they equivalent?
I am implementing a trigram character-level language model following Andrej Karpathy's makemore series. I have two implementations and I want to understand if they are mathematically equivalent or fundamentally different models( i ga... | https://stackoverflow.com/questions/79956997/trigram-language-model-two-implementations-give-different-loss-are-they-equiva | machine-learning, deep-learning, pytorch, neural-network, cross-entropy | 1,781,254,604 |
se_79949769 | stackoverflow | MACHINE_LEARNING | Problem in tensor shape difference between training and and testing data when running a CNN model | Problem in tensor shape difference between training and and testing data when running a CNN model
I have a problem when running the saved model of a CNN. When I train the model and the input tensor size of the first linear layer is set to the shape for the training data after it is flattened and went through the convo... | https://stackoverflow.com/questions/79949769/problem-in-tensor-shape-difference-between-training-and-and-testing-data-when-ru | python, deep-learning, jupyter-notebook, pytorch, data-science | 1,780,326,439 |
se_49969006 | stackoverflow | MACHINE_LEARNING | save and load keras.callbacks.History | save and load keras.callbacks.History
I'm training a deep neural net using Keras and looking for a way to save and later load the history object which is of keras.callbacks.History type. Here's the setup:
history_model_1 = model_1.fit_generator(train_generator,
steps_per_epoch=100,
... | https://stackoverflow.com/questions/49969006/save-and-load-keras-callbacks-history | python, deep-learning, keras, generator | 1,524,419,748 |
se_61430162 | stackoverflow | MACHINE_LEARNING | Colab RAM is Almost Full After Training Although I Delete The Variables | Colab RAM is Almost Full After Training Although I Delete The Variables
recently I am using Google Colab GPU for training a model. after the training, I delete the large variables that I have used for the training, but I notice that the ram is still full. I wonder what is really happening and what is exactly in the ra... | https://stackoverflow.com/questions/61430162/colab-ram-is-almost-full-after-training-although-i-delete-the-variables | python, deep-learning, google-colaboratory, ram | 1,587,837,501 |
se_79959134 | stackoverflow | MACHINE_LEARNING | CUDAExecutionProvider fails to initialize, InsightFace uses CPU only | CUDAExecutionProvider fails to initialize, InsightFace uses CPU only
I'm trying to run InsightFace with GPU acceleration on a Windows 11 machine with an RTX 4060 Laptop GPU. However, InsightFace is unable to use CUDA and always falls back to CPUExecutionProvider.
Environment
OS: Windows 11
GPU: NVIDIA GeForce RTX 40... | https://stackoverflow.com/questions/79959134/cudaexecutionprovider-fails-to-initialize-insightface-uses-cpu-only | python, deep-learning, onnx | 1,781,523,397 |
se_75371176 | stackoverflow | MACHINE_LEARNING | module 'numpy' has no attribute 'MachAr'? | module 'numpy' has no attribute 'MachAr'?
I have a question. When I import 'variance_inflation_factor ' from 'statsmodels.stats.outliers_influence', I get ' module 'numpy' has no attribute 'MachAr'' error, what is the reason?
I once executed this code in a project and it worked without any problems, bu... | https://stackoverflow.com/questions/75371176/module-numpy-has-no-attribute-machar | machine-learning, deep-learning, jupyter-notebook, linear-regression | 1,675,761,467 |
se_59749991 | stackoverflow | MACHINE_LEARNING | PyTorch - Custom ReLU squared Implementation | PyTorch - Custom ReLU squared Implementation
I work on a project and I want to implement the ReLU squared activation function (max{0,x^2}). Is it ok to call it like:
# example code
def forward(self, x):
s = torch.relu(x**2)
return s
Or should I implement the activation function on my own? In the... | https://stackoverflow.com/questions/59749991/pytorch-custom-relu-squared-implementation | python, machine-learning, deep-learning, neural-network, pytorch | 1,579,085,934 |
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_79952170 | stackoverflow | MACHINE_LEARNING | What is the practical approach to become an AI Developer to Build AI powered apps/products? | What is the practical approach to become an AI Developer to Build AI powered apps/products?
I request Senior AI Developers to give answer take this question very seriously as most of the students trying to embark in AI your time and advice is very valuable for us so I request all the AI Developers to give precise answ... | https://stackoverflow.com/questions/79952170/what-is-the-practical-approach-to-become-an-ai-developer-to-build-ai-powered-app | machine-learning, deep-learning, artificial-intelligence | 1,780,722,206 |
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_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_79943593 | stackoverflow | MACHINE_LEARNING | Tuning for SCAFFOLD Server + Client Learning Rates η_g and η_i? | Tuning for SCAFFOLD Server + Client Learning Rates η_g and η_i?
for my project on training a binary classifier on a residual CNN - data dimension (12, 4096), I am simulating federated training using FedAvg, FedProx and SCAFFOLD as the aggregation strategies.
The SCAFFOLD paper by Karimireddy et al.: https://arxiv.org/... | https://stackoverflow.com/questions/79943593/tuning-for-scaffold-server-client-learning-rates-%ce%b7-g-and-%ce%b7-i | deep-learning, pytorch, hyperparameters, scaffold, federated-learning | 1,779,209,820 |
se_79942550 | stackoverflow | MACHINE_LEARNING | How do we deal with partially labelled data in Classification problems | How do we deal with partially labelled data in Classification problems
How do we deal with ML situations where part of the data has labels or ground truths and the rest doesn't? | https://stackoverflow.com/questions/79942550/how-do-we-deal-with-partially-labelled-data-in-classification-problems | deep-learning, neural-network, classification, multilabel-classification | 1,779,035,314 |
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_79940924 | stackoverflow | MACHINE_LEARNING | Best practices for image annotation consistency in object detection projects | Best practices for image annotation consistency in object detection projects
I am working on a computer vision dataset preparation workflow for object detection training.
The project involves image annotation using bounding boxes and polygon segmentation for AI model training.
I would like to understand the best pract... | https://stackoverflow.com/questions/79940924/best-practices-for-image-annotation-consistency-in-object-detection-projects | machine-learning, image-processing, deep-learning, computer-vision, yolo | 1,778,741,886 |
se_79939816 | stackoverflow | MACHINE_LEARNING | How to Evaluate my RAG System using Local / free tier API model | How to Evaluate my RAG System using Local / free tier API model
I have build a self-evaluating RAG System now i want to evaluate it so i can know what my system performance for that i used DeeEval framework but the thing is i don’t have OpenAI API key as i’m broke so i’m using free tier API from Groq/Cerebra’s or loc... | https://stackoverflow.com/questions/79939816/how-to-evaluate-my-rag-system-using-local-free-tier-api-model | machine-learning, deep-learning, artificial-intelligence, evaluation, rag | 1,778,574,623 |
se_42070528 | stackoverflow | MACHINE_LEARNING | What does global pooling do? | What does global pooling do?
I recently found the "global_pooling" flag in the Pooling layer in caffe, however was unable to find sth about it in the documentation here (Layer Catalogue)
nor here (Pooling doxygen doc) .
Is there an easy forward examply explanation to this in comparison to the normal Pool-Layer behavio... | https://stackoverflow.com/questions/42070528/what-does-global-pooling-do | machine-learning, deep-learning, conv-neural-network, caffe | 1,486,392,351 |
se_79913448 | stackoverflow | MACHINE_LEARNING | Variational Autoencoders Visualisation | Variational Autoencoders Visualisation
I am unable to visualise how variational autoencoders work graphically. I have understood the equations but am unable to figure out how this would all translate visually, like what is the purpose of P(z) (=> the latent space distribution) and what it would do intuitively, etc. I ... | https://stackoverflow.com/questions/79913448/variational-autoencoders-visualisation | deep-learning, autoencoder | 1,774,350,024 |
se_72302786 | stackoverflow | MACHINE_LEARNING | Pytorch-forecasting:: Univariate AssertionError: filters should not remove entries all entries | Pytorch-forecasting:: Univariate AssertionError: filters should not remove entries all entries
I tried to do univariate forecasting with Pytorch-Forecasting.
But I got following error on TimeSeriesDataSet
AssertionError: filters should not remove entries all entries - check
encoder/decoder lengths and lags
I have tr... | https://stackoverflow.com/questions/72302786/pytorch-forecasting-univariate-assertionerror-filters-should-not-remove-entri | python, deep-learning, time-series, pytorch-forecasting | 1,652,955,421 |
se_79928214 | stackoverflow | MACHINE_LEARNING | What are a good books to read in Bayesian Learning? | What are a good books to read in Bayesian Learning?
Seems like Bayesian learning is the go to method now for reducing over fitting in ML models, I've read Manning's NLP in action, Deep Learning with python, O'Reilly Deep Learning foundations, Hands on learning with sickit learn and tensorflow ( the most prolific ML bo... | https://stackoverflow.com/questions/79928214/what-are-a-good-books-to-read-in-bayesian-learning | deep-learning, nlp, artificial-intelligence, bayesian-networks, bayesian-deep-learning | 1,776,589,050 |
se_49104612 | stackoverflow | MACHINE_LEARNING | TF-IDF vs XGBoost vs CNN | TF-IDF vs XGBoost vs CNN
I have a Natural Language Dataset where I am performing classification.
The tf-idf model always performs better than a Convolutional Neural Network model.
I have performed a lot of hyperparameter tuning but the performance of the tf-idf model remains better.
In fact, the tf-idf model is per... | https://stackoverflow.com/questions/49104612/tf-idf-vs-xgboost-vs-cnn | machine-learning, deep-learning, conv-neural-network, tf-idf | 1,520,231,191 |
se_79932456 | stackoverflow | MACHINE_LEARNING | Regarding's MONAI WarmupCosineSchedule with AdamW, should scheduler.step() be called per batch, and does optimizer lr define the peak lr? | Regarding's MONAI WarmupCosineSchedule with AdamW, should scheduler.step() be called per batch, and does optimizer lr define the peak lr?
I am training a PyTorch segmentation model and using:
torch.optim.AdamW
monai.optimizers.WarmupCosineSchedule
My optimizer:
optimizer = torch.optim.AdamW(
model.paramete... | https://stackoverflow.com/questions/79932456/regardings-monai-warmupcosineschedule-with-adamw-should-scheduler-step-be-ca | deep-learning, pytorch, huggingface | 1,777,284,336 |
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_79931196 | stackoverflow | MACHINE_LEARNING | What are the best methods or libraries to extract Arabic text from images or PDFs without using Surya OCR? | What are the best methods or libraries to extract Arabic text from images or PDFs without using Surya OCR?
I am working on a project where I need to extract Arabic text from images and PDF documents. Currently, I am using Surya OCR, but I would like to explore other alternatives that might provide better accuracy or e... | https://stackoverflow.com/questions/79931196/what-are-the-best-methods-or-libraries-to-extract-arabic-text-from-images-or-pdf | python-3.x, deep-learning, artificial-intelligence | 1,777,021,757 |
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_79929510 | stackoverflow | MACHINE_LEARNING | Do you use raw pytorch or some wrapper or such? | Do you use raw pytorch or some wrapper or such?
I recently started a course about machine-learning as a part of my master that is apparently essentially a course in PyTorch, since starting the course i have learned that PyTorch is actually used a lot in industry and thus this course have become more important to me...... | https://stackoverflow.com/questions/79929510/do-you-use-raw-pytorch-or-some-wrapper-or-such | python, deep-learning, pytorch | 1,776,780,449 |
se_79927482 | stackoverflow | MACHINE_LEARNING | Ai Neural Network | C++ | Project Guidance --- Matrix Part | Ai Neural Network | C++ | Project Guidance --- Matrix Part
I’m an undergraduate CS student working on a final project due in about a month, and I’m trying to design and implement a C++-based AI Neural Network Simulator integrated into a small game environment. I’d really appreciate guidance on architecture, design dec... | https://stackoverflow.com/questions/79927482/ai-neural-network-c-project-guidance-matrix-part | c++, matrix, visual-c++, deep-learning, neural-network | 1,776,439,017 |
se_79911827 | stackoverflow | MACHINE_LEARNING | Need Guide for AI/ML | Need Guide for AI/ML
I am looking to grow my career in the AI/ML field, but I am currently feeling a bit confused about the right direction. At the moment, I am learning Python, NumPy, and Pandas.
Could someone please suggest a proper roadmap or recommend useful resources? I would also appreciate guidance on the key t... | https://stackoverflow.com/questions/79911827/need-guide-for-ai-ml | python, machine-learning, deep-learning, artificial-intelligence | 1,774,089,908 |
se_78654902 | stackoverflow | MACHINE_LEARNING | What is the alternative for keras.layers.DenseFeatures in TensorFlow 2.16.+ | What is the alternative for keras.layers.DenseFeatures in TensorFlow 2.16.+
I am using feature-column dataset in my code, in newer version of TensorFlow 2.16.1 and later there is no keras.layers.DenseFeatures class in order to ready the input layer for the DNN. what is the alternative for that?
As I am using python 3.... | https://stackoverflow.com/questions/78654902/what-is-the-alternative-for-keras-layers-densefeatures-in-tensorflow-2-16 | python-3.x, tensorflow, deep-learning, data-preprocessing | 1,719,019,613 |
se_79927828 | stackoverflow | MACHINE_LEARNING | Why does my LSTM time series prediction show periodic sharp downward spikes on test data? | Why does my LSTM time series prediction show periodic sharp downward spikes on test data?
I am trying to predict google stock price using LSTM model from PyTorch.
However after training my model and plotting the predicted results vs the real value, I see periodic sharp downward spikes.
Here is notebook I have wrote in... | https://stackoverflow.com/questions/79927828/why-does-my-lstm-time-series-prediction-show-periodic-sharp-downward-spikes-on-t | deep-learning, pytorch, lstm, stock | 1,776,504,516 |
se_43190221 | stackoverflow | MACHINE_LEARNING | How to perform a Multi-Class classification in a convolutional neural 1D network with tensorflow? | How to perform a Multi-Class classification in a convolutional neural 1D network with tensorflow?
I have a training file in the following format:
0.086, 0.4343, 0.4212, ...., class1
0.086, 0.4343, 0.4212, ...., class2
0.086, 0.4343, 0.4212, ...., class5
Where, each row is a one-dimensional vector and t... | https://stackoverflow.com/questions/43190221/how-to-perform-a-multi-class-classification-in-a-convolutional-neural-1d-network | python, tensorflow, deep-learning, conv-neural-network | 1,491,238,500 |
se_79924583 | stackoverflow | MACHINE_LEARNING | Book Recommendation in PyTorch | Book Recommendation in PyTorch
I am looking to find a book on PyTorch that is suitable for beginners, Ive used sklearn in the past for ML its a simple workflow for me prepare the X and Y data, fit/train a model, and make predictions (different workflow if you are using it for NLP or Images obviously). I know how to ma... | https://stackoverflow.com/questions/79924583/book-recommendation-in-pytorch | python, deep-learning, pytorch, artificial-intelligence | 1,776,056,423 |
se_57223818 | stackoverflow | MACHINE_LEARNING | How to solve strange cuda error in PyTorch? | How to solve strange cuda error in PyTorch?
Here's my code; first I define my u-net model as a class of nn.Module like the following code:
import torch
import torch.nn as nn
import torch.nn.functional as F
from torch.utils.data import Dataset, DataLoader
from torchvision import transforms, utils
class unet(nn.Module... | https://stackoverflow.com/questions/57223818/how-to-solve-strange-cuda-error-in-pytorch | python, deep-learning, pytorch | 1,564,158,160 |
se_68274836 | stackoverflow | MACHINE_LEARNING | pytorch, AttributeError: module 'torch' has no attribute '_utils_internal' | pytorch, AttributeError: module 'torch' has no attribute '_utils_internal'
I need to test some fastai models in an environment without GPU, specifically in a windows server. I trained some fastai models in Google colab, and now need to test them in real time, connected to an industrial process. Neverth... | https://stackoverflow.com/questions/68274836/pytorch-attributeerror-module-torch-has-no-attribute-utils-internal | python-3.x, deep-learning, pytorch, anaconda, fast-ai | 1,625,591,646 |
se_57229054 | stackoverflow | MACHINE_LEARNING | How to implement my own ResNet with torch.nn.Sequential in Pytorch? | How to implement my own ResNet with torch.nn.Sequential in Pytorch?
I want to implement a ResNet network (or rather, residual blocks) but I really want it to be in the sequential network form.
What I mean by sequential network form is the following:
## mdl5, from cifar10 tutorial
mdl5 = nn.Sequential(OrderedDict([
... | https://stackoverflow.com/questions/57229054/how-to-implement-my-own-resnet-with-torch-nn-sequential-in-pytorch | machine-learning, neural-network, deep-learning, conv-neural-network, pytorch | 1,564,200,513 |
se_79920361 | stackoverflow | MACHINE_LEARNING | How to detect mislabeled images in a directory based image classification dataset? | How to detect mislabeled images in a directory based image classification dataset?
What is the best way to find mislabeled images in a dataset where labels are based on folders?
Each class is already separated into its own directory, but some images inside are clearly in the wrong class.
What methods are commonly used... | https://stackoverflow.com/questions/79920361/how-to-detect-mislabeled-images-in-a-directory-based-image-classification-datase | image-processing, deep-learning, image-classification | 1,775,367,754 |
se_79912893 | stackoverflow | MACHINE_LEARNING | Which is the best way to detect lines in historically book pages | Which is the best way to detect lines in historically book pages
I am working on an OCR project and need to create a dataset consisting of approximately 1247 pages from 6 books. I need to crop the images line by line and transcribe the text for training a model. What is the best approach for accurately detecting lines... | https://stackoverflow.com/questions/79912893/which-is-the-best-way-to-detect-lines-in-historically-book-pages | python, tensorflow, opencv, deep-learning, ocr | 1,774,279,573 |
se_79919607 | stackoverflow | MACHINE_LEARNING | can we clear noise on sensor data for anomaly detection? | can we clear noise on sensor data for anomaly detection?
I am recently working on a project where I've large amount of sensor data, and my main goal is to detect the failure of machine/sensor at a particular time, also explain why machine has an anomaly?
ex. "Temprature accidently spikes up and pressure doesn't"
I've ... | https://stackoverflow.com/questions/79919607/can-we-clear-noise-on-sensor-data-for-anomaly-detection | machine-learning, deep-learning, time-series, shap, anomaly-detection | 1,775,219,611 |
se_59153248 | stackoverflow | MACHINE_LEARNING | why is my Neural Network stuck at high loss value after the first epochs | why is my Neural Network stuck at high loss value after the first epochs
I'm doing regression using Neural Networks. It should be a simple task for NN to do, I have 10 features and 1 output that I want to predict. I'm using pytorch for my project but my Model is not learning well. the loss start with a very high value... | https://stackoverflow.com/questions/59153248/why-is-my-neural-network-stuck-at-high-loss-value-after-the-first-epochs | neural-network, deep-learning, regression, pytorch, skorch | 1,575,363,101 |
se_79910269 | stackoverflow | MACHINE_LEARNING | How to apply SHAP explanations to a CNN+BiLSTM model trained on severely imbalanced network intrusion detection data? | How to apply SHAP explanations to a CNN+BiLSTM model trained on severely imbalanced network intrusion detection data?
I am building an explainable Intrusion Detection System for IoT networks using a hybrid CNN+BiLSTM+Multi-Head Self-Attention architecture in Keras/TensorFlow. My dataset is CIC-BoT-IoT which has extrem... | https://stackoverflow.com/questions/79910269/how-to-apply-shap-explanations-to-a-cnnbilstm-model-trained-on-severely-imbalan | python, keras, deep-learning, shap, imbalanced-data | 1,773,867,564 |
se_78076239 | stackoverflow | MACHINE_LEARNING | How to efficiently calculate gradients of all outputs with respect to parameters? | How to efficiently calculate gradients of all outputs with respect to parameters?
I have a relatively simple requirement but surprisingly this does not seem to be straightforward to implement in pytorch. Given a neural network with $P$ parameters that outputs a vector of length $Y$ and a batch of $B$ data inputs, I wo... | https://stackoverflow.com/questions/78076239/how-to-efficiently-calculate-gradients-of-all-outputs-with-respect-to-parameters | python, machine-learning, deep-learning, pytorch | 1,709,138,847 |
se_48468968 | stackoverflow | MACHINE_LEARNING | How to update weights and bias in multi-layer NN with backpropagation with R? | How to update weights and bias in multi-layer NN with backpropagation with R?
I'm trying to make a simple neural network with R.
i want to my code to tell me if this iris is versicolor or virginica this to type are not linear separable, in Single layer NN it's simple but in Multi-layer NN i don't know how to update th... | https://stackoverflow.com/questions/48468968/how-to-update-weights-and-bias-in-multi-layer-nn-with-backpropagation-with-r | r, neural-network, deep-learning | 1,516,997,965 |
se_60934350 | stackoverflow | MACHINE_LEARNING | How to estimate how much GPU memory required for deep learning? | How to estimate how much GPU memory required for deep learning?
We are trying to train our model for object recognition using tensorflow. Since there are too many images (100GB), I guess our current GPU server (1*2080Ti) could not work. We may need to purchase a more powerful one, but I do not sure how to estimate how... | https://stackoverflow.com/questions/60934350/how-to-estimate-how-much-gpu-memory-required-for-deep-learning | tensorflow, deep-learning, gpu, nvidia | 1,585,583,419 |
se_45132809 | stackoverflow | MACHINE_LEARNING | How to select batch size automatically to fit GPU? | How to select batch size automatically to fit GPU?
I am training deep neural networks with a GPU. If I make samples too large, batches too large, or networks too deep, I get an out of memory error. In this case, it is sometimes possible to make smaller batches and still train.
Is it possible to calculate GPU size req... | https://stackoverflow.com/questions/45132809/how-to-select-batch-size-automatically-to-fit-gpu | tensorflow, out-of-memory, deep-learning, gpu, keras | 1,500,235,329 |
se_73152462 | stackoverflow | MACHINE_LEARNING | Tensorflow custom loss for multiple outputs model | Tensorflow custom loss for multiple outputs model
I am working on a image segmentation and classification model which take one 3D image (64x64x64) and return two outputs (3D mask 64x64x64 and one-hot encoded category). Two outputs has been defined like this:
seg_final_stage = Conv3D(seg_classes, kernel_size=3, strides... | https://stackoverflow.com/questions/73152462/tensorflow-custom-loss-for-multiple-outputs-model | python, tensorflow, keras, deep-learning | 1,659,009,204 |
se_79903249 | stackoverflow | MACHINE_LEARNING | How to design similarity search for mechanical products | How to design similarity search for mechanical products
I have a website which shows different products about machines and its different parts. There are 10000 of product pages, and want to build a functionality which shows similar product pages and associated parts when someone visiting one product page.
So, for this... | https://stackoverflow.com/questions/79903249/how-to-design-similarity-search-for-mechanical-products | deep-learning, nlp, neural-network, graph-neural-network | 1,772,974,426 |
se_79899296 | stackoverflow | MACHINE_LEARNING | Learning Resource for TensorRT and PyCUDA (or other CUDA Python inferface library) | Learning Resource for TensorRT and PyCUDA (or other CUDA Python inferface library)
I'm trying to deploy a PyTorch model to an edge device (Jetson Orin Nano). Deploying the PyTorch model directly does not satisfy the requirements posed by the clients, so I'm looking into optimize the model using tensorRT. But my oh my,... | https://stackoverflow.com/questions/79899296/learning-resource-for-tensorrt-and-pycuda-or-other-cuda-python-inferface-librar | deep-learning, deployment, cuda, hardware, tensorrt | 1,772,441,817 |
se_79898762 | stackoverflow | MACHINE_LEARNING | How initializing weights with large value causes vanishing gradient problem in neural network | How initializing weights with large value causes vanishing gradient problem in neural network
I was watching this tutorial on weight initialization in neural network, and im not able to understand this statement:
In case of Tanh, Sigmoid activation, If we initialize weights with large values (range [0,1)), then the tr... | https://stackoverflow.com/questions/79898762/how-initializing-weights-with-large-value-causes-vanishing-gradient-problem-in-n | python, tensorflow, deep-learning, neural-network, activation-function | 1,772,354,646 |
se_79896938 | stackoverflow | MACHINE_LEARNING | Is clothing-invariant person recognition possible using still images only? | Is clothing-invariant person recognition possible using still images only?
I am working on a person recognition system for learning purposes.
My goal is:
Maintain a small gallery of known people (multiple images per person)
Given a new query image, return the most similar person with a confidence score
The system s... | https://stackoverflow.com/questions/79896938/is-clothing-invariant-person-recognition-possible-using-still-images-only | python, deep-learning, pytorch, computer-vision, feature-extraction | 1,772,104,241 |
se_62991016 | stackoverflow | MACHINE_LEARNING | Tensorflow keras model for solving simple equation | Tensorflow keras model for solving simple equation
I'm trying to understand how to create a simple tensorflow 2.2 keras model that can predict a simple function value:
f(a, b, c, d) = a < b : max(a/2, c/3) : max (b/2, d/3)
I know this exact question can be reduced to a categorical classification but my intention is t... | https://stackoverflow.com/questions/62991016/tensorflow-keras-model-for-solving-simple-equation | tensorflow, machine-learning, keras, deep-learning, neural-network | 1,595,231,943 |
se_79778716 | stackoverflow | MACHINE_LEARNING | Getting “Sizes of tensors must match” error when using ComfyUI WanVideoWrapper (wan2.2) to generate video | Getting “Sizes of tensors must match” error when using ComfyUI WanVideoWrapper (wan2.2) to generate video
I am trying to generate a video using Wan 2.2. My goal is to take a motion sequence from an input video and a single reference image, and then generate a new video where the character in the reference image perfor... | https://stackoverflow.com/questions/79778716/getting-sizes-of-tensors-must-match-error-when-using-comfyui-wanvideowrapper | deep-learning, pytorch, artificial-intelligence | 1,759,208,695 |
se_76862437 | stackoverflow | MACHINE_LEARNING | How to configure the page number in the gcp document ai toolbox converter? | How to configure the page number in the gcp document ai toolbox converter?
I am trying to include the page number in the configuration JSON. I tried some ways, but no one works. Looking at the converter code on the GitHub page, I saw a lot of mentions of "page_number", so I think it's possible.
Also, there's some docu... | https://stackoverflow.com/questions/76862437/how-to-configure-the-page-number-in-the-gcp-document-ai-toolbox-converter | google-cloud-platform, deep-learning, nlp, named-entity-recognition, cloud-document-ai | 1,691,520,686 |
se_79889994 | stackoverflow | MACHINE_LEARNING | PyTorch ValueError: optimizer got an empty parameter list when building a Logistic Regression Model | PyTorch ValueError: optimizer got an empty parameter list when building a Logistic Regression Model
I tried making a logistic regression model using nn.Module
class LogisticRegressionModel(nn.Module):
def __init__(self, input_dim= None) -> None:
super().__init__()
if input_dim is not None:
... | https://stackoverflow.com/questions/79889994/pytorch-valueerror-optimizer-got-an-empty-parameter-list-when-building-a-logist | python, optimization, deep-learning, pytorch, neural-network | 1,771,213,568 |
se_53358838 | stackoverflow | MACHINE_LEARNING | Predicting all zeros | Predicting all zeros
I've depeloped a neural network for classification and I'm getting a 0.93 of accuracy, the problem is that I'm predicting all zeros because the distribution of the data.
How can I fix it? Should I change from neural network to another algorithm?
Thanks in advance
Edit: i've just checked and m... | https://stackoverflow.com/questions/53358838/predicting-all-zeros | python, tensorflow, machine-learning, deep-learning | 1,542,526,957 |
se_79887750 | stackoverflow | MACHINE_LEARNING | Why does BatchNorm1d fail with batch size 1 in training mode? | Why does BatchNorm1d fail with batch size 1 in training mode?
I am training a small PyTorch model and want to use nn.BatchNorm1d.
When the batch size is 1 and the model is in training mode, I get the error below;
ValueError: Expected more than 1 value per channel when training, got input size torch.Size([1, 20])
impor... | https://stackoverflow.com/questions/79887750/why-does-batchnorm1d-fail-with-batch-size-1-in-training-mode | python, deep-learning, pytorch, neural-network, batch-normalization | 1,770,847,520 |
se_79886152 | stackoverflow | MACHINE_LEARNING | Trained and loaded CycleGAN model is giving distorted output images | Trained and loaded CycleGAN model is giving distorted output images
I trained a CycleGAN model on Google Colab using this repository - https://github.com/junyanz/pytorch-CycleGAN-and-pix2pix
The model should enhance dark images. I tested the model on my test dataset within Google Colab using the test.py script from th... | https://stackoverflow.com/questions/79886152/trained-and-loaded-cyclegan-model-is-giving-distorted-output-images | python, deep-learning, pytorch, generative-adversarial-network | 1,770,669,271 |
se_79880593 | stackoverflow | MACHINE_LEARNING | Decoder only character level transformer returns base64 text only. How do I clean my dataset while streaming? | Decoder only character level transformer returns base64 text only. How do I clean my dataset while streaming?
I recently spent some time training a decoder only character level transformer. I had trained it with some README files that I found on the "stack" dataset.
Epoch: 45/50 | Train Loss: 0.8878 | Val Loss: 0.943... | https://stackoverflow.com/questions/79880593/decoder-only-character-level-transformer-returns-base64-text-only-how-do-i-clea | machine-learning, deep-learning, nlp, dataset, data-cleaning | 1,769,964,664 |
se_52695829 | stackoverflow | MACHINE_LEARNING | Object detection using TFLearn or TensorFlow object detection API | Object detection using TFLearn or TensorFlow object detection API
I want to build a object detection model and cannot figure out whether to go for TensorFlow object detection API or use TFLearn to build a model. What the pros and cons of both? | https://stackoverflow.com/questions/52695829/object-detection-using-tflearn-or-tensorflow-object-detection-api | tensorflow, machine-learning, deep-learning, object-detection, tflearn | 1,538,976,200 |
se_79878497 | stackoverflow | MACHINE_LEARNING | Best architecture for integrating Python deep learning prototype into C++ production pipeline? | Best architecture for integrating Python deep learning prototype into C++ production pipeline?
I’m working on a deep learning module intended to be deployed on an edge device.
Our situation:
The production application is written in C++.
The research team develops models and pipelines in Python (PyTorch, NumPy, etc.)... | https://stackoverflow.com/questions/79878497/best-architecture-for-integrating-python-deep-learning-prototype-into-c-produc | python, c++, deep-learning | 1,769,673,067 |
se_49883290 | stackoverflow | MACHINE_LEARNING | What is the input to LSTM exactly? | What is the input to LSTM exactly?
I have a more theoretical question i wasn't able to find an answer to.
Lets say i have as Input a list of numbers:
input = [0,5,0,4,3,3,2,1]
And lets say as the first hidden layer consists of 3 LSTM nodes.
How is now the list presented to the LSTM (with timesteps=8)?
My first ide... | https://stackoverflow.com/questions/49883290/what-is-the-input-to-lstm-exactly | machine-learning, neural-network, deep-learning, lstm, recurrent-neural-network | 1,523,982,942 |
se_75633662 | stackoverflow | MACHINE_LEARNING | How do you load a specific GPU from CUDA_AVAILABLE_DEVICES in PyTorch? | How do you load a specific GPU from CUDA_AVAILABLE_DEVICES in PyTorch?
I came up with this code but it's resulting in never ending bugs:
def get_device_via_env_variables(deterministic: bool = False, verbose: bool = True) -> torch.device:
device: torch.device = torch.device("cpu")
if torch.cuda.is_available():
... | https://stackoverflow.com/questions/75633662/how-do-you-load-a-specific-gpu-from-cuda-available-devices-in-pytorch | python, machine-learning, deep-learning, pytorch | 1,677,904,437 |
se_69688505 | stackoverflow | MACHINE_LEARNING | Extra class prediction result shown when testing on AlexeyAB Yolov4 Darknet package on Colab | Extra class prediction result shown when testing on AlexeyAB Yolov4 Darknet package on Colab
I have done the model training for Yolov4 objection detection from AlexeyAB Darknet package on Colab.
Two classes are defined named "scratch" and "blood".
Then run the following commands for testing on a single image:
!./darkn... | https://stackoverflow.com/questions/69688505/extra-class-prediction-result-shown-when-testing-on-alexeyab-yolov4-darknet-pack | deep-learning, google-colaboratory, object-detection, darknet, yolov4 | 1,634,994,865 |
se_79859628 | stackoverflow | MACHINE_LEARNING | Synthetic to real chess images project | Synthetic to real chess images project
I have a project in university to generate a real chess image from a rendered image.
I have 520 pairs of images but there is no exact match pixel to pixel; it's close to that, plus there an third pictured from above (overhead view), third with top right view, and third with top l... | https://stackoverflow.com/questions/79859628/synthetic-to-real-chess-images-project | deep-learning, generative-adversarial-network | 1,767,435,253 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.