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_79860536
stackoverflow
MACHINE_LEARNING
Keras to_categorical results in different memory allocation error every re-run
Keras to_categorical results in different memory allocation error every re-run I'm working on a semantic segmentation model through U-net for classifying 11 categories. After splitting my image and label data into training and testing arrays, I turn the arrays into Unsigned Integer 8 so I have labels = labels.astype(n...
https://stackoverflow.com/questions/79860536/keras-to-categorical-results-in-different-memory-allocation-error-every-re-run
python, numpy, keras, deep-learning, semantic-segmentation
1,767,595,231
se_79857308
stackoverflow
MACHINE_LEARNING
What are the advance steps required in model training and how can i do does?
What are the advance steps required in model training and how can i do does? I am training a model using pytorch using a NVIDIA GPU. The time taken to run and evaluate a single epoch is about 1 hour, what should i do about this, and simillarly, what are the further steps i need to do to completly develop the model lik...
https://stackoverflow.com/questions/79857308/what-are-the-advance-steps-required-in-model-training-and-how-can-i-do-does
optimization, deep-learning, pytorch, gpu
1,767,078,396
se_79856699
stackoverflow
MACHINE_LEARNING
How to preprocess and train a binary classifier on cat/dog images using logistic regression in PyTorch?
How to preprocess and train a binary classifier on cat/dog images using logistic regression in PyTorch? Body: I'm trying to build a binary image classifier (cat vs dog) using logistic regression in PyTorch. Background: I previously implemented softmax classification on MNIST: https://github.com/jeehoo0507/Mnist-softm...
https://stackoverflow.com/questions/79856699/how-to-preprocess-and-train-a-binary-classifier-on-cat-dog-images-using-logistic
python, deep-learning, pytorch
1,767,003,733
se_79855982
stackoverflow
MACHINE_LEARNING
Is my use of tf.distribute.MirroredStrategy and strategy.scope() correct and safe for multi-GPU training in Keras?
Is my use of tf.distribute.MirroredStrategy and strategy.scope() correct and safe for multi-GPU training in Keras? I am training a model using Keras + TensorFlow with tf.distribute.MirroredStrategy on a multi-GPU setup. I would like to verify that I am using strategy.scope() correctly. import time import logging impo...
https://stackoverflow.com/questions/79855982/is-my-use-of-tf-distribute-mirroredstrategy-and-strategy-scope-correct-and-saf
python, tensorflow, keras, deep-learning
1,766,874,442
se_79855418
stackoverflow
MACHINE_LEARNING
I am confused, when to use tensorflow and pytorch
I am confused, when to use tensorflow and pytorch I am always confused between tensorflow and pytorch when to use which, because both are used for same task but when to use tensorflow and pytorch, like situation oriented. Some people's said suggested me if doing any research or something use pytorch, it is best for th...
https://stackoverflow.com/questions/79855418/i-am-confused-when-to-use-tensorflow-and-pytorch
machine-learning, deep-learning, computer-vision, artificial-intelligence, software-distribution
1,766,767,960
se_73266516
stackoverflow
MACHINE_LEARNING
Pytorch equivalent of `register_buffer` in flax/jax
Pytorch equivalent of `register_buffer` in flax/jax I'm searching a way to write the equivalent of the following Pytorch module in Flax but I haven't found a way to do it. The important thing is that the constant should be loadable and saveable upon checkpoint. class SillyModule(nn.Module): def __init__(self, ): ...
https://stackoverflow.com/questions/73266516/pytorch-equivalent-of-register-buffer-in-flax-jax
python, deep-learning, pytorch, jax, flax
1,659,866,291
se_48001598
stackoverflow
MACHINE_LEARNING
Why do we need to call zero_grad() in PyTorch?
Why do we need to call zero_grad() in PyTorch? Why does zero_grad() need to be called during training? | zero_grad(self) | Sets gradients of all model parameters to zero.
https://stackoverflow.com/questions/48001598/why-do-we-need-to-call-zero-grad-in-pytorch
python, neural-network, deep-learning, pytorch, gradient-descent
1,514,435,500
se_79852884
stackoverflow
MACHINE_LEARNING
How to dynamically estimate maximum number of cameras my GPU can handle for YOLOv8 inference?
How to dynamically estimate maximum number of cameras my GPU can handle for YOLOv8 inference? I’m trying to simulate multiple camera streams feeding into a YOLOv8l model on a single GPU and monitor real-time hardware utilization. My setup: Single GPU (48GB VRAM, CUDA-enabled) YOLOv8l model Simulating N cameras with...
https://stackoverflow.com/questions/79852884/how-to-dynamically-estimate-maximum-number-of-cameras-my-gpu-can-handle-for-yolo
python, tensorflow, deep-learning, pytorch, nvidia
1,766,406,199
se_60609585
stackoverflow
MACHINE_LEARNING
Good performance with Accuracy but not with Dice loss in Image Segmentation
Good performance with Accuracy but not with Dice loss in Image Segmentation I'm doing image segmentation with U-Net like architecture on Tensorflow w/Keras but I'm new in Deep Learning. I've got this dataset with the following set shapes: Train : X : (175250, 30, 30, 6) Y: (175250, 30, 30) Validation: X: (29200, 30,...
https://stackoverflow.com/questions/60609585/good-performance-with-accuracy-but-not-with-dice-loss-in-image-segmentation
python, tensorflow, deep-learning, conv-neural-network, tf.keras
1,583,795,952
se_47488598
stackoverflow
MACHINE_LEARNING
AttributeError: 'CrossEntropyLoss' object has no attribute 'backward'
AttributeError: 'CrossEntropyLoss' object has no attribute 'backward' i am trying to train a very basic CNN on CIFAR10 data set and getting the following error : AttributeError: 'CrossEntropyLoss' object has no attribute 'backward' criterion =nn.CrossEntropyLoss optimizer=optim.SGD(net.parameters(),lr...
https://stackoverflow.com/questions/47488598/attributeerror-crossentropyloss-object-has-no-attribute-backward
python, neural-network, deep-learning, conv-neural-network, pytorch
1,511,630,107
se_41455101
stackoverflow
MACHINE_LEARNING
What is the meaning of the word logits in TensorFlow?
What is the meaning of the word logits in TensorFlow? In the following TensorFlow function, we must feed the activation of artificial neurons in the final layer. That I understand. But I don't understand why it is called logits? Isn't that a mathematical function? loss_function = tf.nn.softmax_cross_entropy_with_log...
https://stackoverflow.com/questions/41455101/what-is-the-meaning-of-the-word-logits-in-tensorflow
tensorflow, machine-learning, neural-network, deep-learning, cross-entropy
1,483,495,351
se_79841874
stackoverflow
MACHINE_LEARNING
Apply Quantization on a CNN
Apply Quantization on a CNN I want to apply a quantization function to a deep CNN. This CNN is used for an image classification(in 4 classes) task, and my data consists of 224×224 images. When I run this code, I get an error. How can I solve this issue? I want to apply compression technique to reduce the model size an...
https://stackoverflow.com/questions/79841874/apply-quantization-on-a-cnn
tensorflow, deep-learning, compression, quantization, quantization-aware-training
1,765,280,166
se_58419436
stackoverflow
MACHINE_LEARNING
Extracting attention weights of each token at each layer of transformer in python
Extracting attention weights of each token at each layer of transformer in python I am doing some NLP and I am interested in extracting attention weights of individual test token at each layer of transformer via Python (PyTorch, TensorFlow, etc.) Is coding up a Transformer (any transformers like Transformer-XL, OpenA...
https://stackoverflow.com/questions/58419436/extracting-attention-weights-of-each-token-at-each-layer-of-transformer-in-pytho
tensorflow, keras, deep-learning, nlp, pytorch
1,571,249,871
se_48029542
stackoverflow
MACHINE_LEARNING
Data augmentation in test/validation set?
Data augmentation in test/validation set? It is common practice to augment data (add samples programmatically, such as random crops, etc. in the case of a dataset consisting of images) on both training and test set, or just the training data set?
https://stackoverflow.com/questions/48029542/data-augmentation-in-test-validation-set
machine-learning, deep-learning
1,514,590,316
se_44021214
stackoverflow
MACHINE_LEARNING
How can I use NumPy functions on a Keras tensor in the loss function?
How can I use NumPy functions on a Keras tensor in the loss function? I'm using Keras with a TensorFlow backend to build and run a neural network. I need to use a NumPy function on my output tensor in the loss function. More specifically, my loss function involves finding nearest neighbors, and I need to use the Keras...
https://stackoverflow.com/questions/44021214/how-can-i-use-numpy-functions-on-a-keras-tensor-in-the-loss-function
python, numpy, tensorflow, keras, deep-learning
1,495,014,275
se_79826360
stackoverflow
MACHINE_LEARNING
Python library recommendation for the implementation of a neural network modification algorithm
Python library recommendation for the implementation of a neural network modification algorithm I want to implement in python some algorithms from a paper that allow for a pre-trained neural network to be modified (adding or removing neurons or layers) conserving (theoretically) the outputs of the network over the tra...
https://stackoverflow.com/questions/79826360/python-library-recommendation-for-the-implementation-of-a-neural-network-modific
python, algorithm, deep-learning, neural-network
1,763,718,621
se_79834752
stackoverflow
MACHINE_LEARNING
Repetitive generation on instruction tuning for raw language model
Repetitive generation on instruction tuning for raw language model I have used the following code to do sft: base_model = "google/gemma-3-270m" it_model = "google/gemma-3-270m-it" checkpoint_dir = "checkpoint" learning_rate = 5e-5 #@param {type:"number"} from datasets import Dataset from transformers import pipeline f...
https://stackoverflow.com/questions/79834752/repetitive-generation-on-instruction-tuning-for-raw-language-model
machine-learning, deep-learning, huggingface-transformers, large-language-model, fine-tuning
1,764,588,837
se_59129812
stackoverflow
MACHINE_LEARNING
How to avoid "CUDA out of memory" in PyTorch
How to avoid "CUDA out of memory" in PyTorch I think it's a pretty common message for PyTorch users with low GPU memory: RuntimeError: CUDA out of memory. Tried to allocate X MiB (GPU X; X GiB total capacity; X GiB already allocated; X MiB free; X cached) I tried to process an image by loading each layer to...
https://stackoverflow.com/questions/59129812/how-to-avoid-cuda-out-of-memory-in-pytorch
python, deep-learning, pytorch, object-detection, low-memory
1,575,233,173
se_79836456
stackoverflow
MACHINE_LEARNING
Get image paths from tfds food101
Get image paths from tfds food101 I'm working on food101 tensorflow dataset and want to know the most wrong predictions of my efficientnet model, for that purpose I'd need to get image paths of test data, but I don't know how I can get the paths as the dataset is from tfds, not my own data (or downloaded in my compute...
https://stackoverflow.com/questions/79836456/get-image-paths-from-tfds-food101
tensorflow, deep-learning, tensorflow-datasets, image-classification
1,764,727,484
se_79783011
stackoverflow
MACHINE_LEARNING
Kohya-SS SDXL LoRA Training Resets Steps Despite Successful State Loading
Kohya-SS SDXL LoRA Training Resets Steps Despite Successful State Loading I am running SDXL LoRA training using Kohya's sd-scripts and accelerate. I have enabled --save_state and am trying to resume training, but the training steps always reset to 0, even though the log indicates the state files are loaded. I need the...
https://stackoverflow.com/questions/79783011/kohya-ss-sdxl-lora-training-resets-steps-despite-successful-state-loading
python, deep-learning, stable-diffusion, resuming-training
1,759,672,913
se_72926254
stackoverflow
MACHINE_LEARNING
Avoid Division by Zero in Sigmoid function
Avoid Division by Zero in Sigmoid function With : https://nbviewer.org/github/ImadDabbura/blog-posts/blob/master/notebooks/Coding-Neural-Network-Forwad-Back-Propagation.ipynb as reference I am trying to build a Vanila Deep Learning Code. I wonder how is division by zero avoided in the sigmoid funtion. def sigmoid(Z): ...
https://stackoverflow.com/questions/72926254/avoid-division-by-zero-in-sigmoid-function
python, deep-learning
1,657,429,432
se_71044014
stackoverflow
MACHINE_LEARNING
Recurrent Neural Networks for Drawing Classification tutorial code doesn't run on tensorflow 2
Recurrent Neural Networks for Drawing Classification tutorial code doesn't run on tensorflow 2 I'm a beginner in deep leaerning and Tensorflow. I tried to run the tutorial code for Recurrent Neural Networks for Drawing Classification on my computer following the directions written there. But the provided tutorial ...
https://stackoverflow.com/questions/71044014/recurrent-neural-networks-for-drawing-classification-tutorial-code-doesnt-run-o
python, tensorflow, deep-learning, neural-network
1,644,380,936
se_75583410
stackoverflow
MACHINE_LEARNING
module.save() Error 'TypeError: this __dict__ descriptor does not support '_DictWrapper' objects'
module.save() Error 'TypeError: this __dict__ descriptor does not support '_DictWrapper' objects' I'm following a tutorial on Youtube for image classification with machine learning. I keep getting the error as shown in the title from trying to save a deep learning module with tensorflow. I'm using PyCh...
https://stackoverflow.com/questions/75583410/module-save-error-typeerror-this-dict-descriptor-does-not-support-dict
python, tensorflow, deep-learning, pycharm
1,677,517,260
se_79832402
stackoverflow
MACHINE_LEARNING
How to read a large Python project (for example, a project of Deep Learning or Reinforcement Learning)
How to read a large Python project (for example, a project of Deep Learning or Reinforcement Learning) I've downloaded many Python projects about Reinforcement Learning from Github, but each takes me too much time to read. It's easy to comprehend a simple Python project with only a few *.py files, but how to read a pr...
https://stackoverflow.com/questions/79832402/how-to-read-a-large-python-project-for-example-a-project-of-deep-learning-or-r
python, github, deep-learning, artificial-intelligence, reinforcement-learning
1,764,320,950
se_48324152
stackoverflow
MACHINE_LEARNING
How to change the learning rate of an optimizer at any given moment (no LR schedule)?
How to change the learning rate of an optimizer at any given moment (no LR schedule)? Is it possible in PyTorch to change the learning rate of the optimizer in the middle of training dynamically (I don't want to define a learning rate schedule beforehand)? So let's say I have an optimizer: optim = torch.optim.SGD(mo...
https://stackoverflow.com/questions/48324152/how-to-change-the-learning-rate-of-an-optimizer-at-any-given-moment-no-lr-sched
python, optimization, neural-network, deep-learning, pytorch
1,516,287,352
se_79295498
stackoverflow
MACHINE_LEARNING
UserWarning: Mutation on a buffer in the model is detected. ExecuTorch assumes buffers that are mutated in the graph have a meaningless initial state
UserWarning: Mutation on a buffer in the model is detected. ExecuTorch assumes buffers that are mutated in the graph have a meaningless initial state I have exported model to Executorch program, and the file is saved correctly in directory. But I enountered warning like this # To see more debug info, please use `graph...
https://stackoverflow.com/questions/79295498/userwarning-mutation-on-a-buffer-in-the-model-is-detected-executorch-assumes-b
python, deep-learning, pytorch, conv-neural-network
1,734,639,166
se_10565868
stackoverflow
MACHINE_LEARNING
multi-layer perceptron (MLP) architecture: criteria for choosing number of hidden layers and size of the hidden layer?
multi-layer perceptron (MLP) architecture: criteria for choosing number of hidden layers and size of the hidden layer? If we have 10 eigenvectors then we can have 10 neural nodes in input layer.If we have 5 output classes then we can have 5 nodes in output layer.But what is the criteria for choosing number of hidden l...
https://stackoverflow.com/questions/10565868/multi-layer-perceptron-mlp-architecture-criteria-for-choosing-number-of-hidde
machine-learning, neural-network, deep-learning, perceptron
1,336,843,088
se_78376085
stackoverflow
MACHINE_LEARNING
RuntimeError: Default process group has not been initialized, please make sure to call init_process_group
RuntimeError: Default process group has not been initialized, please make sure to call init_process_group I am using CoDi which is multimodal Latent diffusion model. I am trying to remove the modules on images and video from CoDi and fine tune it with text-music pair data. The training script (train.py) for generating...
https://stackoverflow.com/questions/78376085/runtimeerror-default-process-group-has-not-been-initialized-please-make-sure-t
python, machine-learning, deep-learning, pytorch, artificial-intelligence
1,713,935,111
se_79771693
stackoverflow
MACHINE_LEARNING
!pip install mediapipe opencv-python error
!pip install mediapipe opencv-python error I am getting this below error for when I try to install mediapipe on Kaggle. The same command works on the Google Collab fine but not on Kaggle. WARNING: Retrying (Retry(total=4, connect=None, read=None, redirect=None, status=None)) after connection broken by 'NewConnectionEr...
https://stackoverflow.com/questions/79771693/pip-install-mediapipe-opencv-python-error
deep-learning, mediapipe
1,758,548,913
se_71809044
stackoverflow
MACHINE_LEARNING
metric learning and contrastive learning difference
metric learning and contrastive learning difference I researched some materials,and know that the goal of contrastive learning and metric learning are both to learn such an embedding space in which similar sample pairs stay close to each other while dissimilar ones are far apart. But what is the difference of metric l...
https://stackoverflow.com/questions/71809044/metric-learning-and-contrastive-learning-difference
machine-learning, deep-learning, embedding, supervised-learning, self-supervised-learning
1,649,515,242
se_79749577
stackoverflow
MACHINE_LEARNING
Getting different results across different machines while training RL
Getting different results across different machines while training RL While training my RL algorithm using SBX, I am getting different results across my HPC cluster and PC. However, I did find that results consistently are same within the same machine. They just diverge across machines. I am limiting all computation t...
https://stackoverflow.com/questions/79749577/getting-different-results-across-different-machines-while-training-rl
deep-learning, reinforcement-learning, jax, stable-baselines
1,756,413,774
se_62272056
stackoverflow
MACHINE_LEARNING
What are the differences between contextual embedding and word embedding
What are the differences between contextual embedding and word embedding I am trying to understand the concept of embedding for the deep learning models. I understand how employing word2vec can address the limitations of using the one-hot vectors. However, recently I see a plethora of blog posts stating ELMo, BERT, ...
https://stackoverflow.com/questions/62272056/what-are-the-differences-between-contextual-embedding-and-word-embedding
machine-learning, deep-learning, nlp, artificial-intelligence, word-embedding
1,591,654,630
se_76965920
stackoverflow
MACHINE_LEARNING
Yolo v8 slow fps in real time
Yolo v8 slow fps in real time I had been training a yolo v8 nano model with 1.5k images with the size of 640x640 and I decided to make it live with this code: from ultralytics import YOLO from ultralytics.yolo.v8.detect.predict import DetectionPredictor import cv2 model = YOLO("Model/best.pt") model.predict(source="0"...
https://stackoverflow.com/questions/76965920/yolo-v8-slow-fps-in-real-time
python, deep-learning, object-detection, yolo, yolov8
1,692,844,466
se_79464030
stackoverflow
MACHINE_LEARNING
None Gradients for a model with 2 outputs
None Gradients for a model with 2 outputs I have a model that has a GRU implementation inside and process audio samples. In each forward path I process a single sample of an audio file. To imitate the GRU behavior correctly, I have returned the output of my GRU implementation in each forward pass and pass that data al...
https://stackoverflow.com/questions/79464030/none-gradients-for-a-model-with-2-outputs
tensorflow, deep-learning, audio-processing, gradienttape, gru
1,740,410,150
se_78303940
stackoverflow
MACHINE_LEARNING
Deeplearning4j - creating a model for strings employee, worker, associate etc
Deeplearning4j - creating a model for strings employee, worker, associate etc I wanted to build a model / train the model using deeplearning4j. This model should understand all the employee related jargon for example, it should understand the words Employee, Worker, Associate as same words. I was using below code snip...
https://stackoverflow.com/questions/78303940/deeplearning4j-creating-a-model-for-strings-employee-worker-associate-etc
machine-learning, deep-learning, deeplearning4j
1,712,746,896
se_79784559
stackoverflow
MACHINE_LEARNING
Avoid overlap of bipartite network nodes in ggraph
Avoid overlap of bipartite network nodes in ggraph I'm plotting a bipartite (two-mode) network using igraph and ggraph. But the nodes are overlapping a lot, even though there is still space in the graphic window. I would like to plot this using ggraph, and I know it's possible to plot with other packages, such as igra...
https://stackoverflow.com/questions/79784559/avoid-overlap-of-bipartite-network-nodes-in-ggraph
r, deep-learning, igraph, ggraph
1,759,841,492
se_79807844
stackoverflow
MACHINE_LEARNING
Will tf.keras.Sequential containing multiple custom layers be correctly fully serializable and deserializable in my case?
Will tf.keras.Sequential containing multiple custom layers be correctly fully serializable and deserializable in my case? I am implementing a U-Net variant in TensorFlow/Keras with custom layers. In one of my layers custom layers UPDoubleConv, I have a Sequential self.blocks containing a repeated pattern of UpSampling...
https://stackoverflow.com/questions/79807844/will-tf-keras-sequential-containing-multiple-custom-layers-be-correctly-fully-se
python, tensorflow, keras, deep-learning, tf.keras
1,762,171,259
se_61399871
stackoverflow
MACHINE_LEARNING
Interpretation of RNN/LSTM cell
Interpretation of RNN/LSTM cell I am learning RNN, especially LSTM networks. I have read a lot of topics, including this one and I still have some misunderstandings. The image below is from this article and it represents single RNN cell unfolded in time. 1. Do I understand correctly, that RNN cell is not a single neu...
https://stackoverflow.com/questions/61399871/interpretation-of-rnn-lstm-cell
machine-learning, deep-learning, lstm, recurrent-neural-network
1,587,693,781
se_79803908
stackoverflow
MACHINE_LEARNING
Decoder only model AI making repetitive responses
Decoder only model AI making repetitive responses I am making a Decoder only transformer using Pytorch and my dataset of choice is the fullEnglish dataset from kaggle Plaintext Wikipedia (full English). The problem is that my model output is repetitive: print(generate(model=model, prompt="what is anarchism", tokenizer...
https://stackoverflow.com/questions/79803908/decoder-only-model-ai-making-repetitive-responses
python, deep-learning, pytorch
1,761,748,358
se_71514834
stackoverflow
MACHINE_LEARNING
Unable to train CNN Model
Unable to train CNN Model Original dataset shape is (343889, 80) and last column is of Labels. The training and testing set split is done X_train, X_test, y_train, y_test = train_test_split(X, Y, test_size=0.30, random_state=10) shape of - training dataset (240722, 80) shape of - training Labels (240722,) shape of -...
https://stackoverflow.com/questions/71514834/unable-to-train-cnn-model
python, tensorflow, keras, deep-learning, conv-neural-network
1,647,530,468
se_69933910
stackoverflow
MACHINE_LEARNING
Getting error when training the CNN model
Getting error when training the CNN model I am getting errors when training my CNN model which is for checking what a person is telling in sign language. I am working with keras, tensorflow. This is my code: import tensorflow as tf ;importing libraries from tensorflow.keras import datasets,layers,models import numpy ...
https://stackoverflow.com/questions/69933910/getting-error-when-training-the-cnn-model
python, tensorflow, keras, deep-learning, conv-neural-network
1,636,659,169
se_43204194
stackoverflow
MACHINE_LEARNING
CNN is not learning at all
CNN is not learning at all I just created my own CNN which reads data from the disk and tries to learn. But the weights don't seem to learn at all, they all stay randomized. The biases change only a bit. I already tried to use grayscale images, without success. I also tired to reduce my dataset to only 2 classes which...
https://stackoverflow.com/questions/43204194/cnn-is-not-learning-at-all
python, tensorflow, machine-learning, deep-learning, conv-neural-network
1,491,300,494
se_74792455
stackoverflow
MACHINE_LEARNING
module 'keras.layers' has no attribute 'experimental'
module 'keras.layers' has no attribute 'experimental' hello so I was trying to resize and rescale my dataset as shown below l but I encountered this error: AttributeError: module 'keras.layers' has no attribute 'experimental' resize_and_rescale= tf.keras.Sequential([ layers.experimental.preprocess...
https://stackoverflow.com/questions/74792455/module-keras-layers-has-no-attribute-experimental
python, tensorflow, machine-learning, deep-learning, dataset
1,670,978,629
se_79801643
stackoverflow
MACHINE_LEARNING
AttributeError: 'NoneType' object has no attribute 'blocks' when running Cache-DiT example with Wan2.2 model
AttributeError: 'NoneType' object has no attribute 'blocks' when running Cache-DiT example with Wan2.2 model I’m trying to use Cache-DiT to accelerate inference for the Wan2.2 model. However, when I run the example script, python run_wan_2.2_i2v.py --steps 28 --cache I get the following error. Namespa...
https://stackoverflow.com/questions/79801643/attributeerror-nonetype-object-has-no-attribute-blocks-when-running-cache-d
deep-learning, pytorch, artificial-intelligence
1,761,556,882
se_79778907
stackoverflow
MACHINE_LEARNING
ValueError: Only instances of keras.Layer can be added to a Sequential model when using TensorFlow Hub KerasLayer
ValueError: Only instances of keras.Layer can be added to a Sequential model when using TensorFlow Hub KerasLayer I’m trying to build a Keras Sequential model using a feature extractor from TensorFlow Hub, but I’m running into this error: ValueError: Only instances of `keras.Layer` can be added to a Sequential model. ...
https://stackoverflow.com/questions/79778907/valueerror-only-instances-of-keras-layer-can-be-added-to-a-sequential-model-whe
python, tensorflow, keras, deep-learning
1,759,222,955
se_78137767
stackoverflow
MACHINE_LEARNING
Selection of minibatch size for PPO Reinforcement Learning algorithm
Selection of minibatch size for PPO Reinforcement Learning algorithm PPO algorithm in Deep Reinforcement Learning requires to set the dimension of minibatches. In case of "standard" Deep Learning, a lot of references are available as a guide to the optimal selection, and in general "small" minibatches (up to 32 sample...
https://stackoverflow.com/questions/78137767/selection-of-minibatch-size-for-ppo-reinforcement-learning-algorithm
deep-learning, reinforcement-learning, mini-batch
1,710,111,648
se_79795060
stackoverflow
MACHINE_LEARNING
Pretrained ESRGAN (.pb) gives reddish or purple image — is this a preprocessing issue or model issue?
Pretrained ESRGAN (.pb) gives reddish or purple image — is this a preprocessing issue or model issue? I'm trying to use a pretrained ESRGAN model that I downloaded in .pb format. The model runs without errors, but the output image has a noticeable reddish/purple tint instead of the correct colors. import tensorflow as...
https://stackoverflow.com/questions/79795060/pretrained-esrgan-pb-gives-reddish-or-purple-image-is-this-a-preprocessing
python, tensorflow, image-processing, deep-learning
1,760,975,644
se_72268859
stackoverflow
MACHINE_LEARNING
Externally add a Variable to a model in TensorFlow
Externally add a Variable to a model in TensorFlow I have an existing TensorFlow model, and I want to add a new "parameter" (a tf.Variable) to the model's list of parameters (such that it's trainable) and add it externally to the model's list of parameters / computational graph. One approach that I tried, is to append...
https://stackoverflow.com/questions/72268859/externally-add-a-variable-to-a-model-in-tensorflow
python, tensorflow, deep-learning, neural-network, pytorch
1,652,767,207
se_79788392
stackoverflow
MACHINE_LEARNING
Torch Conv2d results in both dimensions convolved
Torch Conv2d results in both dimensions convolved I have input shape to a convolution (50, 1, 7617, 10). Here, 7617 is word vectors as rows, and 10 is the number of words in columns. I want to convolve column-wise and obtain (2631, 1, 7617, 1), 1 sentence vector obtained by convolving all word vectors through a series...
https://stackoverflow.com/questions/79788392/torch-conv2d-results-in-both-dimensions-convolved
deep-learning, pytorch, neural-network, conv-neural-network, convolution
1,760,247,295
se_79791269
stackoverflow
MACHINE_LEARNING
Utilizing GPU with RNN models which takes it's output as input [torch]
Utilizing GPU with RNN models which takes it's output as input [torch] I have a machine-translation model. In this model, I calculate a vector for a given sentence and I take this vector, aggregate with each generated output of RNN and put it into RNN again for calculating next hidden state and generating next out...
https://stackoverflow.com/questions/79791269/utilizing-gpu-with-rnn-models-which-takes-its-output-as-input-torch
deep-learning, nlp, gpu, torch, multi-gpu
1,760,538,024
se_79777399
stackoverflow
MACHINE_LEARNING
Preventing GPU memory leak due to a custom neural network layer
Preventing GPU memory leak due to a custom neural network layer I am using the MixStyle methodology for domain adaptation, and it involves using a custom layer that is inserted after every encoder stage. However, it is causing VRAM to grow linearly, which causes an OOM error. No memory leak occurs on disabling the lay...
https://stackoverflow.com/questions/79777399/preventing-gpu-memory-leak-due-to-a-custom-neural-network-layer
deep-learning, pytorch, neural-network, computer-vision, semantic-segmentation
1,759,071,642
se_79791036
stackoverflow
MACHINE_LEARNING
Why does the same YOLOv8n-pose model with different weights have significantly different inference speeds?
Why does the same YOLOv8n-pose model with different weights have significantly different inference speeds? I’m testing YOLOv8n-pose models that share the exact same architecture, input size, hardware (GPU), framework, batch size, and precision settings. The only difference between them is the trained weights. However,...
https://stackoverflow.com/questions/79791036/why-does-the-same-yolov8n-pose-model-with-different-weights-have-significantly-d
performance, deep-learning, inference, yolov8, pose-estimation
1,760,523,344
se_60018578
stackoverflow
MACHINE_LEARNING
What does model.eval() do in pytorch?
What does model.eval() do in pytorch? When should I use .eval()? I understand it is supposed to allow me to "evaluate my model". How do I turn it back off for training? Example training code using .eval().
https://stackoverflow.com/questions/60018578/what-does-model-eval-do-in-pytorch
python, machine-learning, deep-learning, pytorch
1,580,572,695
se_58127059
stackoverflow
MACHINE_LEARNING
How to understand masked multi-head attention in transformer
How to understand masked multi-head attention in transformer I'm currently studying the code of transformer, but I can not understand the masked multi-head of decoder. The paper said that it was to prevent you from seeing the generating word, but I can not understand if the words after generating word have not been ge...
https://stackoverflow.com/questions/58127059/how-to-understand-masked-multi-head-attention-in-transformer
tensorflow, machine-learning, deep-learning, transformer-model, attention-model
1,569,552,048
se_75970695
stackoverflow
MACHINE_LEARNING
How to Stacking ML models correctly - Sklearn
How to Stacking ML models correctly - Sklearn I need some help to understand how to build the stack correctly. I started building a Stack right now from only two models: RandomForestRegressor, XGBRegressor. Each model is essentially an independent object. But it is also possible to create a Stack object that consists ...
https://stackoverflow.com/questions/75970695/how-to-stacking-ml-models-correctly-sklearn
python, machine-learning, scikit-learn, deep-learning
1,681,045,680
se_68580717
stackoverflow
MACHINE_LEARNING
How can I solve this issue? input must have 3 dimensions, got 4
How can I solve this issue? input must have 3 dimensions, got 4 The Below is data which I passed to the Data Loader, train_path='/content/drive/MyDrive/Dataset_manual_pytorch/train' test_path='/content/drive/MyDrive/Dataset_manual_pytorch/test' train = torchvision.datasets.ImageFolder(train_path,transform=transformat...
https://stackoverflow.com/questions/68580717/how-can-i-solve-this-issue-input-must-have-3-dimensions-got-4
python-3.x, deep-learning, pytorch
1,627,580,930
se_39460436
stackoverflow
MACHINE_LEARNING
How to create TFRecords file from png images
How to create TFRecords file from png images I'm just started working with TensorFlow a week ago, and I have some basic problems. The major one is that I didn't find a way to create a TFRecords that contains all my data. I understood that this process is necessary in order to train my own network with few millions 32x...
https://stackoverflow.com/questions/39460436/how-to-create-tfrecords-file-from-png-images
database, tensorflow, deep-learning, convolution, tensorflow-serving
1,473,725,206
se_56429967
stackoverflow
MACHINE_LEARNING
How to find prediction probability in given CNN in tensor flow?
How to find prediction probability in given CNN in tensor flow? I am very new to TensorFlow. Let us assume that I already have a trained convolutional neural network, now I give one new data to this CNN, and I want to see what's the prediction probability in each class. (e.g, the CNN is for handwriting 0-2, now I give...
https://stackoverflow.com/questions/56429967/how-to-find-prediction-probability-in-given-cnn-in-tensor-flow
python, tensorflow, deep-learning, conv-neural-network, prediction
1,559,574,050
se_79776858
stackoverflow
MACHINE_LEARNING
Multimodel for image captioning with CNN and LSTM over flickr30k does not learn. How to fuse image features and word embeddings?
Multimodel for image captioning with CNN and LSTM over flickr30k does not learn. How to fuse image features and word embeddings? I'm working on an image captioning project using a simple CNN + LSTM architecture, as required by the course I'm studying. The full code is available here on GitHub (note: some parts are mem...
https://stackoverflow.com/questions/79776858/multimodel-for-image-captioning-with-cnn-and-lstm-over-flickr30k-does-not-learn
python, tensorflow, keras, deep-learning, lstm
1,758,987,253
se_79774394
stackoverflow
MACHINE_LEARNING
Can I visualize a neural network’s loss landscape to see if it’s stuck in a bad minimum? Any code example for this?
Can I visualize a neural network’s loss landscape to see if it’s stuck in a bad minimum? Any code example for this? So, I’m trying to understand why sometimes neural networks get stuck during training. I heard people talk about ‘local minima’ and ‘saddle points,’ but I can’t really picture them. I want to actually see...
https://stackoverflow.com/questions/79774394/can-i-visualize-a-neural-network-s-loss-landscape-to-see-if-it-s-stuck-in-a-bad
python, tensorflow, machine-learning, deep-learning, neural-network
1,758,778,581
se_79766096
stackoverflow
MACHINE_LEARNING
GraphMAE self-supervised learning: node attribute (sampled points) reconstruction works in minimal script but fails in full pipeline
GraphMAE self-supervised learning: node attribute (sampled points) reconstruction works in minimal script but fails in full pipeline I am experimenting with a GraphMAE self-supervised architecture using PyTorch + DGL. In my task, each graph node represents a CAD entity, and one node attribute stores sampled points (co...
https://stackoverflow.com/questions/79766096/graphmae-self-supervised-learning-node-attribute-sampled-points-reconstructio
python, deep-learning, graph-neural-network, self-supervised-learning
1,758,017,506
se_72016494
stackoverflow
MACHINE_LEARNING
Creating a image dataset
Creating a image dataset I have a folder with 38000 images and I'm trying to create a dataset from them to use in a Convolutional LSTM, which supports input in the format of a 5d array (B,T,W,H,C) where B is the number of samples, T is the size of the samples and the rest of the array are the image properties. So far ...
https://stackoverflow.com/questions/72016494/creating-a-image-dataset
python, arrays, machine-learning, deep-learning, data-science
1,650,986,397
se_69526429
stackoverflow
MACHINE_LEARNING
Why do we need 'value', 'key', and 'query' in attention layer?
Why do we need 'value', 'key', and 'query' in attention layer? I am learning basic ideas about the 'Transformer' Model. Based on the paper and tutorial I saw, the 'Attention layer' uses the neural network to get the 'value', the 'key', and the 'query'. Here is the attention layer I learned from...
https://stackoverflow.com/questions/69526429/why-do-we-need-value-key-and-query-in-attention-layer
machine-learning, deep-learning, transformer-model, attention-model, self-attention
1,633,956,312
se_79760189
stackoverflow
MACHINE_LEARNING
Why isn't my keras model throwing and error when different sizes are passed to the dense layer?
Why isn't my keras model throwing and error when different sizes are passed to the dense layer? I am working on a dynamic time series multi-class segmentation problem with keras (tensorflow version 2.12.0), and I wanted to see what would happen when I dropped in a dense layer into the network architecture. My expe...
https://stackoverflow.com/questions/79760189/why-isnt-my-keras-model-throwing-and-error-when-different-sizes-are-passed-to-t
python, tensorflow, machine-learning, keras, deep-learning
1,757,443,996
se_53949880
stackoverflow
MACHINE_LEARNING
Jointly training custom model with Tensorflow Object Detection API
Jointly training custom model with Tensorflow Object Detection API I am trying to use Tensorflow object detection API models in another custom model I built (in the same codebase). Specifically, I am trying to figure out how below can be handled (mutually exclusive points): jointly train Tensorflow object detection ...
https://stackoverflow.com/questions/53949880/jointly-training-custom-model-with-tensorflow-object-detection-api
python, tensorflow, machine-learning, deep-learning, computer-vision
1,545,938,657
se_69367939
stackoverflow
MACHINE_LEARNING
Understanding backpropagation in PyTorch
Understanding backpropagation in PyTorch I am exploring PyTorch, and I do not understand the output of the following example: # Initialize x, y and z to values 4, -3 and 5 x = torch.tensor(4., requires_grad = True) y = torch.tensor(-3., requires_grad = True) z = torch.tensor(5., requires_grad = True) # Set q to sum ...
https://stackoverflow.com/questions/69367939/understanding-backpropagation-in-pytorch
python, deep-learning, neural-network, pytorch, backpropagation
1,632,859,822
se_70344059
stackoverflow
MACHINE_LEARNING
OSError: Unable to open file (file signature not found)
OSError: Unable to open file (file signature not found) I am currently doing an assignment on deep learning by downloading the assignment files from github. import numpy as np import matplotlib.pyplot as plt import h5py import scipy from PIL import Image from scipy import ndimage from lr_utils import load_dataset %ma...
https://stackoverflow.com/questions/70344059/oserror-unable-to-open-file-file-signature-not-found
python-3.x, deep-learning, jupyter-notebook, h5py
1,639,458,601
se_44483233
stackoverflow
MACHINE_LEARNING
Is using batch size as 'powers of 2' faster on tensorflow?
Is using batch size as 'powers of 2' faster on tensorflow? I read from somewhere that if you choose a batch size that is a power 2, training will be faster. What is this rule? Is this applicable to other applications? Can you provide a reference paper?
https://stackoverflow.com/questions/44483233/is-using-batch-size-as-powers-of-2-faster-on-tensorflow
tensorflow, machine-learning, deep-learning, batchsize
1,497,179,856
se_79751915
stackoverflow
MACHINE_LEARNING
PyTorch XPU training loop memory leak despite explicit cleanup (gc.collect, torch.xpu.empty_cache)
PyTorch XPU training loop memory leak despite explicit cleanup (gc.collect, torch.xpu.empty_cache) I’m training a RVC which use HIFI-GAN-style speech model on Intel XPU (PyTorch 2.3, oneAPI backend). During training, my GPU/XPU memory usage keeps growing with each batch until OOM, even though I explicitly delete tenso...
https://stackoverflow.com/questions/79751915/pytorch-xpu-training-loop-memory-leak-despite-explicit-cleanup-gc-collect-torc
machine-learning, deep-learning, pytorch
1,756,660,623
se_75701948
stackoverflow
MACHINE_LEARNING
How to merge many data frames to only one
How to merge many data frames to only one I have directory that has many folders inside each folder has (images folder & labels text) and I want to combine them to one dataframe file by concatnating folders name with images name to make them uinque names . The structuer of my directory like below : $ tree . ├── sampl...
https://stackoverflow.com/questions/75701948/how-to-merge-many-data-frames-to-only-one
python, json, pandas, dataframe, deep-learning
1,678,492,427
se_42689345
stackoverflow
MACHINE_LEARNING
Subset of Imagenet Dataset for image classification
Subset of Imagenet Dataset for image classification I need an annotated dataset, subset of Imagenet, that includes square images of size: 224x224. I tried Tiny Imagenet and Cifar-10, but they consist of quite smaller images and don't fit my needs. Is there anything similar available? I cannot use the entire Imagenet...
https://stackoverflow.com/questions/42689345/subset-of-imagenet-dataset-for-image-classification
image, machine-learning, dataset, deep-learning, conv-neural-network
1,489,045,023
se_79748706
stackoverflow
MACHINE_LEARNING
Gradcam with ResNet-50 Error: The name "input_layer_1" is used 2 times in the model. All operation names should be unique
Gradcam with ResNet-50 Error: The name "input_layer_1" is used 2 times in the model. All operation names should be unique I am new to the implementation of Gradcam, and having a trouble with it. I have created a model img_shape = (256, 256, 3) base_model = ResNet50(include_top=False, ...
https://stackoverflow.com/questions/79748706/gradcam-with-resnet-50-error-the-name-input-layer-1-is-used-2-times-in-the-mo
deep-learning, resnet, gradienttape, gradcam
1,756,362,044
se_79747243
stackoverflow
MACHINE_LEARNING
KFold cross-validation in Keras: model not resetting between folds (MobileNet backbone)
KFold cross-validation in Keras: model not resetting between folds (MobileNet backbone) I am trying to perform KFold cross-validation on a Keras model. The first fold runs exactly as expected, but from the second fold onwards the model doesn’t seem to reset. The training behaves strangely, as if the weights from the p...
https://stackoverflow.com/questions/79747243/kfold-cross-validation-in-keras-model-not-resetting-between-folds-mobilenet-ba
python, tensorflow, keras, deep-learning, neural-network
1,756,236,458
se_79746857
stackoverflow
MACHINE_LEARNING
Why does MATLAB selfAttentionLayer give different parameter counts for head/key-channel pairs with the same total key dimension?
Why does MATLAB selfAttentionLayer give different parameter counts for head/key-channel pairs with the same total key dimension? I’m experimenting with the MathWorks example that inserts a multi-head self-attention layer into a simple CNN for the DigitDataset: Link to example layers = [ imageInputLayer([28 28 1]) ...
https://stackoverflow.com/questions/79746857/why-does-matlab-selfattentionlayer-give-different-parameter-counts-for-head-key
matlab, deep-learning, conv-neural-network, self-attention, multihead-attention
1,756,212,685
se_56818719
stackoverflow
MACHINE_LEARNING
Getting error to fit a Conv1d to classify diabetic patients using the Pima Indian diabetes data set using keras in R
Getting error to fit a Conv1d to classify diabetic patients using the Pima Indian diabetes data set using keras in R I am new to the machine learning field. I was using keras package in R to classify the diabetic individuals, using the Pima Indian diabetes dataset and fitting a Conv1d. I am not sure where I am doing t...
https://stackoverflow.com/questions/56818719/getting-error-to-fit-a-conv1d-to-classify-diabetic-patients-using-the-pima-india
r, machine-learning, deep-learning
1,561,821,948
se_79745664
stackoverflow
MACHINE_LEARNING
Layer "dense" expects 1 input(s), but it received 2 input tensors
Layer "dense" expects 1 input(s), but it received 2 input tensors Environment Raspberry Pi 4: 8 GB RAM Relevant Dependencies: keras 3.11.3 numpy 1.26.4 opencv-python 4.12.0.88 pillow 11.3.0 tensorflow 2.20.0 Issue Trained MobileNetV...
https://stackoverflow.com/questions/79745664/layer-dense-expects-1-inputs-but-it-received-2-input-tensors
tensorflow, deep-learning, raspberry-pi, valueerror
1,756,120,182
se_79744026
stackoverflow
MACHINE_LEARNING
Ram Memory leak when scripting a Sampling Trainer for a Bert Encoder and LSTM Decoder Tensorflow on GPU
Ram Memory leak when scripting a Sampling Trainer for a Bert Encoder and LSTM Decoder Tensorflow on GPU I wrote the module attached below. However, I notice a constant increase of RAM until I get an out of memory error. The code runs on CPU without a problem (except the slow training time). It can finish the first tra...
https://stackoverflow.com/questions/79744026/ram-memory-leak-when-scripting-a-sampling-trainer-for-a-bert-encoder-and-lstm-de
python, python-3.x, tensorflow, deep-learning, lstm
1,755,927,646
se_79741908
stackoverflow
MACHINE_LEARNING
Calculating the partial derivative of PyTorch model output with respect to neurons pre-activation
Calculating the partial derivative of PyTorch model output with respect to neurons pre-activation I am working on neuron importance for ANNs (in a classification setting). A simple baseline is the partial derivative of the model output for the correct class with respect to the given neuron pre-activation. My goal is t...
https://stackoverflow.com/questions/79741908/calculating-the-partial-derivative-of-pytorch-model-output-with-respect-to-neuro
python, machine-learning, deep-learning, pytorch
1,755,757,301
se_51433378
stackoverflow
MACHINE_LEARNING
What does model.train() do in PyTorch?
What does model.train() do in PyTorch? Does it call forward() in nn.Module? I thought when we call the model, forward method is being used. Why do we need to specify train()?
https://stackoverflow.com/questions/51433378/what-does-model-train-do-in-pytorch
python, machine-learning, deep-learning, pytorch
1,532,045,400
se_79621906
stackoverflow
MACHINE_LEARNING
Error about attention in the last yolo version
Error about attention in the last yolo version When I want to use YOLO12 in inference, I get this error: --------------------------------------------------------------------------- AttributeError Traceback (most recent call last) <ipython-input-16-65468ee2f515> in <cell line: 0>() ----> 1 ...
https://stackoverflow.com/questions/79621906/error-about-attention-in-the-last-yolo-version
python, deep-learning, pytorch, yolo, ultralytics
1,747,239,904
se_71789376
stackoverflow
MACHINE_LEARNING
How to convert yolo annotations to coco format. Json?
How to convert yolo annotations to coco format. Json? I want to convert my labels in yolo format to coco format I have tried https://github.com/Taeyoung96/Yolo-to-COCO-format-converter And Pylabel They all have a bugs. I want to train on detectron 2 but it fails to load the dataset because of the wrong json file.
https://stackoverflow.com/questions/71789376/how-to-convert-yolo-annotations-to-coco-format-json
machine-learning, deep-learning, object-detection, data-annotations, annotation-processing
1,649,368,498
se_79718146
stackoverflow
MACHINE_LEARNING
JAX lax.scan: How to iterate over layers and memory slices simultaneously without dynamic indexing in a multi-layer RNN structure?
JAX lax.scan: How to iterate over layers and memory slices simultaneously without dynamic indexing in a multi-layer RNN structure? I'm trying to implement a framework that manages RNN networks with an arbitrary number of layers (it's all part of a library I'm building based on jax/equinox), the problem is that I can't...
https://stackoverflow.com/questions/79718146/jax-lax-scan-how-to-iterate-over-layers-and-memory-slices-simultaneously-withou
python, deep-learning, recurrent-neural-network, jax, equinox
1,753,766,278
se_79736455
stackoverflow
MACHINE_LEARNING
Replacing WideResNet50 with EfficientNetV2-M in GLASS defect detection model causes Module layer2 not found in the model
Replacing WideResNet50 with EfficientNetV2-M in GLASS defect detection model causes Module layer2 not found in the model I’m using the GLASS defect detection model and want to replace its default wideresnet50 backbone with efficientnetv2_m in shell/run-custom.sh.However, when I run bash run-custom.sh I get the follow...
https://stackoverflow.com/questions/79736455/replacing-wideresnet50-with-efficientnetv2-m-in-glass-defect-detection-model-cau
machine-learning, deep-learning, pytorch, computer-vision, artificial-intelligence
1,755,263,394
se_79736231
stackoverflow
MACHINE_LEARNING
How do I format my a tensorflow dataset for a multi output model?
How do I format my a tensorflow dataset for a multi output model? I have an image dataset where each image has multiple categorical features that I want to predict. I am getting this error when trying to train: ValueError: y_true and y_pred have different structures. y_true: * y_pred: ['*', '*', '*', '*'] Here's is m...
https://stackoverflow.com/questions/79736231/how-do-i-format-my-a-tensorflow-dataset-for-a-multi-output-model
python, tensorflow, machine-learning, keras, deep-learning
1,755,246,327
se_55447901
stackoverflow
MACHINE_LEARNING
ValueError: Error when checking target: expected dense_8 to have 4 dimensions, but got array with shape (37800, 10, 10)
ValueError: Error when checking target: expected dense_8 to have 4 dimensions, but got array with shape (37800, 10, 10) I'm a beginner at machine learning. I am working on mnist dataset which I downloaded from kaggle. I am making this very first project by the help of a tutorial. But I'm facing this issue which I am u...
https://stackoverflow.com/questions/55447901/valueerror-error-when-checking-target-expected-dense-8-to-have-4-dimensions-b
machine-learning, deep-learning, mnist
1,554,090,756
se_79653092
stackoverflow
MACHINE_LEARNING
CNN Constant Predictions
CNN Constant Predictions I’m building a Keras model based on MobileNetV2 for frame-level prediction of 6 human competencies. Each output head represents a competency and is a softmax over 100 classes (scores 0–99). The model takes in 224x224 RGB frames, normalized to [-1, 1] (compatible with MobileNetV2 preprocessing)...
https://stackoverflow.com/questions/79653092/cnn-constant-predictions
python, tensorflow, machine-learning, deep-learning, conv-neural-network
1,749,051,612
se_41488279
stackoverflow
MACHINE_LEARNING
Neural network always predicts the same class
Neural network always predicts the same class I'm trying to implement a neural network that classifies images into one of the two discrete categories. The problem is, however, that it currently always predicts 0 for any input and I'm not really sure why. Here's my feature extraction method: def extract(file): # ...
https://stackoverflow.com/questions/41488279/neural-network-always-predicts-the-same-class
python-3.x, numpy, neural-network, deep-learning, gradient-descent
1,483,628,815
se_66750391
stackoverflow
MACHINE_LEARNING
RuntimeError: view size is not compatible with input tensor&#39;s size and stride (at least one dimension spans across two contiguous subspaces)
RuntimeError: view size is not compatible with input tensor&#39;s size and stride (at least one dimension spans across two contiguous subspaces) I am using Pytorch. I got this RuntimeError while evaluating a model. Any idea how to solve this?
https://stackoverflow.com/questions/66750391/runtimeerror-view-size-is-not-compatible-with-input-tensors-size-and-stride-a
python, machine-learning, deep-learning, pytorch, computer-vision
1,616,431,812
se_54157205
stackoverflow
MACHINE_LEARNING
Why Confusion Maxtrix and Model ACC are different
Why Confusion Maxtrix and Model ACC are different Currently, we are building the Confusion Matrix using CNN, which is different from Model Acc. Model ACC is 92.3% when 51% accuracy is calculated using the Confusion Matrix. Which of the following should be true for Model ACC and Confusion Matrix in this case? And ho...
https://stackoverflow.com/questions/54157205/why-confusion-maxtrix-and-model-acc-are-different
keras, deep-learning, conv-neural-network, confusion-matrix
1,547,273,430
se_62986313
stackoverflow
MACHINE_LEARNING
keras 2.4. producing completely different output than 2.3.1
keras 2.4. producing completely different output than 2.3.1 I am trying to implement autoencoders. Using MNIST dataset, I am first encoding the images and then decoding them. When I use keras version 2.3.1 I am getting decoded Images very close to original but on using Keras 2.4.3 and no change to code I am getting co...
https://stackoverflow.com/questions/62986313/keras-2-4-producing-completely-different-output-than-2-3-1
python, tensorflow, machine-learning, keras, deep-learning
1,595,197,223
se_37407574
stackoverflow
MACHINE_LEARNING
What do BACKEND and SCALE mean in data layer definition?
What do BACKEND and SCALE mean in data layer definition? I'm new to Caffe and I am following MNIST handwritten digits recognize example. When seeing layer { name: "mnist" type: "Data" transform_param { scale: 0.00390625 } data_param { source: "mnist_train_lmdb" backend: LMDB batch_size: 64 ...
https://stackoverflow.com/questions/37407574/what-do-backend-and-scale-mean-in-data-layer-definition
neural-network, protocol-buffers, deep-learning, caffe
1,464,076,719
se_67770595
stackoverflow
MACHINE_LEARNING
How to extract the hidden vector (the output of the ReLU after the third encoder layer) as the image representation
How to extract the hidden vector (the output of the ReLU after the third encoder layer) as the image representation I am implementing an autoencoder using the Fashion MNIST dataset. The code for the encoder- class MNISTClassifier(Model): def __init__(self): super(MNISTClassifier, self).__init__() s...
https://stackoverflow.com/questions/67770595/how-to-extract-the-hidden-vector-the-output-of-the-relu-after-the-third-encoder
tensorflow, keras, deep-learning, tensorflow2.0, autoencoder
1,622,451,050
se_79725054
stackoverflow
MACHINE_LEARNING
RuntimeError in torch.cat during VACE-Wan2.1 inference: mask and video tensor shape mismatch
RuntimeError in torch.cat during VACE-Wan2.1 inference: mask and video tensor shape mismatch I'm using the Wan2.1-VACE video generation model, and during inference I encountered a RuntimeError related to mismatched tensor shapes in a torch.cat operation inside the vace_latent() function. From the debug output: src_vid...
https://stackoverflow.com/questions/79725054/runtimeerror-in-torch-cat-during-vace-wan2-1-inference-mask-and-video-tensor-sh
python, machine-learning, deep-learning, pytorch, computer-vision
1,754,318,209
se_79719714
stackoverflow
MACHINE_LEARNING
Saving embeddings from encoder efficiently with fast random access
Saving embeddings from encoder efficiently with fast random access I have embeddings (about 160 Million) that I created with a BERT-based encoder model. Right now they are in a .pt format and takes about 500GB in the disk. I want 2 things: To save them in an efficient way if possible (minimum disk space as possible) ...
https://stackoverflow.com/questions/79719714/saving-embeddings-from-encoder-efficiently-with-fast-random-access
data-structures, deep-learning, nlp, word-embedding, encoder
1,753,867,885
se_56640990
stackoverflow
MACHINE_LEARNING
How to match the output shape of generator and the input shape of discriminator in GAN?
How to match the output shape of generator and the input shape of discriminator in GAN? I am working on my first GANs model, I've followed Tensorflow's official documentation using MNIST dataset. I've run it smoothly. I tried to replace MNIST with my own dataset, I've prepared it to match the same size as MNIST: 28 * ...
https://stackoverflow.com/questions/56640990/how-to-match-the-output-shape-of-generator-and-the-input-shape-of-discriminator
python, tensorflow, keras, neural-network, deep-learning
1,560,824,690
se_77237582
stackoverflow
MACHINE_LEARNING
Highly imbalanced Alzheimer&#39;s Disease MRI image dataset
Highly imbalanced Alzheimer&#39;s Disease MRI image dataset I am currently doing my final year project and I need your humble opinion. My dataset consists of 4 classes which contain : Mild demented - 896 images Moderate demented - 64 images Non demented - 3200 images Very Mild demented - 2240 images As you can see, my...
https://stackoverflow.com/questions/77237582/highly-imbalanced-alzheimers-disease-mri-image-dataset
image, deep-learning, data-augmentation, imbalanced-data, smote
1,696,512,546
se_71962563
stackoverflow
MACHINE_LEARNING
How are the nodes/units in the output layer of NN assigned to the classes?
How are the nodes/units in the output layer of NN assigned to the classes? I am learning deep Learning and I keep wondering how are the nodes/units in the output layer of NN assigned to the classes because we don't usually indicate manually which neuron/node to represent which class label? For e.g., for MNIST dataset ...
https://stackoverflow.com/questions/71962563/how-are-the-nodes-units-in-the-output-layer-of-nn-assigned-to-the-classes
deep-learning, neural-network
1,650,591,498
se_79722074
stackoverflow
MACHINE_LEARNING
MNIST multi digit prediction
MNIST multi digit prediction I tried to train a model on mnist dataset. It's working fine for single digit prediction and I got 96.92% accuracy on test data too but I have everything but it's not working for multidigit. even though I took an image with spacing in between and it was able to split and preprocess it prop...
https://stackoverflow.com/questions/79722074/mnist-multi-digit-prediction
python, machine-learning, deep-learning, mnist
1,754,024,484
se_77200057
stackoverflow
MACHINE_LEARNING
Test Accuracy and ConfMatrix dont match up?
Test Accuracy and ConfMatrix dont match up? I'm doing the "hello world" project involving the MNIST dataset. But by test accuracy doesn't seem to match with the diagonal of my confusion matrix. I'm not sure if I have a bug somewhere that's causing this or if my accuracy function is not correct. Here is the model: clas...
https://stackoverflow.com/questions/77200057/test-accuracy-and-confmatrix-dont-match-up
python, deep-learning, neural-network, classification, mnist
1,695,971,432
se_79559122
stackoverflow
MACHINE_LEARNING
OSError: Qwen/Qwen2.5-VL-7B-Instruct does not appear to have files named model-00002-of-00005.safetensors despite having the file locally
OSError: Qwen/Qwen2.5-VL-7B-Instruct does not appear to have files named model-00002-of-00005.safetensors despite having the file locally I'm trying to use the Qwen2.5-VL-7B model for my project, and I've downloaded a local file named model-00002-of-00005.safetensors. However, when I run my code, I encounter the follo...
https://stackoverflow.com/questions/79559122/oserror-qwen-qwen2-5-vl-7b-instruct-does-not-appear-to-have-files-named-model-0
python, deep-learning, pytorch, fine-tuning, oserror
1,744,003,354