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_46065445 | stackoverflow | MACHINE_LEARNING | Selecting number of strides and filters in CNN (Keras) | Selecting number of strides and filters in CNN (Keras)
I am using keras to build a cnn model for signal classification. What is the best way in keras for hyper parameter tuning and selection for the number of strides,and number filters. | https://stackoverflow.com/questions/46065445/selecting-number-of-strides-and-filters-in-cnn-keras | machine-learning, keras, deep-learning, conv-neural-network | 1,504,661,162 |
se_79274184 | stackoverflow | MACHINE_LEARNING | How to split and spelling correct arabic text without spaces into list of words | How to split and spelling correct arabic text without spaces into list of words
I'm looking for a way to split the Arabic text and correct the spelling. Whitespace is the first splitting criterion, then, Maybe based on a dictionary of correct words the splitting should done, considering spelling issues:
تشرابالقطط الح... | https://stackoverflow.com/questions/79274184/how-to-split-and-spelling-correct-arabic-text-without-spaces-into-list-of-words | algorithm, deep-learning, nlp | 1,733,988,889 |
se_79307970 | stackoverflow | MACHINE_LEARNING | Distributed training with Trainer and ConstantLengthDataset classes | Distributed training with Trainer and ConstantLengthDataset classes
I have a custom ConstantLengthDataset class:
class ConstantLengthDataset(IterableDataset):
def __init__(
self,
tokenizer,
dataset,
infinite=False,
seq_length=8192,
num_of_sequences=1024,
c... | https://stackoverflow.com/questions/79307970/distributed-training-with-trainer-and-constantlengthdataset-classes | deep-learning, pytorch, gpu, distributed-computing | 1,735,143,922 |
se_73992681 | stackoverflow | MACHINE_LEARNING | ImportError: cannot import name 'StableDiffusionPipeline' from 'diffusers' | ImportError: cannot import name 'StableDiffusionPipeline' from 'diffusers'
ImportError : Traceback (most recent call last) Input In [96],
in <cell line: 3>()
1 import torch
2 from torch import autocast
----> 3 from diffusers import StableDiffusionPipeline
ImportError: cannot import name 'StableDiffusio... | https://stackoverflow.com/questions/73992681/importerror-cannot-import-name-stablediffusionpipeline-from-diffusers | python, deep-learning | 1,665,177,641 |
se_79232257 | stackoverflow | MACHINE_LEARNING | How to Log Training Loss at Step Zero in Hugging Face Trainer or SFT Trainer? | How to Log Training Loss at Step Zero in Hugging Face Trainer or SFT Trainer?
I'm using the Hugging Face Trainer (or SFTTrainer) for fine-tuning, and I want to log the training loss at step 0 (before any training steps are executed). I know there's an eval_on_start option for evaluation, but I couldn't find a direct e... | https://stackoverflow.com/questions/79232257/how-to-log-training-loss-at-step-zero-in-hugging-face-trainer-or-sft-trainer | machine-learning, deep-learning, huggingface-transformers, huggingface, huggingface-trainer | 1,732,753,415 |
se_76844722 | stackoverflow | MACHINE_LEARNING | GNN adaptability to different number of node as input graph | GNN adaptability to different number of node as input graph
I am looking at methods for GNN to process GNN based on entity graph generated on objects on the image. Node represent each object and edge is connected between two nodes if two objects' Euclidean distance is lower than a threshold. Let's say the Graph is rep... | https://stackoverflow.com/questions/76844722/gnn-adaptability-to-different-number-of-node-as-input-graph | deep-learning, neural-network, graph-neural-network, gnn | 1,691,303,979 |
se_71123148 | stackoverflow | MACHINE_LEARNING | Pytorch Geometric Datasets | Pytorch Geometric Datasets
I need your help. I have two set of graph structured data, one from Open Graph Benchmark (OGB) and another created with torch_geometric.data.Dataset from my own data . The data looks like:
Data(edge_index=[2, 88], edge_attr=[88, 3], x=[39, 9], y=[1, 1]) #OGB
Data(x=[23, 9], edge_index=[2, ... | https://stackoverflow.com/questions/71123148/pytorch-geometric-datasets | python, deep-learning, dataset, pytorch-geometric | 1,644,913,460 |
se_79305311 | stackoverflow | MACHINE_LEARNING | Keras Attention layer not returning attention scores | Keras Attention layer not returning attention scores
I'm using keras=3.7.0 and trying to implement a custom Temporal Convolutional Attention Network (TCAN) block. While the Attention layer works in a standalone test case, I encounter an issue when integrating it into my custom model. Specifically, the error occurs whe... | https://stackoverflow.com/questions/79305311/keras-attention-layer-not-returning-attention-scores | python, tensorflow, keras, deep-learning | 1,735,034,927 |
se_66720722 | stackoverflow | MACHINE_LEARNING | Autoencoder outputs B&W images from color | Autoencoder outputs B&W images from color
We are in the process of training an AE on CIFAR10 images. We used the following architecture:
class OurAE(nn.Module):
def __init__(self, in_channels, z_channels):
super(OurAE, self).__init__()
self.tot_diff = None
self.in_channels = in_... | https://stackoverflow.com/questions/66720722/autoencoder-outputs-bw-images-from-color | python, numpy, deep-learning, pytorch, autoencoder | 1,616,237,519 |
se_49433936 | stackoverflow | MACHINE_LEARNING | How do I initialize weights in PyTorch? | How do I initialize weights in PyTorch?
How do I initialize weights and biases of a network (via e.g. He or Xavier initialization)? | https://stackoverflow.com/questions/49433936/how-do-i-initialize-weights-in-pytorch | python, machine-learning, deep-learning, neural-network, pytorch | 1,521,736,482 |
se_74415536 | stackoverflow | MACHINE_LEARNING | Convolutional layer: does the filter convolves also trough the nlayers_in or it take all the dimensions? | Convolutional layer: does the filter convolves also trough the nlayers_in or it take all the dimensions?
In the leading DeepLearning libraries, does the filter (aka kernel or weight) in the convolutional layer convolves also across the "channel" dimension or does it take all the channels at once?
To make an example, i... | https://stackoverflow.com/questions/74415536/convolutional-layer-does-the-filter-convolves-also-trough-the-nlayers-in-or-it | deep-learning, conv-neural-network | 1,668,277,911 |
se_44249115 | stackoverflow | MACHINE_LEARNING | Does one convolutional filter always have different coefficients for each of the channels of the previous layer? | Does one convolutional filter always have different coefficients for each of the channels of the previous layer?
For example, we have RGB-image with 3 channels (Red, Green, Blue). And we use convolutional neural network.
Does each convolutional filter always have 3 different coefficients for each of the channels (R,G... | https://stackoverflow.com/questions/44249115/does-one-convolutional-filter-always-have-different-coefficients-for-each-of-the | neural-network, deep-learning, conv-neural-network, convolution, cudnn | 1,496,085,055 |
se_79300055 | stackoverflow | MACHINE_LEARNING | What should be my classifier in Transfer Learning using MaxViT? | What should be my classifier in Transfer Learning using MaxViT?
I am trying to do transfer learning on Pytorch pretrained models with custom dataset. I have been able to successfully perform transfer learning with SqueezeNet.
For Squeezenet my classifier was, layers source
model.classifier = nn.Sequential(
nn.Drop... | https://stackoverflow.com/questions/79300055/what-should-be-my-classifier-in-transfer-learning-using-maxvit | machine-learning, deep-learning, pytorch, transfer-learning, torchvision | 1,734,812,689 |
se_79300141 | stackoverflow | MACHINE_LEARNING | Yolov11 model running slow through webcam | Yolov11 model running slow through webcam
I'm using yolov11 to train a model to recognize a toy truck. I followed the steps in this EXCELLENT youtube video, and I have a working model build off of yolov11m.pt.
I'm using the following admittedly naaive script to launch a stream from my webcam and pass captured images t... | https://stackoverflow.com/questions/79300141/yolov11-model-running-slow-through-webcam | python, opencv, deep-learning, object-detection, yolov5 | 1,734,816,401 |
se_66513819 | stackoverflow | MACHINE_LEARNING | Obtain the output of intermediate layer (Functional API) and use it in SubClassed API | Obtain the output of intermediate layer (Functional API) and use it in SubClassed API
In the keras doc, it says that if we want to pick the intermediate layer's output of the model (sequential and functional), all we need to do as follows:
model = ... # create the original model
layer_name = 'my_layer'
intermediate_... | https://stackoverflow.com/questions/66513819/obtain-the-output-of-intermediate-layer-functional-api-and-use-it-in-subclasse | python, tensorflow, keras, deep-learning | 1,615,098,431 |
se_78251318 | stackoverflow | MACHINE_LEARNING | Optuna Hyperband Algorithm Not Following Expected Model Training Scheme | Optuna Hyperband Algorithm Not Following Expected Model Training Scheme
I have observed an issue while using the Hyperband algorithm in Optuna. According to the Hyperband algorithm, when min_resources = 5, max_resources = 20, and reduction_factor = 2, the search should start with an initial space of 4 models for brack... | https://stackoverflow.com/questions/78251318/optuna-hyperband-algorithm-not-following-expected-model-training-scheme | python, machine-learning, deep-learning, sequential, optuna | 1,711,888,687 |
se_79297855 | stackoverflow | MACHINE_LEARNING | Improving Accuracy | Improving Accuracy
I am working on testing accuracy and performance using deep learning models on a complex dataset but I have reached a good accuracy but I need to improve it so any suggestions other than what I did(feature selection ,Information Gain, Recursive feature elimination (RFE) , Random Forest Important Sco... | https://stackoverflow.com/questions/79297855/improving-accuracy | deep-learning, tensorflow-datasets, imbalanced-data | 1,734,712,358 |
se_78733059 | stackoverflow | MACHINE_LEARNING | Broadcasting multiple versions of X_data that pair with the same y_data | Broadcasting multiple versions of X_data that pair with the same y_data
My deep learning architecture accepts an input vector with size 512 and an output vector with size 512 too.
The problem is I have X_data version that pairs with the same y_data.
I have these tensors:
(4, 8, 512) -> (batch_size, number of X_data ve... | https://stackoverflow.com/questions/78733059/broadcasting-multiple-versions-of-x-data-that-pair-with-the-same-y-data | python, numpy, tensorflow, keras, deep-learning | 1,720,654,708 |
se_55320567 | stackoverflow | MACHINE_LEARNING | Validation loss increases after 3 epochs but validation accuracy keeps increasing | Validation loss increases after 3 epochs but validation accuracy keeps increasing
Training and validation is healthy for 2 epochs but after 2-3 epochs the Val_loss keeps increasing while the Val_acc keeps increasing.
I'm trying to train a CNN model to classify a given review to a single class of 1-5. Therefore, I cons... | https://stackoverflow.com/questions/55320567/validation-loss-increases-after-3-epochs-but-validation-accuracy-keeps-increasin | python, tensorflow, deep-learning, classification, multilabel-classification | 1,553,399,364 |
se_79287712 | stackoverflow | MACHINE_LEARNING | How does ConvTranspose in pytorch with groups > 1 work? | How does ConvTranspose in pytorch with groups > 1 work?
I'm trying to understand the workflow of convtranspose of pytorch with groups > 1 , mainly focusing on the calculation process between grouped transposeconv weights and padded input, I've experimented with my code, but I cant understand how the result was calc... | https://stackoverflow.com/questions/79287712/how-does-convtranspose-in-pytorch-with-groups-1-work | python, deep-learning, pytorch | 1,734,435,500 |
se_79290909 | stackoverflow | MACHINE_LEARNING | How do batches in Hugging Face transformers internally work? | How do batches in Hugging Face transformers internally work?
While using hugging face transformers, when calling the .generate, how are the input prombt internally executed? and how does batch size make a difference? For instance, input dimension (1,128) vs (10, 128).
My assumption is that it's parallelized and not se... | https://stackoverflow.com/questions/79290909/how-do-batches-in-hugging-face-transformers-internally-work | deep-learning, pytorch, parallel-processing, huggingface-transformers, llama | 1,734,521,206 |
se_58676082 | stackoverflow | MACHINE_LEARNING | How to make TensorFlow use 100% of GPU? | How to make TensorFlow use 100% of GPU?
I have a laptop that has an RTX 2060 GPU and I am using Keras and TF 2 to train an LSTM on it. I am also monitoring the gpu use by nvidia-smi and I noticed that the jupyter notebook and TF are using maximum 35% and usually the gpu is being used between 10-25%.
With current cond... | https://stackoverflow.com/questions/58676082/how-to-make-tensorflow-use-100-of-gpu | tensorflow, keras, deep-learning, gpu, nvidia | 1,572,736,441 |
se_79289908 | stackoverflow | MACHINE_LEARNING | What's the relationship between the weight of transposeconv and its corresponding conv given groups > 1? | What's the relationship between the weight of transposeconv and its corresponding conv given groups > 1?
I'm simulating the workflow of convtranspose function in pytorch, thus I'm thinking of setting the weight of grouped convtranspose to its corresponding grouped conv, and I have tested like this:
import torch... | https://stackoverflow.com/questions/79289908/whats-the-relationship-between-the-weight-of-transposeconv-and-its-correspondin | python, deep-learning, pytorch | 1,734,492,426 |
se_79279472 | stackoverflow | MACHINE_LEARNING | Contrastive Loss from Scratch | Contrastive Loss from Scratch
I am trying to implement/learn how to implement contrastive loss. Currently my gradients are exploding into infinity and I think I must have misimplemented something. I was wondering if someone could take a look at my loss function and tell if they see an error
class ContrastiveLoss(nn.Mo... | https://stackoverflow.com/questions/79279472/contrastive-loss-from-scratch | deep-learning, pytorch, artificial-intelligence, loss-function, self-supervised-learning | 1,734,120,984 |
se_79264683 | stackoverflow | MACHINE_LEARNING | Error loading Pytorch model checkpoint: _pickle.UnpicklingError: invalid load key, '\x1f' | Error loading Pytorch model checkpoint: _pickle.UnpicklingError: invalid load key, '\x1f'
I'm trying to load the weights of a Pytorch model but getting this error: _pickle.UnpicklingError: invalid load key, '\x1f'.
Here is the weights loading code:
import os
import torch
import numpy as np
# from data_loader i... | https://stackoverflow.com/questions/79264683/error-loading-pytorch-model-checkpoint-pickle-unpicklingerror-invalid-load-ke | python, deep-learning, pytorch, pickle, torch | 1,733,741,249 |
se_79280773 | stackoverflow | MACHINE_LEARNING | RuntimeError: Trying to backward through the graph a second time on loss tensor | RuntimeError: Trying to backward through the graph a second time on loss tensor
I have the following training code. I am quite sure I call loss.backward() just once, and yet I am getting the error from the title. What am I doing wrong? Note that the X_train_tensor is output from another graph calculation, so it has re... | https://stackoverflow.com/questions/79280773/runtimeerror-trying-to-backward-through-the-graph-a-second-time-on-loss-tensor | python, deep-learning, pytorch, tensor, autograd | 1,734,185,519 |
se_79284381 | stackoverflow | MACHINE_LEARNING | How to calculate similarity/distance in a Siamese network (pytorch) | How to calculate similarity/distance in a Siamese network (pytorch)
How exactly do you calculate the similarity/distance in a Siamese network, and classify them after?
This is my current attempt
class SiameseNetwork(nn.Module):
def __init__(self) -> None:
super().__init__()
self.resnet = torchvisio... | https://stackoverflow.com/questions/79284381/how-to-calculate-similarity-distance-in-a-siamese-network-pytorch | python, deep-learning, pytorch | 1,734,345,713 |
se_79281681 | stackoverflow | MACHINE_LEARNING | How to correctly apply LayerNorm after MultiheadAttention with different input shapes (batch_first vs default) in PyTorch? | How to correctly apply LayerNorm after MultiheadAttention with different input shapes (batch_first vs default) in PyTorch?
I’m working on an audio recognition task using a Transformer-based model in PyTorch. My input features are generated by a CNN-based embedding layer and have the shape [batch_size, d_model, n_token... | https://stackoverflow.com/questions/79281681/how-to-correctly-apply-layernorm-after-multiheadattention-with-different-input-s | audio, deep-learning, pytorch, transformer-model, pattern-recognition | 1,734,227,099 |
se_50762466 | stackoverflow | MACHINE_LEARNING | Debugging GAN covergence | Debugging GAN covergence
Building a GAN to generate images. The images have 3 color channels, 96 x 96.
The images that are generated by the generator at the beginning are all black, which is an issue given that is statistically highly unlikely.
Also, the loss for both networks is not improving.
I have posted the entir... | https://stackoverflow.com/questions/50762466/debugging-gan-covergence | python, deep-learning, pytorch, neural-network, generative-adversarial-network | 1,528,466,809 |
se_60498676 | stackoverflow | MACHINE_LEARNING | Facing this error while classifying Images, containing 10 classes in pytorch, in ResNet50. My code is: | Facing this error while classifying Images, containing 10 classes in pytorch, in ResNet50. My code is:
This is the code I am implementing: I am using a subset of the CalTech256 dataset to classify images of 10 different kinds of animals. We will go over the dataset preparation, data augmentation and then steps to buil... | https://stackoverflow.com/questions/60498676/facing-this-error-while-classifying-images-containing-10-classes-in-pytorch-in | python, deep-learning, pytorch, computer-vision, resnet | 1,583,197,296 |
se_79282810 | stackoverflow | MACHINE_LEARNING | GAN results fluctuating | GAN results fluctuating
I have the following GAN architecture:
import torch, os, torchvision
import torch.nn as nn
import torch.optim as optim
from torchvision import transforms, datasets, utils
class MappingNetwork(nn.Module):
def __init__(self, latent_dim, style_dim):
super(MappingNetwork, self).__init_... | https://stackoverflow.com/questions/79282810/gan-results-fluctuating | python, deep-learning, pytorch, neural-network, generative-adversarial-network | 1,734,283,486 |
se_72930709 | stackoverflow | MACHINE_LEARNING | Keras Xception trained from scratch give ~100% accuracy in the history but only predicts 1 when evaluating, giving 50% accuracy | Keras Xception trained from scratch give ~100% accuracy in the history but only predicts 1 when evaluating, giving 50% accuracy
I'm training an Xception model on keras without using pre-trained weights for a Binary Classification problem, and I get a very strange behavior. The history plot shows that the training accu... | https://stackoverflow.com/questions/72930709/keras-xception-trained-from-scratch-give-100-accuracy-in-the-history-but-only | python, tensorflow, machine-learning, keras, deep-learning | 1,657,475,932 |
se_79279961 | stackoverflow | MACHINE_LEARNING | Unrecognized Data Type | Unrecognized Data Type
I am follwoing the training in the (https://www.bing.com/videos/riverview/relatedvideo?q=deep+learning+with+keras+tensorflow+freecodecamp&&view=riverview&mmscn=mtsc&mid=5913353EA12EC6FE07BA5913353EA12EC6FE07BA&&aps=0&FORM=VMSOVR), the code line:
model.fit(x = scaled_train_samples, y =train_label... | https://stackoverflow.com/questions/79279961/unrecognized-data-type | tensorflow, deep-learning, tf.keras | 1,734,143,527 |
se_48527808 | stackoverflow | MACHINE_LEARNING | Loss is increasing from first epoch itself | Loss is increasing from first epoch itself
I am training my siamese network for nlp. I have used lstm in it. and BCELoss. My loss is increasing from the first epoch. The first 36 epoch loss is
error after 0 is
272.4357
[torch.FloatTensor of size 1]
error after 1 is
271.8972
[torch.FloatTensor of size 1]
error ... | https://stackoverflow.com/questions/48527808/loss-is-increasing-from-first-epoch-itself | python, optimization, neural-network, deep-learning, pytorch | 1,517,335,444 |
se_79279124 | stackoverflow | MACHINE_LEARNING | Does pytorch CNN care about image size? | Does pytorch CNN care about image size?
I am playing with CNNs these days, and I have code like pasted below. My question is, would this work on any image size? It is not clear to me what parameter or channel, if any, cares about the image size? And if that's the case, how does the model know how many neurons it needs... | https://stackoverflow.com/questions/79279124/does-pytorch-cnn-care-about-image-size | python, machine-learning, deep-learning, pytorch, conv-neural-network | 1,734,110,654 |
se_76324358 | stackoverflow | MACHINE_LEARNING | Failed to use OnnxRuntime on Windows 7 | Failed to use OnnxRuntime on Windows 7
Here's an issue we are encountering when using OnnxRuntime on Windows 7. We have provided below the software environment of our machine for your reference.
Software Environment
Windows 10
Visual Studio 2022
dotnet 6.0
Microsoft.ML.OnnxRuntime 1.14.1 (distributed by NuGet)
While... | https://stackoverflow.com/questions/76324358/failed-to-use-onnxruntime-on-windows-7 | .net-core, deep-learning, windows-7, onnx, onnxruntime | 1,684,936,790 |
se_79276015 | stackoverflow | MACHINE_LEARNING | Handling Absence of Color Data in 3D Mesh Neural Network Input | Handling Absence of Color Data in 3D Mesh Neural Network Input
Context: I am using this neural network architecture developed by researchers called Dual Pyrimad Graph for a mesh segmentation task. The network expects the input to have 6 values: XYZ and RGB. I am training the network form 0 on my data as the network we... | https://stackoverflow.com/questions/79276015/handling-absence-of-color-data-in-3d-mesh-neural-network-input | deep-learning, neural-network, mesh, image-segmentation, missing-features | 1,734,023,931 |
se_79276464 | stackoverflow | MACHINE_LEARNING | Multi-GPU training slower than single-GPU training with pytorch lightning dummy model | Multi-GPU training slower than single-GPU training with pytorch lightning dummy model
I have put together a dummy pytorch lightning model specifically to compare the time it takes to complete a multi-GPU training (3 GPUs using DDP, calling it 3G) and a single-GPU training (calling it 1G). The problem is, the 1G traini... | https://stackoverflow.com/questions/79276464/multi-gpu-training-slower-than-single-gpu-training-with-pytorch-lightning-dummy | python, optimization, deep-learning, pytorch-lightning, multi-gpu | 1,734,034,296 |
se_78039417 | stackoverflow | MACHINE_LEARNING | Questions about training LLMs on large text datasets for text generation from scratch | Questions about training LLMs on large text datasets for text generation from scratch
I made a fully custom made GPT in Jax (with Keras 3), using Tensorflow for the data pipeline.
I've trained the model on the Shakespeare dataset and got good results (so no problem with the model).
Now I want to train it on the Tiny-S... | https://stackoverflow.com/questions/78039417/questions-about-training-llms-on-large-text-datasets-for-text-generation-from-sc | python, tensorflow, deep-learning, nlp, tf.data.dataset | 1,708,590,835 |
se_78868403 | stackoverflow | MACHINE_LEARNING | tensorflow.keras.layers.MultiHeadAttention warning that query layer is destroying mask | tensorflow.keras.layers.MultiHeadAttention warning that query layer is destroying mask
I am building a transformer model using tensorflow==2.16.1 and one of the layers is a tensorflow.keras.layers.MultiHeadAttention layer.
I implement the attention layer in the TransformerBlock below:
# Import TensorFlow and Keras for... | https://stackoverflow.com/questions/78868403/tensorflow-keras-layers-multiheadattention-warning-that-query-layer-is-destroyin | tensorflow, keras, deep-learning, transformer-model, multihead-attention | 1,723,585,326 |
se_48302810 | stackoverflow | MACHINE_LEARNING | What's the difference between "hidden" and "output" in PyTorch LSTM? | What's the difference between "hidden" and "output" in PyTorch LSTM?
I'm having trouble understanding the documentation for PyTorch's LSTM module (and also RNN and GRU, which are similar). Regarding the outputs, it says:
Outputs: output, (h_n, c_n)
output (seq_len, batch, hidden_siz... | https://stackoverflow.com/questions/48302810/whats-the-difference-between-hidden-and-output-in-pytorch-lstm | deep-learning, pytorch, lstm, recurrent-neural-network, tensor | 1,516,197,257 |
se_79159836 | stackoverflow | MACHINE_LEARNING | Im trying to run this code: cnn = BatchNormalization(renorm=True)(cnn) | Im trying to run this code: cnn = BatchNormalization(renorm=True)(cnn)
But This error occurs:
ValueError: Unrecognized keyword arguments passed to BatchNormalization: {'renorm': True}.
And I need this "renorm=ture" .
Is there any other method to do so?
I tried with the latest version of tensorflow.
Which is tf_2.17.0.... | https://stackoverflow.com/questions/79159836/im-trying-to-run-this-code-cnn-batchnormalizationrenorm-truecnn | tensorflow, keras, deep-learning | 1,730,822,377 |
se_79271818 | stackoverflow | MACHINE_LEARNING | How to dynamically modify hyperparameters during training in Stable Baselines 3? | How to dynamically modify hyperparameters during training in Stable Baselines 3?
I'm working with Stable Baselines 3 and I'm trying to implement a training process where I dynamically change hyperparameters at different stages of training. Specifically, I'm using PPO and want to change the gamma parameter.
Here's a si... | https://stackoverflow.com/questions/79271818/how-to-dynamically-modify-hyperparameters-during-training-in-stable-baselines-3 | deep-learning, reinforcement-learning, stable-baselines | 1,733,922,229 |
se_61725300 | stackoverflow | MACHINE_LEARNING | torchvision mnist RemoteDisconnected: Remote end closed connection without response | torchvision mnist RemoteDisconnected: Remote end closed connection without response
I have a pytorch and mnist error....
Why does this error occur?
RemoteDisconnected: Remote end closed connection without response
import torch
import torchvision.datasets as dsets
import torchvision.transforms as transfor... | https://stackoverflow.com/questions/61725300/torchvision-mnist-remotedisconnected-remote-end-closed-connection-without-respo | python, deep-learning, torch, mnist, torchvision | 1,589,185,437 |
se_60142937 | stackoverflow | MACHINE_LEARNING | HuggingFace Transformers For Text Generation with CTRL with Google Colab's free GPU | HuggingFace Transformers For Text Generation with CTRL with Google Colab's free GPU
I wanted to test TextGeneration with CTRL using PyTorch-Transformers, before using it for fine-tuning. But it doesn't prompt anything like it does with GPT-2 and other similar language generation models. I'm very new for this and a... | https://stackoverflow.com/questions/60142937/huggingface-transformers-for-text-generation-with-ctrl-with-google-colabs-free | python, deep-learning, nlp, pytorch, huggingface-transformers | 1,581,297,261 |
se_79266400 | stackoverflow | MACHINE_LEARNING | I cannot transfer learning YAMNET for multi-label problem | I cannot transfer learning YAMNET for multi-label problem
I'm using this tutorial to apply transfer learning to my dataset which has 32 classes of audio.
https://www.tensorflow.org/tutorials/audio/transfer_learning_audio?hl=en
But this does not seem to work for multi label data.
Is this all meant to be a single-label ... | https://stackoverflow.com/questions/79266400/i-cannot-transfer-learning-yamnet-for-multi-label-problem | python-3.x, audio, deep-learning, tensorflow-hub, tensorflow-model-garden | 1,733,776,878 |
se_55908968 | stackoverflow | MACHINE_LEARNING | Matrix calculations in SIMPLERNN KERAS | Matrix calculations in SIMPLERNN KERAS
I'm trying to understand the Matrix Calculations involved in SIMPLERNN.
I have understood from some blog posts and stackoverflow that SimpleRNN(units) creates a layer where in each layer contains no.of units of RNN.
SimpleRNN involves the following calculations
W = kernel #shape... | https://stackoverflow.com/questions/55908968/matrix-calculations-in-simplernn-keras | keras, deep-learning, lstm, recurrent-neural-network | 1,556,562,616 |
se_65927060 | stackoverflow | MACHINE_LEARNING | Fine-tune BERT for a specific domain on a different language? | Fine-tune BERT for a specific domain on a different language?
I want to fine-tune on a pre-trained BERT model.
However, my task uses data within a specific domain (say biomedical data).
Additionally, my data is also in a language different from English (say Dutch).
Now I could fine-tune the Dutch bert-base-dutch-cased... | https://stackoverflow.com/questions/65927060/fine-tune-bert-for-a-specific-domain-on-a-different-language | python-3.x, deep-learning, nlp, bert-language-model | 1,611,780,045 |
se_79255843 | stackoverflow | MACHINE_LEARNING | Problem with tensorflow non linearity Apple M4 Chips | Problem with tensorflow non linearity Apple M4 Chips
I have a problem with the result of non-linear(sigmoid) Neural Network Classification in tensorflow. I suspect is a problem with the M chip and my instalation but I tried several versions using miniforge and miniconda and conda.
Also I installed tensorflow-macos and... | https://stackoverflow.com/questions/79255843/problem-with-tensorflow-non-linearity-apple-m4-chips | macos, deep-learning, neural-network, tensorflow2.0, sigmoid | 1,733,423,147 |
se_62361162 | stackoverflow | MACHINE_LEARNING | Is A PyTorch Dataset Accessed by Multiple DataLoader Workers? | Is A PyTorch Dataset Accessed by Multiple DataLoader Workers?
When using more than 1 DataLoader workers in PyTorch, does every worker access the same Dataset instance? Or does each DataLoader worker have their own instance of Dataset?
from torch.utils.data import DataLoader, Dataset
class NumbersDataset(Dataset):
... | https://stackoverflow.com/questions/62361162/is-a-pytorch-dataset-accessed-by-multiple-dataloader-workers | python, python-3.x, deep-learning, neural-network, pytorch | 1,592,058,586 |
se_78565191 | stackoverflow | MACHINE_LEARNING | ITK ERROR: MaskNegatedImageFilter(000001D7CB479830): Inputs do not occupy the same physical space | ITK ERROR: MaskNegatedImageFilter(000001D7CB479830): Inputs do not occupy the same physical space
I used a code to compute the 95HD and DSC to assess the segmentaion accuracy of medical image, and the following problem appered "ITK ERROR: MaskNegatedImageFilter(000001D7CB479830): Inputs do not occupy the same physical... | https://stackoverflow.com/questions/78565191/itk-error-masknegatedimagefilter000001d7cb479830-inputs-do-not-occupy-the-sa | python, deep-learning, itk, medical-imaging, simpleitk | 1,717,287,597 |
se_63208665 | stackoverflow | MACHINE_LEARNING | Batch normalisation during testing | Batch normalisation during testing
I am working on a 2d time series problem with vector size 140*6 for binary classification using CNN. I have not used any scaling and normalising techniques instead directly fed data to CNN with 3 hidden layers and Batch Normalisation layers with batch size 256 during training .Since ... | https://stackoverflow.com/questions/63208665/batch-normalisation-during-testing | tensorflow, deep-learning, time-series, conv-neural-network, batch-normalization | 1,596,306,379 |
se_79259010 | stackoverflow | MACHINE_LEARNING | How to solve the issue with getting free ports in Pytorch DDP? | How to solve the issue with getting free ports in Pytorch DDP?
I am facing issues with getting a free port in the DDP setup block of PyTorch for parallelizing my deep learning training job across multiple GPUs on a Linux HPC cluster.
I am trying to submit a deep learning training job to a Linux HPC cluster using a SLU... | https://stackoverflow.com/questions/79259010/how-to-solve-the-issue-with-getting-free-ports-in-pytorch-ddp | python, machine-learning, deep-learning, pytorch, hpc | 1,733,509,852 |
se_29150020 | stackoverflow | MACHINE_LEARNING | Training neural network for image segmentation | Training neural network for image segmentation
I have one set of original image patches (101x101 matrices) and another corresponding set of image patches (same size 101x101) in binary which are the 'answer' for training the neural network. I wanted to train my neural network so that it can learn, recognize the shape t... | https://stackoverflow.com/questions/29150020/training-neural-network-for-image-segmentation | matlab, image-segmentation, deep-learning | 1,426,782,514 |
se_53740577 | stackoverflow | MACHINE_LEARNING | "AttributeError: 'str' object has no attribute 'decode' " while Loading a Keras Saved Model | "AttributeError: 'str' object has no attribute 'decode' " while Loading a Keras Saved Model
After Training, I saved Both Keras whole Model and Only Weights using
model.save_weights(MODEL_WEIGHTS) and model.save(MODEL_NAME)
Models and Weights were saved successfully and there was no error.... | https://stackoverflow.com/questions/53740577/attributeerror-str-object-has-no-attribute-decode-while-loading-a-keras | python, machine-learning, keras, deep-learning | 1,544,609,233 |
se_53379887 | stackoverflow | MACHINE_LEARNING | load test data in pytorch | load test data in pytorch
How can I load my own test data (image.jpg) in pytorch in order to test my CNN? | https://stackoverflow.com/questions/53379887/load-test-data-in-pytorch | python, python-3.x, deep-learning, conv-neural-network, pytorch | 1,542,648,809 |
se_54004437 | stackoverflow | MACHINE_LEARNING | Not all points are within the bounds of the space error in Scikit-Optimize | Not all points are within the bounds of the space error in Scikit-Optimize
I am attempting to do a hyper-parameter optimization task on a LSTM model (purly Tensorflow) using the scikit optimize package. I am using the Bayesian optimization method using Gaussian Processes (gp_minimize) for this. The demo code provided ... | https://stackoverflow.com/questions/54004437/not-all-points-are-within-the-bounds-of-the-space-error-in-scikit-optimize | python-3.x, deep-learning, bayesian, hyperparameters, skopt | 1,546,423,831 |
se_65834947 | stackoverflow | MACHINE_LEARNING | Problem with converting a pandas dataframe column into a float | Problem with converting a pandas dataframe column into a float
I am trying to build a celebrity look-alike program, using VggFace and IMDb celebrity faces database, I calculate the embedding of each face in the database and I stock it in a pandas data frame. However, when I try to load that embedding afterword to use ... | https://stackoverflow.com/questions/65834947/problem-with-converting-a-pandas-dataframe-column-into-a-float | python, pandas, machine-learning, deep-learning | 1,611,259,355 |
se_79074150 | stackoverflow | MACHINE_LEARNING | Unwrapping an intermediate functional layer in Keras | Unwrapping an intermediate functional layer in Keras
I want to use the AblationCAM method, using Keras. I want to use the AblationCAM method, which requires creating a new model with the input of the original model and the output of the selected layer. However, the selected layer in my model is inside a functional API... | https://stackoverflow.com/questions/79074150/unwrapping-an-intermediate-functional-layer-in-keras | python, tensorflow, keras, deep-learning | 1,728,559,182 |
se_79248710 | stackoverflow | MACHINE_LEARNING | Reshaping out tensor in pytorch produces weird behavior | Reshaping out tensor in pytorch produces weird behavior
I was going through https://github.com/parrt/fundamentals-of-deep-learning/blob/main/notebooks/3.train-test-diabetes.ipynb as an exercise, but forgot to reshape y tensors in these lines
y_train = torch.tensor(y_train).float().reshape(-1,1) # column vector
y_test ... | https://stackoverflow.com/questions/79248710/reshaping-out-tensor-in-pytorch-produces-weird-behavior | python, deep-learning, pytorch, neural-network, tensor | 1,733,248,452 |
se_67267841 | stackoverflow | MACHINE_LEARNING | Set batch size of trained keras model to 1 | Set batch size of trained keras model to 1
I am having a keras model trained on my own dataset. However after loading weights the summary shows None as the first dimension(the batch size).
I want to know the process to fix the shape to batch size of 1, as it is compulsory for me to fix it so i can convert the model to... | https://stackoverflow.com/questions/67267841/set-batch-size-of-trained-keras-model-to-1 | tensorflow, keras, deep-learning | 1,619,444,659 |
se_49535301 | stackoverflow | MACHINE_LEARNING | Understanding the loss function in Yolo v1 research paper | Understanding the loss function in Yolo v1 research paper
I'm not able to understand the following piece of text from YOLO v1 research paper:
We use sum-squared error because it is easy to optimize,
however it does not perfectly align with our goal of
maximizing average precision. It weights localization error
equall... | https://stackoverflow.com/questions/49535301/understanding-the-loss-function-in-yolo-v1-research-paper | computer-vision, deep-learning, yolo | 1,522,242,029 |
se_75693493 | stackoverflow | MACHINE_LEARNING | why the text embedding or image embedding generated by clip model is 768 × n | why the text embedding or image embedding generated by clip model is 768 × n
When i wanna find out how clip process,i'm confused why 768, how to make a text embedding in 77 × 768,i know that 77 is the max_length of token, which transferred characters by tokenizer.but i really don't understand how make a text beco... | https://stackoverflow.com/questions/75693493/why-the-text-embedding-or-image-embedding-generated-by-clip-model-is-768-%c3%97-n | deep-learning, clip | 1,678,434,903 |
se_79239232 | stackoverflow | MACHINE_LEARNING | How to Implement Softmax, in python, whereby the input are signed 8 integers | How to Implement Softmax, in python, whereby the input are signed 8 integers
I am trying to implement a softmax function that takes in signed int8 input and returns a signed int8 output array.
The current implementation I have going is this,
import numpy as np
def softmax_int8(inputs):
inputs = np.array(inputs, ... | https://stackoverflow.com/questions/79239232/how-to-implement-softmax-in-python-whereby-the-input-are-signed-8-integers | python, machine-learning, deep-learning | 1,732,959,477 |
se_79240688 | stackoverflow | MACHINE_LEARNING | "NotImplementedError: Could not run 'aten::add.out' with arguments from the 'QuantizedCPU' backend" while implementing QAT on resnet18 using pytorch | "NotImplementedError: Could not run 'aten::add.out' with arguments from the 'QuantizedCPU' backend" while implementing QAT on resnet18 using pytorch
I am trying to implement Quantization Aware Training(QAT) resnet18 model. While inferring I get this error
NotImplementedError: Could not run 'a... | https://stackoverflow.com/questions/79240688/notimplementederror-could-not-run-atenadd-out-with-arguments-from-the-qua | python-3.x, deep-learning, pytorch, resnet, quantization-aware-training | 1,733,011,332 |
se_79236534 | stackoverflow | MACHINE_LEARNING | Error while running BayesSearchCV for finding best hyperparameter of ANN regression | Error while running BayesSearchCV for finding best hyperparameter of ANN regression
I try to apply deep learning to make regression (6 independent variables and 1 dependent variable).
Similar problems but has not been solved:
Error while running Bayesian for finding best hyperparameter
While finding solution, I got gu... | https://stackoverflow.com/questions/79236534/error-while-running-bayessearchcv-for-finding-best-hyperparameter-of-ann-regress | python, machine-learning, deep-learning, regression, hyperparameters | 1,732,873,218 |
se_38340311 | stackoverflow | MACHINE_LEARNING | What is the difference between steps and epochs in TensorFlow? | What is the difference between steps and epochs in TensorFlow?
In most of the models, there is a steps parameter indicating the number of steps to run over data. But yet I see in most practical usage, we also execute the fit function N epochs.
What is the difference between running 1000 steps with 1 epoch and runnin... | https://stackoverflow.com/questions/38340311/what-is-the-difference-between-steps-and-epochs-in-tensorflow | tensorflow, machine-learning, deep-learning | 1,468,365,622 |
se_60883696 | stackoverflow | MACHINE_LEARNING | k-fold cross validation using DataLoaders in PyTorch | k-fold cross validation using DataLoaders in PyTorch
I have splitted my training dataset into 80% train and 20% validation data and created DataLoaders as shown below. However I do not want to limit my model's training. So I thought of splitting my data into K(maybe 5) folds and performing cross-validation. However I ... | https://stackoverflow.com/questions/60883696/k-fold-cross-validation-using-dataloaders-in-pytorch | python, machine-learning, deep-learning, pytorch, computer-vision | 1,585,303,174 |
se_79234040 | stackoverflow | MACHINE_LEARNING | On which device is a python dictionary containing pytorch tensors that are loaded on cuda? | On which device is a python dictionary containing pytorch tensors that are loaded on cuda?
I have a pytorch face detection model that returns bounding boxes and a few facial landmarks as a dictionary. The bounding boxes and the landmarks are pytorch tensors that where moved to the GPU. When I print the dictionary, it ... | https://stackoverflow.com/questions/79234040/on-which-device-is-a-python-dictionary-containing-pytorch-tensors-that-are-loade | deep-learning, pytorch, gpu | 1,732,799,798 |
se_78269841 | stackoverflow | MACHINE_LEARNING | When saving and loading Keras or TensorFlow models: How do I disable/hide the warnings that appear when using the .h5 extension? | When saving and loading Keras or TensorFlow models: How do I disable/hide the warnings that appear when using the .h5 extension?
I am trying to save and load Keras and/or TensorFlow models, and approaching the problem by following the Keras documentation and a TensorFlow tutorial. In VS Code on my PC, both the native... | https://stackoverflow.com/questions/78269841/when-saving-and-loading-keras-or-tensorflow-models-how-do-i-disable-hide-the-wa | python, tensorflow, keras, deep-learning, save | 1,712,169,767 |
se_79233163 | stackoverflow | MACHINE_LEARNING | Trying to implement ReduceLrOnPlateau in darknet (alexeyab's version) but having issues with it | Trying to implement ReduceLrOnPlateau in darknet (alexeyab's version) but having issues with it
i have been trying to implement a reducelronplateau scheduler which will allow tracking of loss history, and automatically update the learning rate whenever a loss plateau is detected.
i have made some changes to do the... | https://stackoverflow.com/questions/79233163/trying-to-implement-reducelronplateau-in-darknet-alexeyabs-version-but-having | c, deep-learning, darknet, learning-rate | 1,732,784,129 |
se_79212687 | stackoverflow | MACHINE_LEARNING | in testing dataset using dataloader , should we set shuffle=true or it doesn't matter? | in testing dataset using dataloader , should we set shuffle=true or it doesn't matter?
I have a custom dataset (images of pizza,sushi and steak).
I'm using torch DataLoader for it , now when writing the test dataloader custom should we set shuffle=true or it just doesn't matter??
I haven't seen difference yet , bu... | https://stackoverflow.com/questions/79212687/in-testing-dataset-using-dataloader-should-we-set-shuffle-true-or-it-doesnt-m | machine-learning, deep-learning, pytorch, artificial-intelligence, pytorch-dataloader | 1,732,217,610 |
se_60784669 | stackoverflow | MACHINE_LEARNING | How to compute big O time complexities for Machine Learning and Deep Learning models? Are there also other measures to define complexity of models? | How to compute big O time complexities for Machine Learning and Deep Learning models? Are there also other measures to define complexity of models?
I am trying to measure the complexities of ML model implementations as a way of comparing them with statistical approaches (for example). Is it possible to use Big O compl... | https://stackoverflow.com/questions/60784669/how-to-compute-big-o-time-complexities-for-machine-learning-and-deep-learning-mo | machine-learning, deep-learning, time-complexity, computer-science | 1,584,767,369 |
se_53588943 | stackoverflow | MACHINE_LEARNING | What are the best practices for deploying machine learning or deep learning models into production? | What are the best practices for deploying machine learning or deep learning models into production?
Please guide me some of the best tools out there for deploying Machine learning and Deep learning models models to production environment , Ref links to cloud to deploy models . | https://stackoverflow.com/questions/53588943/what-are-the-best-practices-for-deploying-machine-learning-or-deep-learning-mode | machine-learning, deep-learning, deployment | 1,543,820,617 |
se_75884318 | stackoverflow | MACHINE_LEARNING | How can I do image classification training using yolov8? | How can I do image classification training using yolov8?
As per the YOLOV8 documentation of Classify,
this is the code that's using mnist dataset:
from ultralytics import YOLO
##### Load a model
model = YOLO('yolov8n-cls.yaml') # build a new model from YAML
model = YOLO('yolov8n-cls.pt') # load a pretrained model (... | https://stackoverflow.com/questions/75884318/how-can-i-do-image-classification-training-using-yolov8 | python, deep-learning, pytorch, yolo, training-data | 1,680,152,906 |
se_79224817 | stackoverflow | MACHINE_LEARNING | InvalidArgumentError, Deep Learning with Python, Example 10.2.3 | InvalidArgumentError, Deep Learning with Python, Example 10.2.3
I'm trying example 10.2.3 from the book Deep Learning with Python by François Chollet. I'm getting an error on the line history = model.fit(...) using Tensorflow 2.17. However, I don't get an error if I downgrade to Tensorflow 2.15.
What has changed betwe... | https://stackoverflow.com/questions/79224817/invalidargumenterror-deep-learning-with-python-example-10-2-3 | tensorflow, keras, deep-learning, tensorflow2.0 | 1,732,575,610 |
se_79224081 | stackoverflow | MACHINE_LEARNING | Encoder Decoder Transformer model generate a repetitive token as output in text summarization | Encoder Decoder Transformer model generate a repetitive token as output in text summarization
I implemented a transformer Encoder Decoder (Bert2Bert) for text summarization task. In train phase train loss decreases but in prediction phase it generate a repetitive token as output for example [2,2,2,2,.....]. what shoul... | https://stackoverflow.com/questions/79224081/encoder-decoder-transformer-model-generate-a-repetitive-token-as-output-in-text | deep-learning, nlp, huggingface-transformers, bert-language-model | 1,732,556,341 |
se_79223860 | stackoverflow | MACHINE_LEARNING | Unexpected '__mul__' call during dot product | Unexpected '__mul__' call during dot product
So, I have been trying to implement a basic Autograd and Neural Network from scratch using some numpy. This is the part of code of my AD which matters for this question which has been greatly shorten down for MRE. This is grad.py
from typing import Self
import numpy... | https://stackoverflow.com/questions/79223860/unexpected-mul-call-during-dot-product | python, numpy, deep-learning | 1,732,552,074 |
se_77757228 | stackoverflow | MACHINE_LEARNING | What are the differences between 'fairseq' and 'fairseq2'? | What are the differences between 'fairseq' and 'fairseq2'?
What are the differences between fairseq and fairseq2?
Quotes from the github pages are not very clear
Fairseq(-py) is a sequence modeling toolkit that allows researchers
and developers to train custom models for translation, summarization,
la... | https://stackoverflow.com/questions/77757228/what-are-the-differences-between-fairseq-and-fairseq2 | deep-learning, frameworks, open-source, language-model, fairseq | 1,704,361,592 |
se_60054228 | stackoverflow | MACHINE_LEARNING | Confused on how to store 3D matrices in HDF5 file in matlab? | Confused on how to store 3D matrices in HDF5 file in matlab?
I have multiple 3D matrices that need to be stored in a hdf5 file. I have looked everywhere but i am confused about the process of storing data in hdf5 file. Can i store multiple 3D matrices in a single dataset in hdf5 file or do i have to create separate da... | https://stackoverflow.com/questions/60054228/confused-on-how-to-store-3d-matrices-in-hdf5-file-in-matlab | python, matlab, deep-learning, conv-neural-network, hdf5 | 1,580,808,280 |
se_60077386 | stackoverflow | MACHINE_LEARNING | How to use my neural net properly with dl4j? | How to use my neural net properly with dl4j?
I implemented a feed forward model and a recurrent model with deeplearning4j to detect anomalies in a 1D signal.
Maybe I'm missing an abstraction but I thought I could solve this problem the following way:
Preprocess the data. I have 5 different failure categories and have... | https://stackoverflow.com/questions/60077386/how-to-use-my-neural-net-properly-with-dl4j | java, deep-learning, artificial-intelligence, deeplearning4j | 1,580,910,857 |
se_53464952 | stackoverflow | MACHINE_LEARNING | Deep Learning using Weka GUI and deeplearning4j | Deep Learning using Weka GUI and deeplearning4j
I am looking for documentation on how to run deep learning using the Weka GUI.
I downloaded the deeplearning4j package and tried to run the examples.
The 3 examples say
The following explains how to build a neural network from the command line, programmatically in java ... | https://stackoverflow.com/questions/53464952/deep-learning-using-weka-gui-and-deeplearning4j | deep-learning, weka | 1,543,124,224 |
se_79215294 | stackoverflow | MACHINE_LEARNING | How to find orienation of an object in a 2d Image | How to find orienation of an object in a 2d Image
I have to detect some objects (Sofa and table in my case) and replace that objects from a 3d model. I am using YOLO to detect and LaMa to remove object and then trying to place the 3d model on the same place with same orientation from where the object is removed.
So, I... | https://stackoverflow.com/questions/79215294/how-to-find-orienation-of-an-object-in-a-2d-image | opencv, deep-learning, three.js, computer-vision | 1,732,283,720 |
se_63005031 | stackoverflow | MACHINE_LEARNING | How to determine whether use positive or negative reward in DQN model? | How to determine whether use positive or negative reward in DQN model?
I used Open AI gym to reproduce some experiment named CartPole-v0 and MountainCar-v0 respectively.
I referred code from Github, CartPole-v0: https://gist.github.com/floodsung/3b9d893f1e0788f8fad0e6b49cde70f1
MountainCar-v0 :https://gist.github.com... | https://stackoverflow.com/questions/63005031/how-to-determine-whether-use-positive-or-negative-reward-in-dqn-model | deep-learning, reinforcement-learning, openai-gym, dqn | 1,595,286,329 |
se_65882750 | stackoverflow | MACHINE_LEARNING | please use torch.load with map_location=torch.device('cpu') | please use torch.load with map_location=torch.device('cpu')
I am running Python program, but I do not have a GPU, what can I do to make Python use CPU instead of GPU?
$ python extract_feature.py --data mnist --net checkpoint_4.pth.tar --features pretrained
It gives me the following warning:
=> RuntimeError: ... | https://stackoverflow.com/questions/65882750/please-use-torch-load-with-map-location-torch-devicecpu | python, deep-learning, pytorch, data-mining | 1,611,569,709 |
se_69087044 | stackoverflow | MACHINE_LEARNING | Early stopping in Bert Trainer instances | Early stopping in Bert Trainer instances
I am fine-tuning a BERT model for a multiclass classification task. My problem is that I don't know how to add "early stopping" to those Trainer instances. Any ideas? | https://stackoverflow.com/questions/69087044/early-stopping-in-bert-trainer-instances | python, deep-learning, neural-network, huggingface-transformers, huggingface | 1,631,012,539 |
se_79214094 | stackoverflow | MACHINE_LEARNING | How to Optimize Preprocessing and Post-Processing in DETR-Based Object Detection? | How to Optimize Preprocessing and Post-Processing in DETR-Based Object Detection?
My Question:
How can I reduce the time spent on preprocessing and post-processing?
Background Information
I'm implementing object detection on video frames using DETR. My system processes frames from a 30 FPS, 30-second video (900 frames... | https://stackoverflow.com/questions/79214094/how-to-optimize-preprocessing-and-post-processing-in-detr-based-object-detection | python, deep-learning, pytorch, computer-vision, huggingface-transformers | 1,732,262,014 |
se_50826644 | stackoverflow | MACHINE_LEARNING | Why do we do batch matrix-matrix product? | Why do we do batch matrix-matrix product?
I'm following Pytorch seq2seq tutorial and ittorch.bmm method is used like below:
attn_applied = torch.bmm(attn_weights.unsqueeze(0),
encoder_outputs.unsqueeze(0))
I understand why we need to multiply attention weight and encoder outputs.
What I do... | https://stackoverflow.com/questions/50826644/why-do-we-do-batch-matrix-matrix-product | python, deep-learning, pytorch, seq2seq | 1,528,842,221 |
se_78951389 | stackoverflow | MACHINE_LEARNING | TensorFlow 2.17.0 Error: tf.where() not working as expected after update | TensorFlow 2.17.0 Error: tf.where() not working as expected after update
After updating TensorFlow to version 2.17.0, I'm encountering an error in a part of my model that previously worked fine. The error occurs when using tf.where() to create a gate based on a probability threshold.
Here's the relevant part of my cod... | https://stackoverflow.com/questions/78951389/tensorflow-2-17-0-error-tf-where-not-working-as-expected-after-update | tensorflow, deep-learning | 1,725,513,678 |
se_79209567 | stackoverflow | MACHINE_LEARNING | MultiModal Cross attention | MultiModal Cross attention
I am dealing with two embeddings, text and image both are last_hidden_state of transfomer models (bert and vit), so the shapes are (batch, seq, emd_dim). I want to feed text information to image using a cross attention mechanism and I was wondering whether this line of code will give me what... | https://stackoverflow.com/questions/79209567/multimodal-cross-attention | deep-learning, huggingface-transformers, attention-model, multimodal | 1,732,159,009 |
se_79208598 | stackoverflow | MACHINE_LEARNING | Unable to update a latent vector using custom loss function in pytorch | Unable to update a latent vector using custom loss function in pytorch
I am trying to implement this function but have had no luck. There is a VAE model that I am using, and along with it, there are encoder and decoder. I'm freezing the weights of the VAE decoder, and trying to change a latent vector which is updated ... | https://stackoverflow.com/questions/79208598/unable-to-update-a-latent-vector-using-custom-loss-function-in-pytorch | python, deep-learning, pytorch, autograd | 1,732,128,764 |
se_79208825 | stackoverflow | MACHINE_LEARNING | How to Build a More Efficient DataLoader to Load Large Image Datasets? | How to Build a More Efficient DataLoader to Load Large Image Datasets?
I am trying to train a deep learning model on a very large image dataset. The model input requires a pair of images (A and B). Because my image sizes are quite large, I have resized each of them to a torch.Tensor of shape (3x224x224) and stored eac... | https://stackoverflow.com/questions/79208825/how-to-build-a-more-efficient-dataloader-to-load-large-image-datasets | python, machine-learning, deep-learning, pytorch, dataloader | 1,732,133,555 |
se_78479197 | stackoverflow | MACHINE_LEARNING | Invalid input shape for input Tensor | Invalid input shape for input Tensor
Tomato project
the model is building but it is refusing to train. it is saying incorrect format given for the input_shape and i have tried everything that i know possible. the model error is
Epoch 1/50
---------------------------------------------------------------------------
Valu... | https://stackoverflow.com/questions/78479197/invalid-input-shape-for-input-tensor | python, tensorflow, deep-learning | 1,715,701,254 |
se_79206784 | stackoverflow | MACHINE_LEARNING | Can I add my own function in nn.Sequential? | Can I add my own function in nn.Sequential?
I'm a beginner in machine learning. Recently, I'm trying to use CGAN for image generation and lebelling.
Currently, I'm manually doing circular padding in convolution operation as following.
def pad_dim(x, n=1):
x = torch.cat((x[:,:,:,-n:], x, x[:,:,:,:n]), axis=-1)
... | https://stackoverflow.com/questions/79206784/can-i-add-my-own-function-in-nn-sequential | function, deep-learning, pytorch, neural-network, generative-adversarial-network | 1,732,098,253 |
se_43880116 | stackoverflow | MACHINE_LEARNING | Deep learning for inferences in sequences | Deep learning for inferences in sequences
I want to use deep learning techniques to perform better inference tasks than Hidden Markov Models (which is a shallow model)? I was wondering what is the state-of-the art deep learning model to replace Hidden Markov Models (HMM)? The set-up is semi-supervised. The training da... | https://stackoverflow.com/questions/43880116/deep-learning-for-inferences-in-sequences | machine-learning, artificial-intelligence, deep-learning, hidden-markov-models, unsupervised-learning | 1,494,365,133 |
se_79201296 | stackoverflow | MACHINE_LEARNING | How to modify my code to handle RGBX (4-channel) images for semantic segmentation? | How to modify my code to handle RGBX (4-channel) images for semantic segmentation?
I'm new to this field and have been following a U-Net tutorial using 3-channel RGB images for semantic segmentation https://www.youtube.com/watch?v=68HR_eyzk00&list=PLZsOBAyNTZwbR08R959iCvYT3qzhxvGOE&index=2&ab_channel=DigitalSreeni, an... | https://stackoverflow.com/questions/79201296/how-to-modify-my-code-to-handle-rgbx-4-channel-images-for-semantic-segmentatio | python, machine-learning, keras, deep-learning, semantic-segmentation | 1,731,960,365 |
se_79204341 | stackoverflow | MACHINE_LEARNING | How to set non-trainable weights? | How to set non-trainable weights?
The method keras.Model.set_weights seems to only take trainable weights. Non-trainable weights such as those from normalization layers cannot be imported this way. This is problematic, since in Keras with JAX backend, we can only perform stateless operations. That is; update the weigh... | https://stackoverflow.com/questions/79204341/how-to-set-non-trainable-weights | python, keras, deep-learning, neural-network, jax | 1,732,034,816 |
se_79199199 | stackoverflow | MACHINE_LEARNING | Dimensionality reduction in sentence transformers | Dimensionality reduction in sentence transformers
I need to compute embeddings for a large number of sentences (say 10K) in preprocessing, and at runtime I will have to compute the embedding vector for one sentence at a time (user query), and then find the most resembling sentence based on the embedding vectors (using... | https://stackoverflow.com/questions/79199199/dimensionality-reduction-in-sentence-transformers | machine-learning, deep-learning, pytorch, word-embedding, sentence-transformers | 1,731,918,681 |
se_43441396 | stackoverflow | MACHINE_LEARNING | DeepLearning Anomaly Detection for images | DeepLearning Anomaly Detection for images
I wanted to create a Deep Learning model (preferably using Tensorflow/Keras) for image anomaly detection. By anomaly detection I mean, essentially a OneClassSVM.
I have already tried sklearn's OneClassSVM using HOG features from the image. I was wondering if there is some exam... | https://stackoverflow.com/questions/43441396/deeplearning-anomaly-detection-for-images | deep-learning, autoencoder, anomaly-detection | 1,492,371,985 |
se_79157312 | stackoverflow | MACHINE_LEARNING | R package "keras3" error: OP_REQUIRES failed at reshape_op.h:65 : INVALID_ARGUMENT: Only one input size may be -1, not both 0 and 1 | R package "keras3" error: OP_REQUIRES failed at reshape_op.h:65 : INVALID_ARGUMENT: Only one input size may be -1, not both 0 and 1
I am following the example in Chapter 10 of the book "Deep Learning with R, 2nd Edition", using the R package keras3. An error occurs:
W tensorflow/core/framework/op_kernel.cc:... | https://stackoverflow.com/questions/79157312/r-package-keras3-error-op-requires-failed-at-reshape-op-h65-invalid-argume | r, deep-learning, keras-3 | 1,730,764,008 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.