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_52209851 | stackoverflow | MACHINE_LEARNING | Expected validation accuracy for Keras Mobile Net V1 for CIFAR-10 (training from scratch) | Expected validation accuracy for Keras Mobile Net V1 for CIFAR-10 (training from scratch)
Has anybody trained Mobile Net V1 from scratch using CIFAR-10? What was the maximum accuracy you got? I am getting stuck at 70% after 110 epochs. Here is how I am creating the model. However, my training accuracy is above 99%.
#... | https://stackoverflow.com/questions/52209851/expected-validation-accuracy-for-keras-mobile-net-v1-for-cifar-10-training-from | tensorflow, keras, deep-learning | 1,536,257,001 |
se_60257132 | stackoverflow | MACHINE_LEARNING | Usage of pre-trained deep leanring models for commercial usage | Usage of pre-trained deep leanring models for commercial usage
There are various pre-trained deep learing models availabel which are trained using data present in ImageNet(or any other data source) like AlexNet, VGGNet, Inception, ResNet, Xception, MobileNet, SqueezeNet etc. I want to develop a certain object detectio... | https://stackoverflow.com/questions/60257132/usage-of-pre-trained-deep-leanring-models-for-commercial-usage | deep-learning, artificial-intelligence | 1,581,921,750 |
se_45582182 | stackoverflow | MACHINE_LEARNING | Possibility of identification of non trained item in Machine Learning | Possibility of identification of non trained item in Machine Learning
A machine learning model has been trained to recognize the name of Animals and Plants. If suppose an automobile name is given, is it possible to say that the given name doesn't belong to the category animals or plants. If possible, kindly mention th... | https://stackoverflow.com/questions/45582182/possibility-of-identification-of-non-trained-item-in-machine-learning | machine-learning, deep-learning, neural-network, artificial-intelligence | 1,502,255,906 |
se_79419884 | stackoverflow | MACHINE_LEARNING | Underfitting Pre-Trained Glove + LSTM Model: Accurcacy Unchanged | Underfitting Pre-Trained Glove + LSTM Model: Accurcacy Unchanged
I am doing a sentiment classification using Pre-Trained Glove and LSTM model. I use google play review and scrap it by myself, resulting in 50k++ texts. I implement random over sampling on the minority classes.
However, when I train my LSTM model, the tr... | https://stackoverflow.com/questions/79419884/underfitting-pre-trained-glove-lstm-model-accurcacy-unchanged | keras, deep-learning, nlp, lstm, sentiment-analysis | 1,738,896,505 |
se_78376465 | stackoverflow | MACHINE_LEARNING | How to restore a orbax checkpoint with jax/flax? | How to restore a orbax checkpoint with jax/flax?
I saved a orbax checkpoint with the code below:
check_options = ocp.CheckpointManagerOptions(max_to_keep=5, create=True)
check_path = Path(os.getcwd(), out_dir, 'checkpoint')
checkpoint_manager = ocp.CheckpointManager(check_path, options=check_options, item_names=('stat... | https://stackoverflow.com/questions/78376465/how-to-restore-a-orbax-checkpoint-with-jax-flax | python, deep-learning, jax, flax | 1,713,941,724 |
se_57986783 | stackoverflow | MACHINE_LEARNING | embedding layer outputs nan | embedding layer outputs nan
I am trying to learn a seq2seq model.
An embedding layer is located in the encoder and it sometimes outputs nan value after some iterations.
I cannot identify the reason.
How can I solve this??
The problem is the first emb_layer in the forward function in the code below.
class Transformer... | https://stackoverflow.com/questions/57986783/embedding-layer-outputs-nan | deep-learning, pytorch, transformer-model, seq2seq | 1,568,789,992 |
se_72611335 | stackoverflow | MACHINE_LEARNING | What are the differences between fine tuning and few shot learning? | What are the differences between fine tuning and few shot learning?
I am trying to understand the concept of fine-tuning and few-shot learning.
I understand the need for fine-tuning. It is essentially tuning a pre-trained model to a specific downstream task. However, recently I have seen a plethora of blog posts stati... | https://stackoverflow.com/questions/72611335/what-are-the-differences-between-fine-tuning-and-few-shot-learning | machine-learning, deep-learning, artificial-intelligence, fine-tuning, few-shot-learning | 1,655,178,863 |
se_79398319 | stackoverflow | MACHINE_LEARNING | Is there another method to install tensorflow 2.18.0 with python 3.13.1? | Is there another method to install tensorflow 2.18.0 with python 3.13.1?
I want to install tensorflow in my machine but I have a problem during the installation. I tried all method but no result
C:\Users\Ultra Tech>pip --default-timeout=1000 install tensorflow==2.5.0
ERROR: Could not find a version that satisfies the ... | https://stackoverflow.com/questions/79398319/is-there-another-method-to-install-tensorflow-2-18-0-with-python-3-13-1 | python, tensorflow, deep-learning, pip | 1,738,188,659 |
se_79411501 | stackoverflow | MACHINE_LEARNING | How to pass Input to a tensorflow backbone model without getting AttributeError: 'tuple' object has no attribute 'as_list' | How to pass Input to a tensorflow backbone model without getting AttributeError: 'tuple' object has no attribute 'as_list'
I am trying to use ResNet3D from tensorflow-models library but I am getting this weird error when trying to run the block
!pip install tf-models-official==2.17.0
Tensorflow versio... | https://stackoverflow.com/questions/79411501/how-to-pass-input-to-a-tensorflow-backbone-model-without-getting-attributeerror | python, tensorflow, machine-learning, deep-learning, tf.keras | 1,738,668,161 |
se_62829611 | stackoverflow | MACHINE_LEARNING | How to activate GPU in my kaggle notebook? It uses CPU 100% and GPU 0%. I need GPU accelerator for my deep learning project | How to activate GPU in my kaggle notebook? It uses CPU 100% and GPU 0%. I need GPU accelerator for my deep learning project
In kaggle I choose GPU accelerator when I am creating a note book. It then also shows CPU usage 100% and GPU usage 0%. Due to this, my code takes 8 hours execution time.
How can I resolve this pr... | https://stackoverflow.com/questions/62829611/how-to-activate-gpu-in-my-kaggle-notebook-it-uses-cpu-100-and-gpu-0-i-need-g | deep-learning, kaggle | 1,594,367,509 |
se_61046588 | stackoverflow | MACHINE_LEARNING | Keras, memoryerror - data = data.astype("float") / 255.0. Unable to allocate 309. MiB for an array with shape (13165, 32, 32, 3) | Keras, memoryerror - data = data.astype("float") / 255.0. Unable to allocate 309. MiB for an array with shape (13165, 32, 32, 3)
I am currently working on the Smiles dataset and then applying Deep learning to detect the smile as positive or negative. The machine I am using is Raspberry Pi 3, and the version ... | https://stackoverflow.com/questions/61046588/keras-memoryerror-data-data-astypefloat-255-0-unable-to-allocate-309 | python, tensorflow, machine-learning, keras, deep-learning | 1,586,107,526 |
se_78311147 | stackoverflow | MACHINE_LEARNING | RuntimeError: Failed to import transformers.integrations.bitsandbytes | RuntimeError: Failed to import transformers.integrations.bitsandbytes
I am trying to load an llm model in 4 bits precision. However, I got RuntimeError: Failed to import transformers.integrations.bitsandbytes because of the following error (look up to see its traceback):
[WinError 193] %1 is not a valid Win32 applicat... | https://stackoverflow.com/questions/78311147/runtimeerror-failed-to-import-transformers-integrations-bitsandbytes | deep-learning, nlp, huggingface-transformers, large-language-model | 1,712,846,265 |
se_54237327 | stackoverflow | MACHINE_LEARNING | Why is a target network required? | Why is a target network required?
I have a concern in understanding why a target network is necessary in DQN? I’m reading paper on “human-level control through deep reinforcement learning”
I understand Q-learning. Q-learning is value-based reinforcement learning algorithm that learns “optimal” probability distributio... | https://stackoverflow.com/questions/54237327/why-is-a-target-network-required | deep-learning, artificial-intelligence | 1,547,732,811 |
se_79408930 | stackoverflow | MACHINE_LEARNING | Lightning Tensorboard Hparams tab not showing custom metric | Lightning Tensorboard Hparams tab not showing custom metric
I'm training a neural network built with pyTorch Lightning and I'm trying to have the HParams tab working in tensorboard.
Following the official outdated guide I initialize the logger with default_hp_metric=False:
logger = TensorBoardLogger("lightning_logs", ... | https://stackoverflow.com/questions/79408930/lightning-tensorboard-hparams-tab-not-showing-custom-metric | deep-learning, pytorch, neural-network, tensorboard, pytorch-lightning | 1,738,588,332 |
se_79406743 | stackoverflow | MACHINE_LEARNING | QuickUMLS Always Returns "UNK" for Any Input Text | QuickUMLS Always Returns "UNK" for Any Input Text
I am using QuickUMLS to extract UMLS Concept Unique Identifiers (CUIs) from text, but no matter what word I input, it always returns "UNK". Here is my code:
from quickumls import QuickUMLS
quickumls_fp = "med7_en/lib/python3.10/site-packages/quickumls"
match... | https://stackoverflow.com/questions/79406743/quickumls-always-returns-unk-for-any-input-text | python, machine-learning, deep-learning, nlp | 1,738,505,575 |
se_44119207 | stackoverflow | MACHINE_LEARNING | Is there any way to get variable importance with Keras? | Is there any way to get variable importance with Keras?
I am looking for a proper or best way to get variable importance in a Neural Network created with Keras. The way I currently do it is I just take the weights (not the biases) of the variables in the first layer with the assumption that more important variables wi... | https://stackoverflow.com/questions/44119207/is-there-any-way-to-get-variable-importance-with-keras | tensorflow, deep-learning, keras, keras-layer, keras-2 | 1,495,475,666 |
se_79407494 | stackoverflow | MACHINE_LEARNING | Gradient descent 3D visualization Python | Gradient descent 3D visualization Python
I've recently implemented a neural network from scratch and am now focusing on visualizing the optimization process. Specifically, I'm interested in creating a 3D visualization of the loss landscape that clearly illustrates the gradient descent trajectory as it converges to a l... | https://stackoverflow.com/questions/79407494/gradient-descent-3d-visualization-python | machine-learning, deep-learning, neural-network, gradient-descent, mnist | 1,738,536,555 |
se_78215203 | stackoverflow | MACHINE_LEARNING | Image channel error while training CNN model | Image channel error while training CNN model
I get the following error when trying to train a CNN model:
InvalidArgumentError: Graph execution error:
Detected at node decode_image/DecodeImage defined at (most recent call last):
<stack traces unavailable>
Number of channels inherent in the image must be 1, 3 or 4, was... | https://stackoverflow.com/questions/78215203/image-channel-error-while-training-cnn-model | python, tensorflow, keras, deep-learning, conv-neural-network | 1,711,296,448 |
se_79380954 | stackoverflow | MACHINE_LEARNING | CUDA Out of Memory During Backpropagation on Multi-GPU Setup (PyTorch) | CUDA Out of Memory During Backpropagation on Multi-GPU Setup (PyTorch)
I am implementing a training loop using two NVIDIA RTX 3090 GPUs (each with 24 GB memory). My setup involves loading a large sparse matrix (approximately 6 GB) on one GPU (device_matrix) and the model on another GPU (device_net). However, when I ru... | https://stackoverflow.com/questions/79380954/cuda-out-of-memory-during-backpropagation-on-multi-gpu-setup-pytorch | deep-learning, pytorch, out-of-memory, multi-gpu | 1,737,633,703 |
se_79404980 | stackoverflow | MACHINE_LEARNING | From keras 2 to keras 3 conversion of notebook | From keras 2 to keras 3 conversion of notebook
as the title suggests, I'm trying to convert a notebook in keras 3, but idk why it's not working properly.
This is the original notebook (tell me if it's better to put here the code), I'm trying to do the same task but with car fronts; at the end you can find my code.
I m... | https://stackoverflow.com/questions/79404980/from-keras-2-to-keras-3-conversion-of-notebook | tensorflow, keras, deep-learning, kaggle, siamese-network | 1,738,413,171 |
se_79401840 | stackoverflow | MACHINE_LEARNING | Error "name 'clip' is not defined" when using CLIP with FastSam | Error "name 'clip' is not defined" when using CLIP with FastSam
I am following some tutorials and have the following code in Google Colab:
!pip install matplotlib==3.7.3
!git clone https://github.com/CASIA-IVA-Lab/FastSAM.git
!pip -q install -r FastSAM/requirements.txt
# install CLIP ----------
#!pi... | https://stackoverflow.com/questions/79401840/error-name-clip-is-not-defined-when-using-clip-with-fastsam | python, deep-learning, nameerror | 1,738,301,361 |
se_79401912 | stackoverflow | MACHINE_LEARNING | How to specify gradient computation path in a neural network in pytorch | How to specify gradient computation path in a neural network in pytorch
I want to implement a neural network on pytorch where gradients are not computed over all the weights. Let's say for example I have an MLP with three layers and I want half of the nodes in the last layer to have their backpropagation computed all ... | https://stackoverflow.com/questions/79401912/how-to-specify-gradient-computation-path-in-a-neural-network-in-pytorch | python, deep-learning, pytorch, gradient-descent | 1,738,304,340 |
se_72899079 | stackoverflow | MACHINE_LEARNING | What do BatchNorm2d's running_mean / running_var mean in PyTorch? | What do BatchNorm2d's running_mean / running_var mean in PyTorch?
I'd like to know what exactly the running_mean and running_var that I can call from nn.BatchNorm2d.
Example code is here where bn means nn.BatchNorm2d.
vector = torch.cat([
torch.mean(self.conv3.bn.running_mean).view(1), torch.std(self.conv3.bn.... | https://stackoverflow.com/questions/72899079/what-do-batchnorm2ds-running-mean-running-var-mean-in-pytorch | deep-learning, pytorch, mean, variance, batch-normalization | 1,657,201,989 |
se_79399217 | stackoverflow | MACHINE_LEARNING | Can batch normalization be considered a linear transformation? | Can batch normalization be considered a linear transformation?
A deep neural network f consists of one fully connected network and one batch normalization layer. (e.g., f = FCN + BN)
Given a dataset with inputs x and y, can the following property hold?
f(x+y) = f(x) + f(y)
I think the fully connected network natural... | https://stackoverflow.com/questions/79399217/can-batch-normalization-be-considered-a-linear-transformation | tensorflow, deep-learning, pytorch, normalization | 1,738,225,616 |
se_79400259 | stackoverflow | MACHINE_LEARNING | tf.function decorator on custom model call Error | tf.function decorator on custom model call Error
I am using tensorflow to fit some version of a financial model. I have subclassed the keras.Model class to write some custom code. Everything seems to work well when I run the model in eager execution. To speed things up I wanted to use the functionality provided by the... | https://stackoverflow.com/questions/79400259/tf-function-decorator-on-custom-model-call-error | python, tensorflow, keras, deep-learning | 1,738,248,191 |
se_79396894 | stackoverflow | MACHINE_LEARNING | Doing PyWavelets calculation on GPU | Doing PyWavelets calculation on GPU
Currently working on a classifier using PyWavelets, here is my calculation block:
class WaveletLayer(nn.Module):
def __init__(self):
super(WaveletLayer, self).__init__()
def forward(self, x):
def wavelet_transform(img):
coeffs = pywt.dwt2(img.cpu... | https://stackoverflow.com/questions/79396894/doing-pywavelets-calculation-on-gpu | python, machine-learning, deep-learning, pytorch, haar-wavelet | 1,738,157,189 |
se_59280745 | stackoverflow | MACHINE_LEARNING | Inference with TensorRT .engine file on python | Inference with TensorRT .engine file on python
I used Nvidia's Transfer Learning Toolkit(TLT) to train and then used the tlt-converter to convert the .etlt model into an .engine file.
I want to use this .engine file for inference in python. But since I trained using TLT I dont have any frozen graphs or pb files whic... | https://stackoverflow.com/questions/59280745/inference-with-tensorrt-engine-file-on-python | python, tensorflow, deep-learning, computer-vision, tensorrt | 1,576,049,355 |
se_73811288 | stackoverflow | MACHINE_LEARNING | Training loss increases instead of decrease with epochs | Training loss increases instead of decrease with epochs
I am developing from scratch my first feed-forward fully-connected ANN based on batch learning mode on a toy training set. I am using back-propagation for calculating the gradient of the loss function with respect to weights and biases and using the gradient desc... | https://stackoverflow.com/questions/73811288/training-loss-increases-instead-of-decrease-with-epochs | python, machine-learning, deep-learning, neural-network | 1,663,834,236 |
se_79374019 | stackoverflow | MACHINE_LEARNING | Getting Attribute error in Keras Classifier | Getting Attribute error in Keras Classifier
getting attribute error while passing values to keras classifier
from tensorflow.keras.layers import Dense
from tensorflow.keras.models import Sequential
from sklearn.model_selection import cross_val_score
from scikeras.wrappers import KerasClassifier
def create_model():
... | https://stackoverflow.com/questions/79374019/getting-attribute-error-in-keras-classifier | python, tensorflow, machine-learning, keras, deep-learning | 1,737,454,889 |
se_47952812 | stackoverflow | MACHINE_LEARNING | Why does the cost in my implementation of a deep neural network increase after a few iterations? | Why does the cost in my implementation of a deep neural network increase after a few iterations?
I tried to implement a binary classifier using deep neural networks on my own.
However, the cost of the function is expected to decrease after each iteration.
In my program, it decreases slightly in the beginning, but rapi... | https://stackoverflow.com/questions/47952812/why-does-the-cost-in-my-implementation-of-a-deep-neural-network-increase-after-a | numpy, machine-learning, neural-network, deep-learning, backpropagation | 1,514,034,893 |
se_79394023 | stackoverflow | MACHINE_LEARNING | Keras Training Issue: "Your input ran out of data" Warning and 0 Loss/Accuracy | Keras Training Issue: "Your input ran out of data" Warning and 0 Loss/Accuracy
I am training a CNN model using ImageDataGenerator with a dataset of 1500 training images and 32 batch size. I calculated the steps per epoch as
⌈1500/32⌉=47, the last batch is incomplete and I am using flow_from_directory() to lo... | https://stackoverflow.com/questions/79394023/keras-training-issue-your-input-ran-out-of-data-warning-and-0-loss-accuracy | python, tensorflow, machine-learning, keras, deep-learning | 1,738,071,552 |
se_65445174 | stackoverflow | MACHINE_LEARNING | What is the difference between an Embedding Layer with a bias immediately afterwards and a Linear Layer in PyTorch | What is the difference between an Embedding Layer with a bias immediately afterwards and a Linear Layer in PyTorch
I am reading the "Deep Learning for Coders with fastai & PyTorch" book. I'm still a bit confused as to what the Embedding module does. It seems like a short and simple network, except I can't seem to wrap... | https://stackoverflow.com/questions/65445174/what-is-the-difference-between-an-embedding-layer-with-a-bias-immediately-afterw | python, oop, deep-learning, pytorch, fast-ai | 1,608,868,923 |
se_79393930 | stackoverflow | MACHINE_LEARNING | Why is my BERT model producing NaN loss during training for multi-label classification on imbalanced data? | Why is my BERT model producing NaN loss during training for multi-label classification on imbalanced data?
I’m running into a frustrating issue while training a BERT-based multi-label text classification model on an imbalanced dataset. After a few epochs, the training loss suddenly becomes NaN, and I can’t seem to fig... | https://stackoverflow.com/questions/79393930/why-is-my-bert-model-producing-nan-loss-during-training-for-multi-label-classifi | deep-learning, nlp, bert-language-model, multilabel-classification, imbalanced-data | 1,738,069,395 |
se_52138920 | stackoverflow | MACHINE_LEARNING | Why do we normalize the image to mean=0.5, std=0.5? | Why do we normalize the image to mean=0.5, std=0.5?
I was lookking for GAN code in Github. The code I found uses pytorch. In this code, we first normalized the image to mean = 0.5, std = 0.5. Normally, normalize to min = 0 and max = 1. Or normal distribution with mean = 0 and std = 1. Why is this normalized to mean = ... | https://stackoverflow.com/questions/52138920/why-do-we-normalize-the-image-to-mean-0-5-std-0-5 | python, tensorflow, deep-learning, computer-vision, pytorch | 1,535,905,616 |
se_70554413 | stackoverflow | MACHINE_LEARNING | How to improve the performance of CNN Model for a specific Dataset? Getting Low Accuracy on both training and Testing Dataset | How to improve the performance of CNN Model for a specific Dataset? Getting Low Accuracy on both training and Testing Dataset
We were given an assignment in which we were supposed to implement our own neural network, and two other already developed Neural Networks. I have done that and however, this isn't the requirem... | https://stackoverflow.com/questions/70554413/how-to-improve-the-performance-of-cnn-model-for-a-specific-dataset-getting-low | tensorflow, keras, deep-learning, conv-neural-network | 1,641,110,003 |
se_79388667 | stackoverflow | MACHINE_LEARNING | Pretrained VGG16 model performs so poor on ImageNet-V2 testset | Pretrained VGG16 model performs so poor on ImageNet-V2 testset
I am trying to build my model using the pretrained VGG16 model on ImageNet-V1 dataset in Pytorch. I loaded the model and tested it with ImageNet-V2 matched frequency testset. The problem is the accuracy is so low, just 1.14%. Here is my code:
import torch
... | https://stackoverflow.com/questions/79388667/pretrained-vgg16-model-performs-so-poor-on-imagenet-v2-testset | deep-learning, pytorch, pre-trained-model, vgg-net | 1,737,901,138 |
se_70212120 | stackoverflow | MACHINE_LEARNING | TypeError: Only integers, slices, ellipsis, tf.newaxis and scalar tf.int32/tf.int64 tensors are valid indices | TypeError: Only integers, slices, ellipsis, tf.newaxis and scalar tf.int32/tf.int64 tensors are valid indices
As an exercise I am trying to train a classification model using Tensorflow v1 without using keras nor sklearn nor any other library that would greatly ease my life.. lol.
I keep getting this error though and ... | https://stackoverflow.com/questions/70212120/typeerror-only-integers-slices-ellipsis-tf-newaxis-and-scalar-tf-int32-tf-in | python, numpy, tensorflow, deep-learning | 1,638,523,994 |
se_78446157 | stackoverflow | MACHINE_LEARNING | SHAP DeepExplainer Error: 'tuple' object has no attribute 'as_list' 'device' | SHAP DeepExplainer Error: 'tuple' object has no attribute 'as_list' 'device'
I used shap to interpret my cnn model like this:
explainer = shap.DeepExplainer(model=model, data = X_train[0:10])
shap_values = explainer.shap_values(X_test[0:10])
When shap tries to get the output shape in its inter... | https://stackoverflow.com/questions/78446157/shap-deepexplainer-error-tuple-object-has-no-attribute-as-list-device | python, tensorflow, deep-learning, conv-neural-network, shap | 1,715,144,017 |
se_69184856 | stackoverflow | MACHINE_LEARNING | Hypergraph Convolution using Pytorch Geometric: RuntimeError: index 2268264 is out of bounds for dimension 0 with size 2268264 | Hypergraph Convolution using Pytorch Geometric: RuntimeError: index 2268264 is out of bounds for dimension 0 with size 2268264
I am trying to use the Pytorch-geometric hypergraph convolution network's layer for training on hypergraph datasets. I am using the Amazon review dataset provided by https://www.cs.cornell.edu... | https://stackoverflow.com/questions/69184856/hypergraph-convolution-using-pytorch-geometric-runtimeerror-index-2268264-is-o | python, machine-learning, graph, deep-learning, pytorch | 1,631,656,083 |
se_79104305 | stackoverflow | MACHINE_LEARNING | Context Length Limitation When Fine-Tuning Llama 3.1 in Colab | Context Length Limitation When Fine-Tuning Llama 3.1 in Colab
I am fine-tuning the Llama 3.1 model in Google Colab Pro using an A100 GPU with a custom dataset (using LoRA techniques) via the Unsloth library. Below is the LoRA code I am using:
max_seq_length = 2048
model = FastLanguageModel.get_peft_model(
model,
... | https://stackoverflow.com/questions/79104305/context-length-limitation-when-fine-tuning-llama-3-1-in-colab | machine-learning, deep-learning, artificial-intelligence, llama, fine-tuning | 1,729,317,566 |
se_79386418 | stackoverflow | MACHINE_LEARNING | ModuleNotFoundError: No module named 'torch.utils' | ModuleNotFoundError: No module named 'torch.utils'
I am pretty new to coding and recently I've been trying to train a recognition model for real time recognition through the computer's webcam. This is the video I am following: https://www.youtube.com/watch?v=fZiY7zUk3TU. However, as soon as I go to train the m... | https://stackoverflow.com/questions/79386418/modulenotfounderror-no-module-named-torch-utils | python, windows, deep-learning, pytorch, modulenotfounderror | 1,737,794,317 |
se_53894496 | stackoverflow | MACHINE_LEARNING | Traceback (most recent call last) in Colab when looping through dataloader in pytorch | Traceback (most recent call last) in Colab when looping through dataloader in pytorch
I'm working on a project to classify flower images using a pre-trained model vgg19 using pytorch.
I'm relying on the model features only and using a custom classifier.
However on starting a for-loop to feed images to the model clas... | https://stackoverflow.com/questions/53894496/traceback-most-recent-call-last-in-colab-when-looping-through-dataloader-in-py | python, python-3.x, deep-learning, pytorch, vgg-net | 1,545,470,919 |
se_54510289 | stackoverflow | MACHINE_LEARNING | Transformer - Attention is all you need - encoder decoder cross attention | Transformer - Attention is all you need - encoder decoder cross attention
It is my understanding that each encoder block takes the output from the previous encoder, and that the output is the attended representation (Z) of the sequence (aka sentence). My question is, how does the last encoder block produce K, V from ... | https://stackoverflow.com/questions/54510289/transformer-attention-is-all-you-need-encoder-decoder-cross-attention | deep-learning, nlp, attention-model | 1,549,255,842 |
se_52559086 | stackoverflow | MACHINE_LEARNING | What does the accuracy mean in the Keras progress bar? | What does the accuracy mean in the Keras progress bar?
In Keras you'll have something like this:
Epoch 1/1
60000/60000 [==============================] - 297s 5ms/step - loss: 0.7048 - acc: 0.7669
60000/60000 [==============================] - 179s 3ms/step
Training Set:
acc: 94.60%
10000/10000 [==================... | https://stackoverflow.com/questions/52559086/what-does-the-accuracy-mean-in-the-keras-progress-bar | tensorflow, machine-learning, keras, deep-learning | 1,538,150,865 |
se_77946889 | stackoverflow | MACHINE_LEARNING | What does instruct means for a deep learning model? | What does instruct means for a deep learning model?
On HuggingFace there are deeplearning models that you can download, some with the "instruct" part in their name, for example LLaMa-7B-Instruct.
I don't understand what this means VS a regular model. Has the model already been trained in a specific way ? Or is it read... | https://stackoverflow.com/questions/77946889/what-does-instruct-means-for-a-deep-learning-model | deep-learning, model | 1,707,214,535 |
se_60467650 | stackoverflow | MACHINE_LEARNING | Why conversion to im2col is fast? | Why conversion to im2col is fast?
Original input activations undergo kernel transformation through im2col to improve memory access patterns. But, when we are converting the original matrix into im2col matrix, then also we are accessing the same original memory patters. So, why im2col operation itself isn't slow? | https://stackoverflow.com/questions/60467650/why-conversion-to-im2col-is-fast | deep-learning, conv-neural-network, caffe | 1,582,996,294 |
se_79378022 | stackoverflow | MACHINE_LEARNING | The “Forward/Backward Passage Size” is too large for the pytorch model (Yolov3) | The “Forward/Backward Passage Size” is too large for the pytorch model (Yolov3)
I'm writing Yolov3 in Pytorch.
Architecture: https://i.sstatic.net/mncjfiDs.png
Code:
class Convolutional(nn.Module): # DBL
def __init__(self, in_channels: int, out_channels: int, kernel_size: int, stride: int = 1, padding=1):
super... | https://stackoverflow.com/questions/79378022/the-forward-backward-passage-size-is-too-large-for-the-pytorch-model-yolov3 | python, machine-learning, deep-learning, pytorch, yolo | 1,737,554,859 |
se_79378112 | stackoverflow | MACHINE_LEARNING | Output is not as expected when learning phase transitions in the Ising model | Output is not as expected when learning phase transitions in the Ising model
I am working on a numerical project using Python3 to estimate the phase transition of a 2-D Ising model using deep learning.
I have completed up to the point of calculating the spin coordination using the Metropolis method (Monte Carlo method... | https://stackoverflow.com/questions/79378112/output-is-not-as-expected-when-learning-phase-transitions-in-the-ising-model | python, deep-learning, neural-network, physics, montecarlo | 1,737,556,075 |
se_79284426 | stackoverflow | MACHINE_LEARNING | How to manage memory consumption in deep learning models? | How to manage memory consumption in deep learning models?
When I run this code, the runtime session automatically closes. There is no space in RAM left. Hence the session closes automatically. I am using pytorch in Google Colab notebook. I tried switching from CPU to GPU but still the session closes automatically.
!pi... | https://stackoverflow.com/questions/79284426/how-to-manage-memory-consumption-in-deep-learning-models | deep-learning, pytorch, data-science, large-language-model, transfer-learning | 1,734,346,810 |
se_33616593 | stackoverflow | MACHINE_LEARNING | How do I use distributed DNN training in TensorFlow? | How do I use distributed DNN training in TensorFlow?
Google released TensorFlow today.
I have been poking around in the code, and I don't see anything in the code or API about training across a cluster of GPU servers.
Does it have distributed training functionality yet? | https://stackoverflow.com/questions/33616593/how-do-i-use-distributed-dnn-training-in-tensorflow | python, parallel-processing, deep-learning, tensorflow | 1,447,097,002 |
se_79367089 | stackoverflow | MACHINE_LEARNING | Is it possible to Fine-Tune TinyBERT on Mac (M1 chip)? | Is it possible to Fine-Tune TinyBERT on Mac (M1 chip)?
Does fine-tuning require huge resources, or is it possible to do this task on the local machine as well? I have an Apple M1 (8GB RAM). I know bigger models GPU access but what about TinyBERT? My training dataset has 100,000 samples for your reference. | https://stackoverflow.com/questions/79367089/is-it-possible-to-fine-tune-tinybert-on-mac-m1-chip | deep-learning, nlp, huggingface-transformers, text-classification, fine-tuning | 1,737,201,482 |
se_79365374 | stackoverflow | MACHINE_LEARNING | How to utilize multiple CPUs for training of YOLO? | How to utilize multiple CPUs for training of YOLO?
I have access to a large CPU cluster that does not have GPUs. Is it possible to speed up YOLO training by parallelizing between multiple CPU nodes?
The docs say that device parameter specifies the computational device(s) for training: a single GPU (device=0), multiple... | https://stackoverflow.com/questions/79365374/how-to-utilize-multiple-cpus-for-training-of-yolo | machine-learning, deep-learning, pytorch, cluster-computing, yolo | 1,737,129,946 |
se_79363593 | stackoverflow | MACHINE_LEARNING | ERROR: No matching distribution found for tensorflow-io | ERROR: No matching distribution found for tensorflow-io
I am learning RNN from video tutorials. While trying out an example notebook for RNN, I attempted to install tensorflow-io using the command pip install tensorflow-io. However, I encountered the following error:
I changed the environment and installed TensorFlow ... | https://stackoverflow.com/questions/79363593/error-no-matching-distribution-found-for-tensorflow-io | python, deep-learning, pip, recurrent-neural-network, tensorflow-io | 1,737,087,436 |
se_79364440 | stackoverflow | MACHINE_LEARNING | How to achieve unequal stride of dw-conv with equal stride dw-conv? | How to achieve unequal stride of dw-conv with equal stride dw-conv?
Seems like unequal height and width of stride in tf.nn.depthwise_conv is not supported. Can I do that in form of equal stride with any other layer operations? | https://stackoverflow.com/questions/79364440/how-to-achieve-unequal-stride-of-dw-conv-with-equal-stride-dw-conv | python, tensorflow, deep-learning | 1,737,109,690 |
se_79360980 | stackoverflow | MACHINE_LEARNING | What caused the large difference in execution time between these two forward passes? | What caused the large difference in execution time between these two forward passes?
for i in range(263):
states = torch.rand(128, 4, 20, 20, device = device)
# time.sleep(1)
start_time = time.time()
policy, value, action_value = model(states)
end_time = time.time()
tota... | https://stackoverflow.com/questions/79360980/what-caused-the-large-difference-in-execution-time-between-these-two-forward-pas | python, c++, deep-learning, pytorch, neural-network | 1,737,019,515 |
se_67248686 | stackoverflow | MACHINE_LEARNING | Neural network learning to sum two numbers | Neural network learning to sum two numbers
I am learning Pytorch, and I am trying to implement a really simple network which takes an input which is of length 2, i.e. a point in the plane, and aims to learn the sum of its components.
In principle the network should just learn a linear layer with weight matrix W = [1.,... | https://stackoverflow.com/questions/67248686/neural-network-learning-to-sum-two-numbers | deep-learning, neural-network, pytorch, linear-regression | 1,619,310,658 |
se_79360229 | stackoverflow | MACHINE_LEARNING | override pytorch Dataset efficiently | override pytorch Dataset efficiently
I want to inherit the torch.utils.data.Dataset class to load my custom image dataset, let's say for a classification task. here is the example of official pytorch website in this link:
import os
import pandas as pd
from torchvision.io import read_image
class CustomImageDataset(Dat... | https://stackoverflow.com/questions/79360229/override-pytorch-dataset-efficiently | python, machine-learning, deep-learning, pytorch, dataset | 1,736,995,101 |
se_79359767 | stackoverflow | MACHINE_LEARNING | Implementation of F1-score, IOU and Dice Score | Implementation of F1-score, IOU and Dice Score
This paper proposes a medical image segmentation hybrid CNN - Transformer model for segmenting organs and lesions in medical images simultaneously. Their model has two output branches, one to output organ mask, and the other to output lesion mask. Now they describe the te... | https://stackoverflow.com/questions/79359767/implementation-of-f1-score-iou-and-dice-score | python, machine-learning, deep-learning, pytorch, image-segmentation | 1,736,976,829 |
se_78361278 | stackoverflow | MACHINE_LEARNING | How to install Nsight DL design | How to install Nsight DL design
I seek guidance regarding the utilization of Nsight DL Designer on Linux. Despite successfully downloading the application, I encountered difficulties in executing it. Upon downloading the provided .run file, I performed the requisite steps of granting executable permissions using 'chmo... | https://stackoverflow.com/questions/78361278/how-to-install-nsight-dl-design | linux, deep-learning, nvidia | 1,713,696,764 |
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_79360184 | stackoverflow | MACHINE_LEARNING | How to design a stable deep learning network that satisfies linearity (e.g., f(x+y) = f(x) + f(y)) | How to design a stable deep learning network that satisfies linearity (e.g., f(x+y) = f(x) + f(y))
I am trying to design a deep learning network where a neural network f satisfies the linearity condition:
f(x+y) = f(x) + f(y) for datasets x and y.
When I design f using only fully connected layers (FCNs), I can achie... | https://stackoverflow.com/questions/79360184/how-to-design-a-stable-deep-learning-network-that-satisfies-linearity-e-g-fx | python, tensorflow, deep-learning, normalization | 1,736,993,001 |
se_72309555 | stackoverflow | MACHINE_LEARNING | What's the purpose of background dataset for shap library deep explainer? | What's the purpose of background dataset for shap library deep explainer?
I was going through a tutorial for Deep Learning Model Interpretation Using SHAP when I came across this code block:
# select backgroud for shap
background = x_train[np.random.choice(x_train.shape[0], 1000, replace=False)]
# DeepExplainer t... | https://stackoverflow.com/questions/72309555/whats-the-purpose-of-background-dataset-for-shap-library-deep-explainer | python, deep-learning, shap | 1,652,985,354 |
se_59003377 | stackoverflow | MACHINE_LEARNING | Why my LSTM autoencoder model couldn't detect outliers? | Why my LSTM autoencoder model couldn't detect outliers?
I am trying to build a LSTM Autoendoer for anomaly detection.
But the model seems not work for my data.
Here is the normal data that I use it for training.
And here is abnormal data that I use it for validation.
If model works, its loss should be high at #2... | https://stackoverflow.com/questions/59003377/why-my-lstm-autoencoder-model-couldnt-detect-outliers | deep-learning, lstm, autoencoder, anomaly-detection | 1,574,468,026 |
se_79165280 | stackoverflow | MACHINE_LEARNING | "TypeError: 'Categorical' with dtype category does not support reduction 'mean"' when using Fastai to predict a column value | "TypeError: 'Categorical' with dtype category does not support reduction 'mean"' when using Fastai to predict a column value
Code:
The following is a code that reads a CSV file and processes it using Fastai.
from pathlib import Path
import pandas as pd
from fastai.tabular.all import *
path ... | https://stackoverflow.com/questions/79165280/typeerror-categorical-with-dtype-category-does-not-support-reduction-mean | pandas, numpy, deep-learning, fast-ai | 1,730,961,805 |
se_73903642 | stackoverflow | MACHINE_LEARNING | How to understand Object Queries in DETR? | How to understand Object Queries in DETR?
Its hard to understand the role of Object Queries in DETR, and how it be trained? | https://stackoverflow.com/questions/73903642/how-to-understand-object-queries-in-detr | deep-learning, transformer-model | 1,664,507,447 |
se_37657260 | stackoverflow | MACHINE_LEARNING | how to implement custom metric in keras? | how to implement custom metric in keras?
I get this error :
sum() got an unexpected keyword argument 'out'
when I run this code:
import pandas as pd, numpy as np
import keras
from keras.layers.core import Dense, Activation
from keras.models import Sequential
def AUC(y_true,y_pred):
not_y_pred=np.logical_n... | https://stackoverflow.com/questions/37657260/how-to-implement-custom-metric-in-keras | python, neural-network, deep-learning, keras, metrics | 1,465,215,454 |
se_79351911 | stackoverflow | MACHINE_LEARNING | Cannot reproduce the result of best trial by optima through best params | Cannot reproduce the result of best trial by optima through best params
This problem has been bothering me for a long time. I am using optuna for automatic parameter tuning of deep learning models, and the objective function returns the average AUC of five folds.
Unable to reproduce the results corresponding to the be... | https://stackoverflow.com/questions/79351911/cannot-reproduce-the-result-of-best-trial-by-optima-through-best-params | deep-learning, hyperparameters, optuna | 1,736,764,958 |
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_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_79256112 | stackoverflow | MACHINE_LEARNING | How to log only the current script file to W&B code panel immediately? | How to log only the current script file to W&B code panel immediately?
How can I ensure that only the current script file (e.g., train.py) is logged to the W&B Code panel when running a script, without logging the entire directory?
Currently, I'm using:
wandb.run.log_code(f"./{os.path.basename(__file__)}")
I want... | https://stackoverflow.com/questions/79256112/how-to-log-only-the-current-script-file-to-wb-code-panel-immediately | deep-learning, nlp, wandb | 1,733,429,481 |
se_79221146 | stackoverflow | MACHINE_LEARNING | Does peft train newly initialized weights? | Does peft train newly initialized weights?
When using peft to fine-tune a pretrained model e.g., DistilBert, you need to specify the target_modules. In case of DistilBert, typically, the attention weights are targeted. Example:
lora_config = LoraConfig(
r=8, # Rank Number
lora_alpha=32, # Alpha (Scaling Factor... | https://stackoverflow.com/questions/79221146/does-peft-train-newly-initialized-weights | deep-learning, huggingface-transformers, peft | 1,732,484,615 |
se_79338718 | stackoverflow | MACHINE_LEARNING | Do I have to write custom AutoModel transformers class in case "TypeError: NVEmbedModel.forward() got an unexpected keyword argument 'inputs_embeds'" | Do I have to write custom AutoModel transformers class in case "TypeError: NVEmbedModel.forward() got an unexpected keyword argument 'inputs_embeds'"
I am trying to finetune the nvidia/NV-Embed-v2 model from hugging face using lora from peft library. I am facing the "TypeError: NVEmbedModel.forward()... | https://stackoverflow.com/questions/79338718/do-i-have-to-write-custom-automodel-transformers-class-in-case-typeerror-nvemb | deep-learning, huggingface-transformers, large-language-model, peft | 1,736,331,133 |
se_40747679 | stackoverflow | MACHINE_LEARNING | keras: what is the difference between model.predict and model.predict_proba | keras: what is the difference between model.predict and model.predict_proba
I found model.predict and model.predict_proba both give an identical 2D matrix representing probabilities at each categories for each row.
What is the difference of the two functions? | https://stackoverflow.com/questions/40747679/keras-what-is-the-difference-between-model-predict-and-model-predict-proba | python, machine-learning, deep-learning, keras | 1,479,834,376 |
se_79338114 | stackoverflow | MACHINE_LEARNING | "RuntimeError: Numpy is not available" when using inverse_transform | "RuntimeError: Numpy is not available" when using inverse_transform
I got this error on python 3.12.7:
Traceback (most recent call last):
File "/Users/hongviet/Library/Mobile Documents/com~apple~CloudDocs/Documents/DataAnlalysCoding/First Week/baitap1.py", line 186, in <module>
main()
File "/Users/ho... | https://stackoverflow.com/questions/79338114/runtimeerror-numpy-is-not-available-when-using-inverse-transform | numpy, deep-learning, conv-neural-network, data-analysis | 1,736,316,862 |
se_76880211 | stackoverflow | MACHINE_LEARNING | How to visualize a heatmap in a classification task? | How to visualize a heatmap in a classification task?
I am now with a classification task using a ViT-like model. And I am trying to create a heatmap like this.
I have look up the site and found this but no solution was given. So i am trying to bring it up again. Help me folks! Thanks a lot. | https://stackoverflow.com/questions/76880211/how-to-visualize-a-heatmap-in-a-classification-task | python, deep-learning, pytorch, classification, transformer-model | 1,691,717,738 |
se_51818225 | stackoverflow | MACHINE_LEARNING | Pytorch RuntimeError: "host_softmax" not implemented for 'torch.cuda.LongTensor' | Pytorch RuntimeError: "host_softmax" not implemented for 'torch.cuda.LongTensor'
I am using pytorch for training models. But I got an runtime error when it was computing the cross-entropy loss.
Traceback (most recent call last):
File "deparser.py", line 402, in <module>
d.train()
File "depa... | https://stackoverflow.com/questions/51818225/pytorch-runtimeerror-host-softmax-not-implemented-for-torch-cuda-longtensor | deep-learning, pytorch | 1,534,149,259 |
se_73229163 | stackoverflow | MACHINE_LEARNING | AMD ROCm with Pytorch on Navi10 (RX 5700 / RX 5700 XT) | AMD ROCm with Pytorch on Navi10 (RX 5700 / RX 5700 XT)
I am one of those miserable creatures who own a AMD GPU (RX 5700, Navi10). I want to use up-to-date PyTorch libraries to do some Deep Learning on my local machine and stop using cloud instances.
I saw all over the internet that AMD is promising Navi10 support in t... | https://stackoverflow.com/questions/73229163/amd-rocm-with-pytorch-on-navi10-rx-5700-rx-5700-xt | deep-learning, pytorch, gpu, amd-gpu, amd-rocm | 1,659,573,141 |
se_62861773 | stackoverflow | MACHINE_LEARNING | Can we use multiple loss functions in same layer? | Can we use multiple loss functions in same layer?
Can we use mulitple loss function in this architecture:
I have two different type of loss functions and want to use it on last layer [Output]
loss functions :
binary_crossentropy
custom loss function
Can we do that? | https://stackoverflow.com/questions/62861773/can-we-use-multiple-loss-functions-in-same-layer | tensorflow, machine-learning, keras, deep-learning, loss-function | 1,594,561,071 |
se_79328556 | stackoverflow | MACHINE_LEARNING | How do I update pixelClassificationLayer() to a custom loss function? | How do I update pixelClassificationLayer() to a custom loss function?
I have seen in the Mathworks official website for the pixelClassificationLayer() function that I should update it to a custom loss function using the following code:
function loss = modelLoss(Y,T)
mask = ~isnan(T);
targets(isnan(T)) = 0;
loss... | https://stackoverflow.com/questions/79328556/how-do-i-update-pixelclassificationlayer-to-a-custom-loss-function | matlab, machine-learning, deep-learning, loss-function, cross-entropy | 1,735,981,532 |
se_79331871 | stackoverflow | MACHINE_LEARNING | Graph disconnected error when loading model in Tensorflow | Graph disconnected error when loading model in Tensorflow
I am running a code repository and I got an error message while recreate the model.
ValueError: Graph disconnected: cannot obtain value for tensor KerasTensor(type_spec=TensorSpec(shape=(None, 32, 32, 3), dtype=tf.float32, name='resnet50_input'), name='resnet5... | https://stackoverflow.com/questions/79331871/graph-disconnected-error-when-loading-model-in-tensorflow | tensorflow, machine-learning, keras, deep-learning, tensorflow2.0 | 1,736,127,322 |
se_75897626 | stackoverflow | MACHINE_LEARNING | Improving Deep Learning Model to Detect Train Wagon Gaps in Variable Conditions | Improving Deep Learning Model to Detect Train Wagon Gaps in Variable Conditions
Our team records video streams of moving trains from various camera locations with differing backgrounds and distances from the rails. Our task is to collect information about each wagon, which requires detecting gaps between them. We have... | https://stackoverflow.com/questions/75897626/improving-deep-learning-model-to-detect-train-wagon-gaps-in-variable-conditions | machine-learning, deep-learning, pytorch, computer-vision, self-supervised-learning | 1,680,259,453 |
se_79330232 | stackoverflow | MACHINE_LEARNING | Neuralnet RMSE is 10x bigger than linear model's RMSE on test data set | Neuralnet RMSE is 10x bigger than linear model's RMSE on test data set
Working with the Boston Housing data set. The linear model is very easy:
library(e1071) # for tune.nnet
library(MASS) # for the Boston housing data set
library(Metrics) # to calculate RMSE
library(nnet)
df <- MASS::Boston
train <- df[1:100, ]
... | https://stackoverflow.com/questions/79330232/neuralnet-rmse-is-10x-bigger-than-linear-models-rmse-on-test-data-set | r, deep-learning, neural-network, nnet | 1,736,054,516 |
se_50313152 | stackoverflow | MACHINE_LEARNING | Back Propagation in Convolutional Neural Networks and how to update filters | Back Propagation in Convolutional Neural Networks and how to update filters
Im learning about Convolutional Neural Networks and right now i'm confused about how to implement it.
I know about regular neural networks and concepts like Gradient Descent and Back Propagation, And i can understand how CNN's how works intui... | https://stackoverflow.com/questions/50313152/back-propagation-in-convolutional-neural-networks-and-how-to-update-filters | machine-learning, neural-network, deep-learning, artificial-intelligence, conv-neural-network | 1,526,190,581 |
se_79294507 | stackoverflow | MACHINE_LEARNING | Diffusers pipeline Instant ID with Ipadapter | Diffusers pipeline Instant ID with Ipadapter
I want to use an implementation of InstantID with Ipadapter using Diffusers library.
So far I got :
import diffusers
from diffusers.utils import load_image
from diffusers.models import ControlNetModel
from transformers import CLIPVisionModelWithProjection
# Custom diffuse... | https://stackoverflow.com/questions/79294507/diffusers-pipeline-instant-id-with-ipadapter | python, deep-learning, stable-diffusion, diffusers | 1,734,616,295 |
se_71984678 | stackoverflow | MACHINE_LEARNING | UnimplementedError: Graph execution error: running nn on tensorflow | UnimplementedError: Graph execution error: running nn on tensorflow
I have been having this error, and I don't know why, especially since I am following someone's code exactly and the person had no error when running this
img_shape = (128,128,3)
# load pretrained model
base_model = tf.keras.applications.VGG19(input_s... | https://stackoverflow.com/questions/71984678/unimplementederror-graph-execution-error-running-nn-on-tensorflow | tensorflow, keras, deep-learning, gpu, image-classification | 1,650,761,079 |
se_52178818 | stackoverflow | MACHINE_LEARNING | Face alignment megaface | Face alignment megaface
i was looking into face recognition and i came across this method to face transform using similarity transform to align faces detected by mtcnn for the megaface dataset, in that the source matrix being used was
src = np.array([ ... | https://stackoverflow.com/questions/52178818/face-alignment-megaface | python, deep-learning, face-recognition, facial-identification | 1,536,130,225 |
se_79324718 | stackoverflow | MACHINE_LEARNING | autoencoder.fit() raises 'KeyError: 'Exception encountered when calling Functional.call()' | autoencoder.fit() raises 'KeyError: 'Exception encountered when calling Functional.call()'
I'm trying to build a stacked LSTM sequence auto-encoder that takes a signal of 430 timesteps with each timestep having 1 value. You can see the code for the model below:
feat_dim = 1
timesteps = 430
inputs = keras.I... | https://stackoverflow.com/questions/79324718/autoencoder-fit-raises-keyerror-exception-encountered-when-calling-function | python, tensorflow, keras, deep-learning, lstm | 1,735,844,701 |
se_79328433 | stackoverflow | MACHINE_LEARNING | NaN loss output when training DNN with Keras | NaN loss output when training DNN with Keras
I am trying to do an exercise from Hands-On ML by Aurelien Geron. However when I tried using my own solution and copy and pasting the solution from the answer key, I keep getting this outcome that is not supposed to happen. The loss and val_loss at each epoch is nan and the... | https://stackoverflow.com/questions/79328433/nan-loss-output-when-training-dnn-with-keras | python, tensorflow, machine-learning, keras, deep-learning | 1,735,976,722 |
se_66091226 | stackoverflow | MACHINE_LEARNING | RuntimeError: Expected all tensors to be on the same device, but found at least two devices, cuda:0 and cpu! when resuming training | RuntimeError: Expected all tensors to be on the same device, but found at least two devices, cuda:0 and cpu! when resuming training
I saved a checkpoint while training on gpu. After reloading the checkpoint and continue training I get the following error:
Traceback (most recent call last):
File "main.py", line 140, ... | https://stackoverflow.com/questions/66091226/runtimeerror-expected-all-tensors-to-be-on-the-same-device-but-found-at-least | python, deep-learning, pytorch, runtime-error, tensor | 1,612,720,473 |
se_57863277 | stackoverflow | MACHINE_LEARNING | When to use numpy.random.randn(...) and when numpy.random.rand(...)? | When to use numpy.random.randn(...) and when numpy.random.rand(...)?
In my deep learning exercise I had to initialize one parameter D1 of same size as A1 so what I did is:
D1 = np.random.randn(A1.shape[0],A1.shape[1])
But after computing further equations when I checked the results they didn't matched. Then after pr... | https://stackoverflow.com/questions/57863277/when-to-use-numpy-random-randn-and-when-numpy-random-rand | python, numpy, deep-learning | 1,568,082,571 |
se_69694720 | stackoverflow | MACHINE_LEARNING | Depthwise separable convolutions require more GPU memory | Depthwise separable convolutions require more GPU memory
I have read many papers and web articles that claim that depthwise-separable convolutions reduce the memory required by a deep learning model compared to standard convolution. However, I do not understand how this would be the case, since depthwise-separable con... | https://stackoverflow.com/questions/69694720/depthwise-separable-convolutions-require-more-gpu-memory | deep-learning, pytorch, conv-neural-network | 1,635,061,019 |
se_78567104 | stackoverflow | MACHINE_LEARNING | How to integrate Federated Learning using Flower framworke in react js /flask web app | How to integrate Federated Learning using Flower framworke in react js /flask web app
I want to create a web application using React.js, Flask, and the Flower framework with Tensorflow for image classification. I am stuck and would appreciate any tips or resources. Can anyone help me?
I asked GPT and Gemini, but all ... | https://stackoverflow.com/questions/78567104/how-to-integrate-federated-learning-using-flower-framworke-in-react-js-flask-we | reactjs, flask, deep-learning, web-applications, federated-learning | 1,717,347,017 |
se_53414580 | stackoverflow | MACHINE_LEARNING | Why Softmax is not selecting with maximum probability? | Why Softmax is not selecting with maximum probability?
I am taking lectures of course CS231 from Stanford university. I am unable to understand the point from RNN, Why Softmax unable to select the highest probability which is 0.84 for character o (in the attached example) instead of 0.13 for character e. Explanation w... | https://stackoverflow.com/questions/53414580/why-softmax-is-not-selecting-with-maximum-probability | deep-learning, probability, recurrent-neural-network, softmax | 1,542,811,601 |
se_62228981 | stackoverflow | MACHINE_LEARNING | What is freezing/unfreezing a layer in neural networks? | What is freezing/unfreezing a layer in neural networks?
I have been playing around with neural networks for quite a while now, and recently came across the terms freezing & unfreezing the layers before training a neural network while reading about transfer learning & am struggling with understanding their usage.
When... | https://stackoverflow.com/questions/62228981/what-is-freezing-unfreezing-a-layer-in-neural-networks | tensorflow, machine-learning, deep-learning, neural-network, transfer-learning | 1,591,430,673 |
se_51995977 | stackoverflow | MACHINE_LEARNING | How can I use a pre-trained neural network with grayscale images? | How can I use a pre-trained neural network with grayscale images?
I have a dataset containing grayscale images and I want to train a state-of-the-art CNN on them. I'd very much like to fine-tune a pre-trained model (like the ones here).
The problem is that almost all models I can find the weights for have been traine... | https://stackoverflow.com/questions/51995977/how-can-i-use-a-pre-trained-neural-network-with-grayscale-images | python, tensorflow, machine-learning, keras, deep-learning | 1,535,070,784 |
se_79318422 | stackoverflow | MACHINE_LEARNING | Can't replicate the behaviour of loss calculation in keras | Can't replicate the behaviour of loss calculation in keras
I am working on a semantic segmentation problem where I have an input x ( CT image) to a deep learning model of shape (batch_size,1,256,256) and an output of shape (batch_size,2,256,256) where the first channel represents an output mask (bone mask), and th... | https://stackoverflow.com/questions/79318422/cant-replicate-the-behaviour-of-loss-calculation-in-keras | python, tensorflow, keras, deep-learning, loss-function | 1,735,586,144 |
se_78486965 | stackoverflow | MACHINE_LEARNING | PyTorch RuntimeError: device >= 0 && device < num_gpus INTERNAL ASSERT FAILED | PyTorch RuntimeError: device >= 0 && device < num_gpus INTERNAL ASSERT FAILED
I'm trying to perform some inference with YOLOv8 models, simply using the following command:
yolo detect predict source=input.jpg model=yolov8n.pt device=0
But I'm getting this error related to PyTorch (my pytorch version as s... | https://stackoverflow.com/questions/78486965/pytorch-runtimeerror-device-0-device-num-gpus-internal-assert-failed | deep-learning, pytorch, yolo, torchvision | 1,715,816,566 |
se_79314811 | stackoverflow | MACHINE_LEARNING | How do I prevent overflows in my C# SoftMax implementation? | How do I prevent overflows in my C# SoftMax implementation?
In my efforts to understand machine learning better from a "first principles" perspective, I am implementing my own ML-related functions. Currently I am trying to implement SoftMax:
IEnumerable<double> SoftMax(IEnumerable<double> vector)
{
var exps = vec... | https://stackoverflow.com/questions/79314811/how-do-i-prevent-overflows-in-my-c-softmax-implementation | c#, machine-learning, deep-learning, softmax | 1,735,434,105 |
se_79310137 | stackoverflow | MACHINE_LEARNING | Evaluate and Save a DNN Linear Combined Classifier Model in Tensorflow | Evaluate and Save a DNN Linear Combined Classifier Model in Tensorflow
I'm using tensorflow estimator for my model and it works for training and evaluation part (Code snippet given below). While the accuracy being displayed from the results are 93%, the precision and recall are both 0 which should not be possible. Thi... | https://stackoverflow.com/questions/79310137/evaluate-and-save-a-dnn-linear-combined-classifier-model-in-tensorflow | python, tensorflow, pyspark, deep-learning, modeling | 1,735,236,002 |
se_79308948 | stackoverflow | MACHINE_LEARNING | Indexing CNN output grid in loss function | Indexing CNN output grid in loss function
I have CNN model build in tensorflow which outputs grid with shape (batch_size,H,W,1).
I perform sigmoid activation function on each cell in the grid.
my y_true is tensor with [ColIndex, RowIndex, Outcome], meaning for every training instance i have exactly 1 cell with an outc... | https://stackoverflow.com/questions/79308948/indexing-cnn-output-grid-in-loss-function | python, tensorflow, deep-learning | 1,735,198,964 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.