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_79709893
stackoverflow
MACHINE_LEARNING
DQN fails to learn good policy for Atari Pong
DQN fails to learn good policy for Atari Pong I'm trying to implement the findings from this DeepMind DQN paper (2015) from scratch in PyTorch using the Atari Pong environment. I've tested my Deep Q-Network on a simple test environment, where episodes last only 5 time steps and the maximum achievable reward is 4.1. My...
https://stackoverflow.com/questions/79709893/dqn-fails-to-learn-good-policy-for-atari-pong
python, deep-learning, pytorch, reinforcement-learning
1,753,159,942
se_38888398
stackoverflow
MACHINE_LEARNING
semantic segmentation and object detection
semantic segmentation and object detection This thread discusses the comparison of different computer vision concepts. Fully Convolutional Networks for Semantic Segmentation is a very popular deep learning approach for semantic segmentation. What are the popular or state-of-the-art deep learning approaches for object...
https://stackoverflow.com/questions/38888398/semantic-segmentation-and-object-detection
machine-learning, deep-learning, neural-network, computer-vision, image-segmentation
1,470,895,482
se_79641780
stackoverflow
MACHINE_LEARNING
YOLOv8 Custom Model Fails to Detect Card Elements — What Am I Doing Wrong?
YOLOv8 Custom Model Fails to Detect Card Elements — What Am I Doing Wrong? I’m working on a card verification system where the goal is to detect fixed visual elements on a card (e.g., logo, photo, chip, signature) using computer vision. Given a photo of a card, I want to detect whether certain key elements are present...
https://stackoverflow.com/questions/79641780/yolov8-custom-model-fails-to-detect-card-elements-what-am-i-doing-wrong
python, machine-learning, deep-learning, yolov8, ultralytics
1,748,420,130
se_59853676
stackoverflow
MACHINE_LEARNING
What is sub-pixel convolution?
What is sub-pixel convolution? I am working on a super-resolution project. And for now, I am using Transposed Convolution for upsampling the image. But I have heard a lot that sub-pixel convolutions do it better. So what is subpixel convolution and the math behind it? And Why it is better than transposed convolution? ...
https://stackoverflow.com/questions/59853676/what-is-sub-pixel-convolution
image-processing, deep-learning, neural-network, conv-neural-network, convolution
1,579,673,864
se_76192675
stackoverflow
MACHINE_LEARNING
ImportError: cannot import name 'YOLO' from 'ultralytics' (unknown location)
ImportError: cannot import name 'YOLO' from 'ultralytics' (unknown location) I am trying to build a YOLOv8 model, and I have built it using cloning github repo of YOLOv8. https://github.com/ultralytics/ultralytics For training the yolov8 docs say that I need to start as follows from ultralytics import ...
https://stackoverflow.com/questions/76192675/importerror-cannot-import-name-yolo-from-ultralytics-unknown-location
python, deep-learning, importerror, yolo, yolov8
1,683,444,647
se_78002007
stackoverflow
MACHINE_LEARNING
Fréchet inception distance (FID) Score for same vectors is not zero
Fréchet inception distance (FID) Score for same vectors is not zero I was trying to use the implementation of FID score from this resource: https://machinelearningmastery.com/how-to-implement-the-frechet-inception-distance-fid-from-scratch/ but when I run the FID score for the same vectors (act1) I expected the F...
https://stackoverflow.com/questions/78002007/fr%c3%a9chet-inception-distance-fid-score-for-same-vectors-is-not-zero
python, numpy, deep-learning, computer-vision, generative-adversarial-network
1,708,010,973
se_72291650
stackoverflow
MACHINE_LEARNING
Contextual Tokenizer that depends on the context in Transformer NLP
Contextual Tokenizer that depends on the context in Transformer NLP I would like to create a tokenizer that tokenizes words in a sentence depending on its surroundings. So one word could have different tokens depending on its neighbor words. For example, if I have these two sentences: "Soccer is fun" and "She plays so...
https://stackoverflow.com/questions/72291650/contextual-tokenizer-that-depends-on-the-context-in-transformer-nlp
deep-learning, nlp, token, huggingface-transformers
1,652,886,294
se_79653043
stackoverflow
MACHINE_LEARNING
TPU for Pix-to-Pix possible?
TPU for Pix-to-Pix possible? I have model Pix-to-Pix. Not segmentation. Transfer from texture to texture. Loss = 'mse'. And it works properly with GPU. But if i try to use TPU i get loss = 'nan' I simplified the model by cutting off pieces step by step with same result: loss = 'nan' at 42th epoch. Even with precision ...
https://stackoverflow.com/questions/79653043/tpu-for-pix-to-pix-possible
deep-learning, neural-network, tpu, unet-neural-network, float32
1,749,049,620
se_74191935
stackoverflow
MACHINE_LEARNING
gym env.render() on Nth step
gym env.render() on Nth step I am using gym==0.26.0 and I am trying to make my environment render only on each Nth step. So that my nn is learning fast but that I can also see some of the progress as the image and not just rewards in my terminal. With the newer versions of gym, it seems like I need to specify the rend...
https://stackoverflow.com/questions/74191935/gym-env-render-on-nth-step
python, machine-learning, deep-learning, reinforcement-learning, openai-gym
1,666,690,342
se_78994162
stackoverflow
MACHINE_LEARNING
How can I just calculate a part of grad using make_functional in PyTorch?
How can I just calculate a part of grad using make_functional in PyTorch? func_model, func_params = make_functional(self.model) def fm(x, func_params): fx = func_model(func_params, x) return fx.squeeze(0).squeeze(0) def floss(func_params,input): fx = fm(input...
https://stackoverflow.com/questions/78994162/how-can-i-just-calculate-a-part-of-grad-using-make-functional-in-pytorch
python, network-programming, deep-learning, pytorch, gradient-descent
1,726,577,824
se_79695214
stackoverflow
MACHINE_LEARNING
i want to custmize data.yaml file for train yolo11x.pt model by ultralytics?
i want to custmize data.yaml file for train yolo11x.pt model by ultralytics? class_id x_center y_center width height behavior_id eg.txt file data 6 0.260313 0.739167 0.131875 0.038333 1 6 0.580313 0.821250 0.290625 0.245834 0 6 0.821562 0.775416 0.230625 0.179167 0 6 0.914062 0.800416 0.170625 0.215833 1 data.yaml fi...
https://stackoverflow.com/questions/79695214/i-want-to-custmize-data-yaml-file-for-train-yolo11x-pt-model-by-ultralytics
machine-learning, deep-learning, yolov8, ultralytics
1,752,044,923
se_44255411
stackoverflow
MACHINE_LEARNING
Which is best for object localization among R-CNN, fast R-CNN, faster R-CNN and YOLO
Which is best for object localization among R-CNN, fast R-CNN, faster R-CNN and YOLO what is the difference between R-CNN, fast R-CNN, faster R-CNN and YOLO in terms of the following: (1) Precision on same image set (2) Given SAME IMAGE SIZE, the run time (3) Support for android porting Considering these three criter...
https://stackoverflow.com/questions/44255411/which-is-best-for-object-localization-among-r-cnn-fast-r-cnn-faster-r-cnn-and
deep-learning, deeplearning4j
1,496,127,083
se_79698151
stackoverflow
MACHINE_LEARNING
GradientTape won't calculate gradients after restoring a model from ModelCheckpoint
GradientTape won't calculate gradients after restoring a model from ModelCheckpoint I'm training a CNN on Tensorflow for binary classification and executing my code in Google Colab. CNN_model = tf.keras.Sequential([ tf.keras.layers.Input(shape=(IMAGE_SIZE, IMAGE_SIZE, 3)), tf.keras.layers.Conv2D(filters=32...
https://stackoverflow.com/questions/79698151/gradienttape-wont-calculate-gradients-after-restoring-a-model-from-modelcheckpo
python, tensorflow, deep-learning, conv-neural-network, google-colaboratory
1,752,228,041
se_79496906
stackoverflow
MACHINE_LEARNING
Why does setting torch.backends.cudnn.deterministic = True make my TCN model extremely slow in PyTorch?
Why does setting torch.backends.cudnn.deterministic = True make my TCN model extremely slow in PyTorch? I encountered a very interesting issue when training a deep learning model using Python and PyTorch. I designed a simple TCN as follows: import torch import torch.nn as nn class TCN(nn.Module): def __init__...
https://stackoverflow.com/questions/79496906/why-does-setting-torch-backends-cudnn-deterministic-true-make-my-tcn-model-ext
python, deep-learning, conv-neural-network, torch
1,741,575,045
se_79695755
stackoverflow
MACHINE_LEARNING
How to get the KL divergence between two datasets (say ImageNet1k and FGVC-Aircraft)
How to get the KL divergence between two datasets (say ImageNet1k and FGVC-Aircraft) I want to find out the KL divergence between 2 datasets, so for that I am extracting the features from ResNet50 for both of them, but if I calculate the same for ImageNet1k (say 20% of val set) and FGVC-Aircraft test set, I get a very...
https://stackoverflow.com/questions/79695755/how-to-get-the-kl-divergence-between-two-datasets-say-imagenet1k-and-fgvc-aircr
python, deep-learning, pytorch
1,752,069,680
se_53580088
stackoverflow
MACHINE_LEARNING
Calculate the output size in convolution layer
Calculate the output size in convolution layer How do I calculate the output size in a convolution layer? For example, I have a 2D convolution layer that takes a 3x128x128 input and has 40 filters of size 5x5.
https://stackoverflow.com/questions/53580088/calculate-the-output-size-in-convolution-layer
machine-learning, deep-learning, pytorch, conv-neural-network
1,543,752,568
se_79680627
stackoverflow
MACHINE_LEARNING
ValueError: The layer sequential_4 has never been called and thus has no defined input
ValueError: The layer sequential_4 has never been called and thus has no defined input I have built a CNN model with the following layers: def build_trainable_cnn(input_shape, num_classes): """ Create a CNN model for feature extraction Parameters: input_shape: shape of input features (e.g., (500, ...
https://stackoverflow.com/questions/79680627/valueerror-the-layer-sequential-4-has-never-been-called-and-thus-has-no-defined
python, tensorflow, keras, deep-learning, conv-neural-network
1,750,945,934
se_79695488
stackoverflow
MACHINE_LEARNING
Trained Huggingface EncoderDecoderModel.generate() produces only bos-tokens
Trained Huggingface EncoderDecoderModel.generate() produces only bos-tokens I am working on a Huggingface transformers EncoderDecoderModel consisting of a frozen BERT-Encoder (answerdotai-ModernBERT-base) and a trainable GPT2-Decoder. Due to the different architectures for Encoder and Decoder, both come with different...
https://stackoverflow.com/questions/79695488/trained-huggingface-encoderdecodermodel-generate-produces-only-bos-tokens
python, deep-learning, pytorch, huggingface-transformers, large-language-model
1,752,058,070
se_77297891
stackoverflow
MACHINE_LEARNING
Speed up the real time face-detection using CV2 and DeepFace
Speed up the real time face-detection using CV2 and DeepFace I am trying to build a real-time face detector that should meet these requirements: Fast As much accurate as possible even in darker conditions of the enviroment I can easly add a face recognition model after its detection These requirements led me to buil...
https://stackoverflow.com/questions/77297891/speed-up-the-real-time-face-detection-using-cv2-and-deepface
deep-learning, computer-vision, face-recognition, face-detection, deepface
1,697,393,051
se_59134865
stackoverflow
MACHINE_LEARNING
Tensorflow : How to optimize trained model size?
Tensorflow : How to optimize trained model size? I am building a simple TensorFlow model where I am fine-tuning the Elmo model using Tf-Hub module. I am getting a good result but the problem is when I am saving the model, It's very large where the same time I built the same model in Keras and it's in Kb. My input da...
https://stackoverflow.com/questions/59134865/tensorflow-how-to-optimize-trained-model-size
python, tensorflow, machine-learning, keras, deep-learning
1,575,274,424
se_55917959
stackoverflow
MACHINE_LEARNING
Simple vanilla RNN doesn't pass gradient check
Simple vanilla RNN doesn't pass gradient check I recently tried to implement a vanilla RNN from scratch. I implemented everything and even ran a seemingly OK example! yet I noticed the gradient check is not successful! and only some parts (specifically weight and bias for the output) pass the gradient check while ...
https://stackoverflow.com/questions/55917959/simple-vanilla-rnn-doesnt-pass-gradient-check
python-3.x, deep-learning, recurrent-neural-network
1,556,616,825
se_79406168
stackoverflow
MACHINE_LEARNING
Code higher efficientnet models based on B0 model
Code higher efficientnet models based on B0 model I wanted to utilize EfficientNet models for my study. However, while I was able to construct EfficientNet-B0, I'm stuck on the part on expanding it to it's higher models - B1, B2, so on.. Here is my implementation of my code for B0: import torch import torch.nn as nn ...
https://stackoverflow.com/questions/79406168/code-higher-efficientnet-models-based-on-b0-model
deep-learning, pytorch, efficientnet
1,738,478,736
se_79667798
stackoverflow
MACHINE_LEARNING
Keras AUC metric breaking on a multi-class problem
Keras AUC metric breaking on a multi-class problem I'm attempting to train a multi-class image classification model based on standardised 128x128 images. When I use "accuracy" alone as a metric, I have no issues. When I introduce AUC, I can't train the model. model = tf.keras.Sequential([ tf.keras.layers.Rescaling...
https://stackoverflow.com/questions/79667798/keras-auc-metric-breaking-on-a-multi-class-problem
python, tensorflow, keras, deep-learning, roc
1,750,084,552
se_69970319
stackoverflow
MACHINE_LEARNING
ValueError: Exception encountered when calling layer "sequential_5" (type Sequential)
ValueError: Exception encountered when calling layer "sequential_5" (type Sequential) I am following this course : TensorFlow Developer Certificate in 2022: Zero to Mastery This is the following code : # Set random seed tf.random.set_seed(42) # Create some regression data X_regression = np.arange(0, 1000, ...
https://stackoverflow.com/questions/69970319/valueerror-exception-encountered-when-calling-layer-sequential-5-type-sequen
python, tensorflow, machine-learning, keras, deep-learning
1,636,958,653
se_76839159
stackoverflow
MACHINE_LEARNING
Transport endpoint is not connected in Colab Pro+
Transport endpoint is not connected in Colab Pro+ I am a google colab pro+ user. I am trying to train a DL model and getting an error of "Transport endpoint is not connected", while training the model. I ve been using the pro version previously and faced the same error so I thought of upgrading but it didnt help as we...
https://stackoverflow.com/questions/76839159/transport-endpoint-is-not-connected-in-colab-pro
python, tensorflow, deep-learning, google-colaboratory
1,691,184,140
se_79691807
stackoverflow
MACHINE_LEARNING
How to find MSE when using a batch loader?
How to find MSE when using a batch loader? I'm working on a regression task using deep learning models. While calculating the MSE, I have divided by the length of the dataset. However, ChatGPT is suggesting me to divide it by the length of the loader. What is the correct way to calculate MSE in this case? Also, I want...
https://stackoverflow.com/questions/79691807/how-to-find-mse-when-using-a-batch-loader
python, deep-learning, pytorch, eval, mse
1,751,810,199
se_74968093
stackoverflow
MACHINE_LEARNING
Most efficient way to use a large image dataset with Google Colab -- getting drive timeout + memory errors
Most efficient way to use a large image dataset with Google Colab -- getting drive timeout + memory errors I'm using Google Colab to a classifier in PyTorch and my training dataset has ~30,000 JPEG images which I have stored in my Google Drive. Efficiently using this large amount of data with Colab and Drive has been ...
https://stackoverflow.com/questions/74968093/most-efficient-way-to-use-a-large-image-dataset-with-google-colab-getting-dri
python, machine-learning, deep-learning, pytorch, google-colaboratory
1,672,471,083
se_79684232
stackoverflow
MACHINE_LEARNING
Hyperparameter tuning using Wandb or Keras Tuner - 10 fold Cross Validation
Hyperparameter tuning using Wandb or Keras Tuner - 10 fold Cross Validation If I am using stratified 10-folds for classification/regression tasks, where do I need to define the logic for hyperparameter tuning using Scikit or Wandb? Should it be inside the loop or outside? I am currently unsure where to add that logic ...
https://stackoverflow.com/questions/79684232/hyperparameter-tuning-using-wandb-or-keras-tuner-10-fold-cross-validation
deep-learning, classification, hyperparameters, fine-tuning, optimizer-deeplearning
1,751,255,586
se_79687024
stackoverflow
MACHINE_LEARNING
Neural Network built from scratch using numpy isn't learning
Neural Network built from scratch using numpy isn't learning I'm building a neural network from scratch using only Python and numpy, It's meant for classifying the MNIST data set, I got everything to work but the network isn't really learning, at epoch 0 it's accuracy is about 12% after 20 epochs, it increases to ...
https://stackoverflow.com/questions/79687024/neural-network-built-from-scratch-using-numpy-isnt-learning
python, numpy, machine-learning, deep-learning, neural-network
1,751,441,876
se_79685782
stackoverflow
MACHINE_LEARNING
softmax functions always outputing garbage numbers that don't add up to one
softmax functions always outputing garbage numbers that don't add up to one I am creating a simple NN from scratch that can classify MNIST digits, It only has 1 hidden layer:- Loading the data: import numpy as np import matplotlib.pyplot as plt from keras.datasets import mnist (x_train, y_train), (x_test, y_test)...
https://stackoverflow.com/questions/79685782/softmax-functions-always-outputing-garbage-numbers-that-dont-add-up-to-one
python, numpy, machine-learning, deep-learning, artificial-intelligence
1,751,360,619
se_58692476
stackoverflow
MACHINE_LEARNING
What is Adaptive Average Pooling and how does it work?
What is Adaptive Average Pooling and how does it work? I recently came across a method in Pytorch when I try to implement AlexNet. I don't understand how it works. Please explain the idea behind it (with some examples) and how it is different from Max Pooling or Average Pooling in terms of Neural Network functionality...
https://stackoverflow.com/questions/58692476/what-is-adaptive-average-pooling-and-how-does-it-work
python, math, neural-network, deep-learning, pytorch
1,572,866,793
se_59149138
stackoverflow
MACHINE_LEARNING
How do you invert a tensor of boolean values in Pytorch?
How do you invert a tensor of boolean values in Pytorch? With NumPy, you can do it with np.invert(array), but there's no invert function in Pytorch. Let's say I have a 2D tensor of boolean values: import torch ts = torch.rand((10, 4)) < .5 tensor([[ True, True, False, True], [ True, True, True, True], ...
https://stackoverflow.com/questions/59149138/how-do-you-invert-a-tensor-of-boolean-values-in-pytorch
python, python-3.x, machine-learning, deep-learning, pytorch
1,575,338,009
se_71481711
stackoverflow
MACHINE_LEARNING
OSError for huggingface model
OSError for huggingface model I am trying to use a huggingface model (CamelBERT), but I am getting an error when loading the tokenizer: Code: from transformers import AutoTokenizer, AutoModelForMaskedLM tokenizer = AutoTokenizer.from_pretrained("CAMeL-Lab/bert-base-arabic-camelbert-ca") model = AutoModelForMaskedLM.fr...
https://stackoverflow.com/questions/71481711/oserror-for-huggingface-model
python, deep-learning, nlp, huggingface-transformers, bert-language-model
1,647,344,879
se_79674850
stackoverflow
MACHINE_LEARNING
How can I create a Streamlit app to predict based on my MLP model?
How can I create a Streamlit app to predict based on my MLP model? I am trying to create a Streamlit application that predicts hypertension risk based on patient input data using the MLP (Multilayer Perceptron) model I trained. Below is my Keras model code: from tensorflow.keras.models import Sequential from tensorflo...
https://stackoverflow.com/questions/79674850/how-can-i-create-a-streamlit-app-to-predict-based-on-my-mlp-model
python, deep-learning, streamlit, multiclass-classification, mlp
1,750,559,743
se_79641155
stackoverflow
MACHINE_LEARNING
CNN predicts constant values for sparse amplitude regression — can&#39;t learn true pixel values
CNN predicts constant values for sparse amplitude regression — can&#39;t learn true pixel values I’m training a small CNN (code below) to predict sparse amplitude maps from binary masks. Input: 60×60 image with exactly 15 pixels set to 1, rest are 0. Target: Same size, 0 everywhere except those 15 pixels, which have...
https://stackoverflow.com/questions/79641155/cnn-predicts-constant-values-for-sparse-amplitude-regression-cant-learn-true
tensorflow, machine-learning, deep-learning, pytorch, conv-neural-network
1,748,377,627
se_79656139
stackoverflow
MACHINE_LEARNING
tf.keras: Why my UNet with final layer Conv3D with sigmoid activation gives probabilities less than 0 and more than 1
tf.keras: Why my UNet with final layer Conv3D with sigmoid activation gives probabilities less than 0 and more than 1 I am really confused because this should never happen according to common sense and to all things that I found on the internet. In short. My UNet with sigmoid activation as last layer gives probabiliti...
https://stackoverflow.com/questions/79656139/tf-keras-why-my-unet-with-final-layer-conv3d-with-sigmoid-activation-gives-prob
python, tensorflow, keras, deep-learning
1,749,223,643
se_79618223
stackoverflow
MACHINE_LEARNING
PyTorch3D Build Fails with &quot;Cannot open include file: &#39;thrust/detail/cstdint.h&#39;&quot;
PyTorch3D Build Fails with &quot;Cannot open include file: &#39;thrust/detail/cstdint.h&#39;&quot; I'm trying to build PyTorch3D from source on Windows 11 using CUDA 12.8, but the build fails with the following error during the compilation of CUDA extensions: FAILED: D:/Project/3D_Reconstruction/src/pytorch3d/build/te...
https://stackoverflow.com/questions/79618223/pytorch3d-build-fails-with-cannot-open-include-file-thrust-detail-cstdint-h
python, machine-learning, deep-learning, pytorch, computer-vision
1,747,065,151
se_79663362
stackoverflow
MACHINE_LEARNING
SFTTrainer: The specified `eos_token` (&#39;&lt;EOS_TOKEN&gt;&#39;) is not found in the vocabulary of the given `processing_class` (Qwen2TokenizerFast)
SFTTrainer: The specified `eos_token` (&#39;&lt;EOS_TOKEN&gt;&#39;) is not found in the vocabulary of the given `processing_class` (Qwen2TokenizerFast) I upgraded my Python trl package to version 0.18.1. I use the SFTTrainer of the package to finetune a Qwen2.5 LLM neural net. Previously, I used the TrainingArgument c...
https://stackoverflow.com/questions/79663362/sfttrainer-the-specified-eos-token-eos-token-is-not-found-in-the-vocabu
python, deep-learning, neural-network, huggingface-transformers, huggingface
1,749,724,543
se_56188112
stackoverflow
MACHINE_LEARNING
Table Detection Task (TableBank &amp; Detectron ) : UnicodeDecodeError: &#39;ascii&#39; codec can&#39;t decode byte 0x80 in position 0: ordinal not in range(128)
Table Detection Task (TableBank &amp; Detectron ) : UnicodeDecodeError: &#39;ascii&#39; codec can&#39;t decode byte 0x80 in position 0: ordinal not in range(128) I have been trying to run a python script to test a pretrained model (ResNeXt-101) and visualize the performance of a Table Detection task proposed by TableB...
https://stackoverflow.com/questions/56188112/table-detection-task-tablebank-detectron-unicodedecodeerror-ascii-code
python, machine-learning, deep-learning, object-detection, faster-rcnn
1,558,101,992
se_60667134
stackoverflow
MACHINE_LEARNING
How to visualize 3d joints of a SMPL model based on pose params
How to visualize 3d joints of a SMPL model based on pose params I am trying to use demo.py in nkolot / GraphCMR | GitHub. I am interested in obtaining joints from the inferred SMPL image and visualize it similar to described in README of this project: gulvarol / smplpytorch | GitHub. I also posted the issue here: http...
https://stackoverflow.com/questions/60667134/how-to-visualize-3d-joints-of-a-smpl-model-based-on-pose-params
deep-learning, computer-vision, pytorch
1,584,088,157
se_79666183
stackoverflow
MACHINE_LEARNING
Error forming mini-batch for network input
Error forming mini-batch for network input I am trying to predict vehicle trajectory, using t-30 data sequence to predict until t+30 trajectory. The data I have created is an neighbour occupancy matrix for each frames for each cars, this data is 13x3x1x30x138634 where 13x3 the grid, 1 is the channel, 30 is sequence le...
https://stackoverflow.com/questions/79666183/error-forming-mini-batch-for-network-input
matlab, deep-learning, neural-network, lstm, bilstm
1,749,938,004
se_72725944
stackoverflow
MACHINE_LEARNING
Create custom connection/ non-fully connected layers in Pytorch
Create custom connection/ non-fully connected layers in Pytorch As shown in the figure, it is a 3 layer with NN, namely input layer, hidden layer and output layer. I want to design the NN(in PyTorch, just the arch) where the input to hidden layer is fully-connected. However, from hidden layer to output, the first two ...
https://stackoverflow.com/questions/72725944/create-custom-connection-non-fully-connected-layers-in-pytorch
python, machine-learning, deep-learning, neural-network, pytorch
1,655,968,201
se_73439716
stackoverflow
MACHINE_LEARNING
How to use val.py to calculate mAP on custom testing dataset of YOLOv5?
How to use val.py to calculate mAP on custom testing dataset of YOLOv5? I am trying to calculate mAP on my testing dataset using this: !python val.py --task test I am using a custom data.yaml file. But I don't know how to point to that data.yaml. And when I use the following code: val.py --data= /content/data.yaml -...
https://stackoverflow.com/questions/73439716/how-to-use-val-py-to-calculate-map-on-custom-testing-dataset-of-yolov5
deep-learning, neural-network, computer-vision, conv-neural-network, yolov5
1,661,136,224
se_79662912
stackoverflow
MACHINE_LEARNING
How can I improve the accuracy of my Transformer-based text classification model (news headlines)?
How can I improve the accuracy of my Transformer-based text classification model (news headlines)? I'm training a Transformer-based text classification model from scratch using PyTorch. The goal is to classify news articles (headline + short description) into 15 classes. I'm achieving about 72–75% validation accuracy,...
https://stackoverflow.com/questions/79662912/how-can-i-improve-the-accuracy-of-my-transformer-based-text-classification-model
machine-learning, deep-learning, artificial-intelligence
1,749,702,650
se_79648131
stackoverflow
MACHINE_LEARNING
filedescriptor out of range in select()
filedescriptor out of range in select() I am running a training job using MLflow and an MLflow recipe. In the recipe.train step, the training starts an experiment and runs for 350 epochs. After the 350 epochs are completed and I try to log the artifacts, the process gets stuck for a long time and I keep getting this e...
https://stackoverflow.com/questions/79648131/filedescriptor-out-of-range-in-select
machine-learning, deep-learning, databricks, mlflow
1,748,833,712
se_77444485
stackoverflow
MACHINE_LEARNING
Using positional encoding in pytorch
Using positional encoding in pytorch Is there any built-in positional encoding in pytorch? Basically, I want to be able to specify the dimension of the encoding, and then be able to get the i'th encoding for every i.
https://stackoverflow.com/questions/77444485/using-positional-encoding-in-pytorch
python, deep-learning, pytorch, transformer-model
1,699,437,475
se_70816481
stackoverflow
MACHINE_LEARNING
IndexError: index 89 is out of bounds for axis 0 with size 89
IndexError: index 89 is out of bounds for axis 0 with size 89 I am getting this error but I don't understand how to solve it, can anyone please help? I am trying to run a pre-implemented project on my own text dataset. I am using CUB 200-2011 bird dataset which had initially 11788 birds images and author model has bee...
https://stackoverflow.com/questions/70816481/indexerror-index-89-is-out-of-bounds-for-axis-0-with-size-89
python, machine-learning, deep-learning, pytorch
1,642,880,417
se_79597119
stackoverflow
MACHINE_LEARNING
How to reduce GPU memory usage when running Stable Diffusion with HuggingFace Diffusers?
How to reduce GPU memory usage when running Stable Diffusion with HuggingFace Diffusers? I'm trying to run Stable Diffusion using HuggingFace's diffusers library, but I keep getting CUDA out of memory errors on my RTX 3060 (12GB VRAM). I'm using the standard StableDiffusionPipeline from the "CompVis/stable-diffusion-v...
https://stackoverflow.com/questions/79597119/how-to-reduce-gpu-memory-usage-when-running-stable-diffusion-with-huggingface-di
python, machine-learning, deep-learning, pytorch, stable-diffusion
1,745,866,176
se_55411921
stackoverflow
MACHINE_LEARNING
Is there a pytorch method to check the number of cpus?
Is there a pytorch method to check the number of cpus? I can use this torch.cuda.device_count() to check the number of GPUs. I was wondering if there was something equivalent to check the number of CPUs.
https://stackoverflow.com/questions/55411921/is-there-a-pytorch-method-to-check-the-number-of-cpus
python, neural-network, deep-learning, pytorch
1,553,842,208
se_79655975
stackoverflow
MACHINE_LEARNING
Fourier Neural Operator in tensorflow nearly good
Fourier Neural Operator in tensorflow nearly good I try to implement in tensorflow a Fourier Neural Operator from this paper in 2D. As simple example, i have a single layer that learns to perform a gaussian blur. However, there are littles errors especialy on horizontal lines (right image). I dont know why. Many thank...
https://stackoverflow.com/questions/79655975/fourier-neural-operator-in-tensorflow-nearly-good
python, tensorflow, deep-learning, fft
1,749,215,060
se_79652372
stackoverflow
MACHINE_LEARNING
I&#39;m training a image captioning model and getting Nan in my loss
I&#39;m training a image captioning model and getting Nan in my loss I'm training a image caption model using TensorFlow. I'm using Flickr 8K dataset and I have used ResNet50 to get the encoding of all my images shaped as (m,49,2048) and stored them for training. I have used GloVe 6B 300d vectors for my vocab and embe...
https://stackoverflow.com/questions/79652372/im-training-a-image-captioning-model-and-getting-nan-in-my-loss
image, tensorflow, deep-learning, nan, loss
1,749,025,145
se_79655017
stackoverflow
MACHINE_LEARNING
Confused about r-torch syntax
Confused about r-torch syntax I have been trying to tackle a regression problem by training a neural network to predict a continuous variable using r-torch. My question pertains to the syntax used to achieve this. When initializing the dataset for torch, I have to declare what 'x' and 'y' are. I understand that 'y' is...
https://stackoverflow.com/questions/79655017/confused-about-r-torch-syntax
r, machine-learning, deep-learning, neural-network, torch
1,749,147,688
se_79430117
stackoverflow
MACHINE_LEARNING
How to extract tables from a PDF and convert them into structured HTML (&lt;table&gt;, &lt;tr&gt;, &lt;td&gt;) while maintaining the original layout and formatting?
How to extract tables from a PDF and convert them into structured HTML (&lt;table&gt;, &lt;tr&gt;, &lt;td&gt;) while maintaining the original layout and formatting? 1]Original page of Doc1 contain 4 tables 1]Output .html page of Doc1 not detecting table properly,sometimes extracting text from table as plain text 2]Ori...
https://stackoverflow.com/questions/79430117/how-to-extract-tables-from-a-pdf-and-convert-them-into-structured-html-table
python, machine-learning, deep-learning, langchain, large-language-model
1,739,280,110
se_70965317
stackoverflow
MACHINE_LEARNING
How to fit column wise ordinal encoding
How to fit column wise ordinal encoding I have a dataframe like as shown below tdf = pd.DataFrame({'grade': np.random.choice(list('AAAD'),size=(5)), 'dash': np.random.choice(list('PPPS'),size=(5)), 'dumeel': np.random.choice(list('QWRR'),size=(5)), 'dumma': np.r...
https://stackoverflow.com/questions/70965317/how-to-fit-column-wise-ordinal-encoding
python, pandas, machine-learning, scikit-learn, deep-learning
1,643,856,067
se_57532679
stackoverflow
MACHINE_LEARNING
Why &quot;GELU&quot; activation function is used instead of ReLu in BERT?
Why &quot;GELU&quot; activation function is used instead of ReLu in BERT? The activation function Gaussian Error Linear Units(GELUs) is used in the popular NLP model BERT. Is there any solid reason ?
https://stackoverflow.com/questions/57532679/why-gelu-activation-function-is-used-instead-of-relu-in-bert
deep-learning, nlp
1,566,005,661
se_79647350
stackoverflow
MACHINE_LEARNING
Looking for an efficent JAX function to reconstruct an image from patches
Looking for an efficent JAX function to reconstruct an image from patches I have a set of images in (c, h, w) jax arrays. These arrays have been converted to (patch_index, patch_dim) arrays where patch_dim == c * h * w. I am trying to reconstruct the original images from the patches. Here is vanilla python code that w...
https://stackoverflow.com/questions/79647350/looking-for-an-efficent-jax-function-to-reconstruct-an-image-from-patches
python, machine-learning, deep-learning, computer-vision, jax
1,748,767,774
se_79645357
stackoverflow
MACHINE_LEARNING
Problem in fine tuning DeepLabV3Plus using keras_cv for Semantic Segmentation
Problem in fine tuning DeepLabV3Plus using keras_cv for Semantic Segmentation I'm using open-images-v7 dataset (accessing via fiftyone lib) and keras_cv lib to fine tune DeepLabV3Plus with mobilenet_v3_small backbone, but the accuracy doesn't improve with epochs at all, and I'm getting shape warning. Dataset Preparati...
https://stackoverflow.com/questions/79645357/problem-in-fine-tuning-deeplabv3plus-using-keras-cv-for-semantic-segmentation
python, machine-learning, keras, deep-learning, semantic-segmentation
1,748,603,651
se_55705749
stackoverflow
MACHINE_LEARNING
Should Test and Dev Set have different distribution from Training Set an Dev Set
Should Test and Dev Set have different distribution from Training Set an Dev Set Suppose I am building a network to localize an object. My training data consists of images captured at 5 different locations, and its a small data set ( each location has around 2k images ). Should I add all the images, shuffle them and t...
https://stackoverflow.com/questions/55705749/should-test-and-dev-set-have-different-distribution-from-training-set-an-dev-set
machine-learning, neural-network, deep-learning, conv-neural-network
1,555,409,618
se_73471929
stackoverflow
MACHINE_LEARNING
How to use OneCycleLR?
How to use OneCycleLR? I want to train on CIFAR-10, suppose for 200 epochs. This is my optimizer: optimizer = optim.Adam([x for x in model.parameters() if x.requires_grad], lr=0.001) I want to use OneCycleLR as scheduler. Now, according to the documentation, these are the parameters of OneCycleLR: torch.optim.lr_sched...
https://stackoverflow.com/questions/73471929/how-to-use-onecyclelr
optimization, deep-learning, neural-network, pytorch, learning-rate
1,661,338,702
se_57977880
stackoverflow
MACHINE_LEARNING
Testing that I&#39;ve installed PyTorch correctly
Testing that I&#39;ve installed PyTorch correctly I have installed the PyTorch. How can I test in my Python script whether the installation is correct, e.g., whether it can enable CUDA or not, etc?
https://stackoverflow.com/questions/57977880/testing-that-ive-installed-pytorch-correctly
deep-learning, pytorch
1,568,735,406
se_70906050
stackoverflow
MACHINE_LEARNING
How many num_workers in DataLoader?
How many num_workers in DataLoader? I have a machine with 1500 Gb of ram and 112 cores but no GPU. I would like to know how to calculate suitable number of num_workers in DataLoader and batch size. I have to make the inference with Inception-v3(pytorch) on 80,000,000 images. I tried with a batch size of 30k and num_wo...
https://stackoverflow.com/questions/70906050/how-many-num-workers-in-dataloader
python, machine-learning, deep-learning, pytorch
1,643,463,981
se_73874287
stackoverflow
MACHINE_LEARNING
How do I resolve the error: Attempting to use a delegate that only supports static-sized tensors with a graph that has dynamic-sized tensors?
How do I resolve the error: Attempting to use a delegate that only supports static-sized tensors with a graph that has dynamic-sized tensors? I am trying to compile an image segmentation (U-net) model to run it on edge TPU (Coral Board). I have converted and quantized the model into .tflite and I am getting the follow...
https://stackoverflow.com/questions/73874287/how-do-i-resolve-the-error-attempting-to-use-a-delegate-that-only-supports-stat
python, tensorflow, deep-learning, tflite, edge-tpu
1,664,316,884
se_63006575
stackoverflow
MACHINE_LEARNING
What is the difference between MaxPool and MaxPooling layers in Keras?
What is the difference between MaxPool and MaxPooling layers in Keras? I just started working with keras and noticed that there are two layers with very similar names for max-pooling: MaxPool and MaxPooling. I was surprised that I couldn't find the difference between these two on Google; so I am wondering what the dif...
https://stackoverflow.com/questions/63006575/what-is-the-difference-between-maxpool-and-maxpooling-layers-in-keras
python, tensorflow, machine-learning, keras, deep-learning
1,595,299,480
se_70097798
stackoverflow
MACHINE_LEARNING
Does number of parameters and FLOPS change when converting a model from PyTorch to ONNX or TensorRT format?
Does number of parameters and FLOPS change when converting a model from PyTorch to ONNX or TensorRT format? Does number of parameters and FLOPS (float operations per second) change when converting a model from PyTorch to ONNX or TensorRT format?
https://stackoverflow.com/questions/70097798/does-number-of-parameters-and-flops-change-when-converting-a-model-from-pytorch
deep-learning, pytorch, onnx, tensorrt
1,637,763,821
se_79597666
stackoverflow
MACHINE_LEARNING
RuntimeError: mat1 and mat2 shapes cannot be multiplied when using gradcam
RuntimeError: mat1 and mat2 shapes cannot be multiplied when using gradcam I made a cnn model like this and trained the batch dataset. My data preprocessing code was this train_dir = r'C:\Users\roobe\BACH\norm\train\patches\train' # 훈련 데이터 폴더 val_dir = r'C:\Users\roobe\BACH\norm\train\patches\val' # 검증 데이터 폴더 # 데이터...
https://stackoverflow.com/questions/79597666/runtimeerror-mat1-and-mat2-shapes-cannot-be-multiplied-when-using-gradcam
python, tensorflow, machine-learning, deep-learning
1,745,904,934
se_53972159
stackoverflow
MACHINE_LEARNING
How does Pytorch&#39;s &quot;Fold&quot; and &quot;Unfold&quot; work?
How does Pytorch&#39;s &quot;Fold&quot; and &quot;Unfold&quot; work? I've gone through the official doc. I'm having a hard time understanding what this function is used for and how it works. Can someone explain this in layman's terms?
https://stackoverflow.com/questions/53972159/how-does-pytorchs-fold-and-unfold-work
python, machine-learning, deep-learning, computer-vision, pytorch
1,546,107,254
se_42480111
stackoverflow
MACHINE_LEARNING
How do I print the model summary in PyTorch?
How do I print the model summary in PyTorch? How do I print the summary of a model in PyTorch like what model.summary() does in Keras: Model Summary: ____________________________________________________________________________________________________ Layer (type) Output Shape Param # C...
https://stackoverflow.com/questions/42480111/how-do-i-print-the-model-summary-in-pytorch
python, machine-learning, deep-learning, pytorch
1,488,180,942
se_61598771
stackoverflow
MACHINE_LEARNING
`squeeze()` vs `unsqueeze()` in PyTorch
`squeeze()` vs `unsqueeze()` in PyTorch I don't understand what squeeze() and unsqueeze() do to a tensor, even after looking at the docs and related questions. I tried to understand it by exploring it myself in python. I first created a random tensor with x = torch.rand(3,2,dtype=torch.float) >>> x tensor([[0.3703, 0....
https://stackoverflow.com/questions/61598771/squeeze-vs-unsqueeze-in-pytorch
python, machine-learning, deep-learning, pytorch, tensor
1,588,615,598
se_54307225
stackoverflow
MACHINE_LEARNING
`stack()` vs `cat()` in PyTorch
`stack()` vs `cat()` in PyTorch OpenAI's REINFORCE and actor-critic example for reinforcement learning has the following code: REINFORCE: policy_loss = torch.cat(policy_loss).sum() actor-critic: loss = torch.stack(policy_losses).sum() + torch.stack(value_losses).sum() One is using torch.cat, the other uses torch.sta...
https://stackoverflow.com/questions/54307225/stack-vs-cat-in-pytorch
python, machine-learning, deep-learning, pytorch, concatenation
1,548,156,287
se_66488807
stackoverflow
MACHINE_LEARNING
PyTorch model input shape
PyTorch model input shape I loaded a custom PyTorch model and I want to find out its input shape. Something like this: model.input_shape Is it possible to get this information? Update: print() and summary() don't show this model's input shape, so they are not what I'm looking for.
https://stackoverflow.com/questions/66488807/pytorch-model-input-shape
python, machine-learning, deep-learning, pytorch, conv-neural-network
1,614,931,192
se_57234095
stackoverflow
MACHINE_LEARNING
What is the difference between .flatten() and .view(-1) in PyTorch?
What is the difference between .flatten() and .view(-1) in PyTorch? Both .flatten() and .view(-1) flatten a tensor in PyTorch. What's the difference? Does .flatten() copy the data of the tensor? Is .view(-1) faster? Is there any situation that .flatten() doesn't work?
https://stackoverflow.com/questions/57234095/what-is-the-difference-between-flatten-and-view-1-in-pytorch
python, machine-learning, deep-learning, pytorch
1,564,245,319
se_57237352
stackoverflow
MACHINE_LEARNING
What does &quot;unsqueeze&quot; do in Pytorch?
What does &quot;unsqueeze&quot; do in Pytorch? The PyTorch documentation says: Returns a new tensor with a dimension of size one inserted at the specified position. [...] >>> x = torch.tensor([1, 2, 3, 4]) >>> torch.unsqueeze(x, 0) tensor([[ 1, 2, 3, 4]]) >>> torch.unsqueeze(x, 1) tensor([[ 1], [ 2], ...
https://stackoverflow.com/questions/57237352/what-does-unsqueeze-do-in-pytorch
python, numpy, machine-learning, deep-learning, pytorch
1,564,278,223
se_77418680
stackoverflow
MACHINE_LEARNING
Should the shuffle=True argument be used during training in torch.utils.data.DataLoader() when we have time series data?
Should the shuffle=True argument be used during training in torch.utils.data.DataLoader() when we have time series data? I am confused regarding whether the shuffle=True argument should be used in the pytorch torch.utils.data.DataLoader() during training when the training data are time series data. I believe that shuf...
https://stackoverflow.com/questions/77418680/should-the-shuffle-true-argument-be-used-during-training-in-torch-utils-data-dat
python, deep-learning, pytorch, time-series, pytorch-dataloader
1,699,033,125
se_33962226
stackoverflow
MACHINE_LEARNING
Common causes of nans during training of neural networks
Common causes of nans during training of neural networks I've noticed that a frequent occurrence during training is NANs being introduced. Often times it seems to be introduced by weights in inner-product/fully-connected or convolution layers blowing up. Is this occurring because the gradient computation is blowing ...
https://stackoverflow.com/questions/33962226/common-causes-of-nans-during-training-of-neural-networks
machine-learning, neural-network, deep-learning, caffe, gradient-descent
1,448,645,010
se_76644106
stackoverflow
MACHINE_LEARNING
How to resolve runtime error in CNN model related to mismatch input size?
How to resolve runtime error in CNN model related to mismatch input size? I am trying to run a CNN model on a synthetic dataset consisting of 4000 sample of semi simple random points with 2 features and 1 cluster per class and input data size x is [4000,2] and corresponding labels size is [4000]. I understand that as ...
https://stackoverflow.com/questions/76644106/how-to-resolve-runtime-error-in-cnn-model-related-to-mismatch-input-size
machine-learning, deep-learning, pytorch, neural-network, conv-neural-network
1,688,836,447
se_79611606
stackoverflow
MACHINE_LEARNING
Is it safe to save preprocessed features with numpy in one Python environment and load them in another for model training?
Is it safe to save preprocessed features with numpy in one Python environment and load them in another for model training? I'm working on a deepfake detection project using TensorFlow 2.6.2 on Windows. Due to package version conflicts (e.g. tensorflow==2.6.2 requires flatbuffers==1.12, but mediapipe requires flatbuffe...
https://stackoverflow.com/questions/79611606/is-it-safe-to-save-preprocessed-features-with-numpy-in-one-python-environment-an
python, tensorflow, deep-learning
1,746,668,140
se_78975293
stackoverflow
MACHINE_LEARNING
Linear FFNN Model achieving 100% accuracy in predicting sums
Linear FFNN Model achieving 100% accuracy in predicting sums I have a model that adds numbers between -10 to positive 10. The task is simply to predict the sum of those numbers. However the train accuracy quickly reaches 100%. I am not sure if the model is just quickly training, or if there is something wrong and it i...
https://stackoverflow.com/questions/78975293/linear-ffnn-model-achieving-100-accuracy-in-predicting-sums
python, machine-learning, deep-learning, pytorch, perceptron
1,726,080,228
se_79609919
stackoverflow
MACHINE_LEARNING
How to make NN really find optimal solution during training?
How to make NN really find optimal solution during training? Imagine a simple problem: make a function that gets a month index as input (zero-based: 0=Jan, 1=Feb, etc) and outputs number of days in this month (leap year ignored). Of course, using NN for that task is an overkill, but I wondered, can NN actually be trai...
https://stackoverflow.com/questions/79609919/how-to-make-nn-really-find-optimal-solution-during-training
machine-learning, deep-learning, pytorch, artificial-intelligence
1,746,600,444
se_79607852
stackoverflow
MACHINE_LEARNING
GNN Loss NaN after first training example?
GNN Loss NaN after first training example? I am trying to train a GNN but am getting a NaN loss function immediately after the first training example. Below I have included all of the pertinent code. My input is 385 points in 3D space confined to a box with periodic boundary conditions. My model takes 5 inputs: a 385...
https://stackoverflow.com/questions/79607852/gnn-loss-nan-after-first-training-example
python, tensorflow, keras, deep-learning
1,746,496,141
se_64488034
stackoverflow
MACHINE_LEARNING
InceptionResnetV2 STEM block keras implementation mismatch the one in the original paper?
InceptionResnetV2 STEM block keras implementation mismatch the one in the original paper? I've been trying to compare the InceptionResnetV2 model summary from Keras implementation with the one specified in their paper, and it doesn't seem to show much resemblance when it comes to the filter_concat block. The first lin...
https://stackoverflow.com/questions/64488034/inceptionresnetv2-stem-block-keras-implementation-mismatch-the-one-in-the-origin
keras, deep-learning, neural-network, conv-neural-network
1,603,389,756
se_49643603
stackoverflow
MACHINE_LEARNING
Spark deep learning Import error
Spark deep learning Import error I am trying to replicate a deep learning project from https://medium.com/linagora-engineering/making-image-classification-simple-with-spark-deep-learning-f654a8b876b8 . I am working on spark version 1.6.3. I have installed keras and tensorflow. But everytime i try to import from sparkd...
https://stackoverflow.com/questions/49643603/spark-deep-learning-import-error
apache-spark, pyspark, deep-learning
1,522,820,574
se_79603047
stackoverflow
MACHINE_LEARNING
ray.tune: Tracked actor is not managed
ray.tune: Tracked actor is not managed from ray import tune from ray.tune.search.optuna import OptunaSearch from ray.tune.integration.pytorch_lightning import TuneReportCheckpointCallback from pytorch_lightning import Trainer from pytorch_lightning.callbacks import EarlyStopping from data_module import D...
https://stackoverflow.com/questions/79603047/ray-tune-tracked-actor-is-not-managed
python, machine-learning, deep-learning, neural-network, ray
1,746,175,215
se_79603121
stackoverflow
MACHINE_LEARNING
ComfyUI LHM Node: &quot;LHM stack expects a non-empty TensorList&quot; errors when running workflow
ComfyUI LHM Node: &quot;LHM stack expects a non-empty TensorList&quot; errors when running workflow I'm trying to use the LHM ComfyUI Node from this GitHub repository. I followed all the installation steps provided in the repo. However, I encountered several issues: The provided workflow JSON couldn't be opened at fi...
https://stackoverflow.com/questions/79603121/comfyui-lhm-node-lhm-stack-expects-a-non-empty-tensorlist-errors-when-running
deep-learning, artificial-intelligence, stable-diffusion
1,746,177,991
se_70871980
stackoverflow
MACHINE_LEARNING
Is there an annotation tool for instance segmentation on Ipad?
Is there an annotation tool for instance segmentation on Ipad? Is there an annotation tool to produce multi layer (for overlapping objects within the image) and pixel exact image annotations on IPad? Background to my question: There a lot of annotation tools for Linux and Windows (e.g. the ones listed here: https://ww...
https://stackoverflow.com/questions/70871980/is-there-an-annotation-tool-for-instance-segmentation-on-ipad
ipad, deep-learning, pytorch, image-annotations
1,643,244,001
se_79495211
stackoverflow
MACHINE_LEARNING
OSError when importing PyTorch: &quot;Error loading torch_python.dll or one of its dependencies&quot;
OSError when importing PyTorch: &quot;Error loading torch_python.dll or one of its dependencies&quot; I installed PyTorch using pip install torch, but when I try to import it, I get the following error: OSError Traceback (most recent call last) Cell In[1], line 1 ----> 1 import to...
https://stackoverflow.com/questions/79495211/oserror-when-importing-pytorch-error-loading-torch-python-dll-or-one-of-its-de
machine-learning, deep-learning, pytorch
1,741,478,612
se_79600027
stackoverflow
MACHINE_LEARNING
How to implement support for multiple dynamic model responses in deep-chat Angular?
How to implement support for multiple dynamic model responses in deep-chat Angular? enter image description hereI am working with the deep-chat library and am trying to support multiple models in my setup. Specifically, I want to handle multiple models inside the onMessage event by making manual fetch requests to dyna...
https://stackoverflow.com/questions/79600027/how-to-implement-support-for-multiple-dynamic-model-responses-in-deep-chat-angul
javascript, angular, deep-learning, chat-gpt-4
1,746,005,691
se_68058974
stackoverflow
MACHINE_LEARNING
How to do batch inferenece for Hugging face models?
How to do batch inferenece for Hugging face models? I want to do batch inference on MarianMT model. Here's the code: from transformers import MarianTokenizer tokenizer = MarianTokenizer.from_pretrained('Helsinki-NLP/opus-mt-en-de') src_texts = [ "I am a small frog.", "Tom asked his teacher for advice."] tgt_texts = ["...
https://stackoverflow.com/questions/68058974/how-to-do-batch-inferenece-for-hugging-face-models
machine-learning, deep-learning, nlp, huggingface-transformers, machine-translation
1,624,214,150
se_77792137
stackoverflow
MACHINE_LEARNING
How to fix the learning-rate for Huggingface&#180;s Trainer?
How to fix the learning-rate for Huggingface&#180;s Trainer? I'm training model with the following parameters: Seq2SeqTrainingArguments( output_dir = "./out", overwrite_output_dir = True, do_train = True, do_eval = True, per_d...
https://stackoverflow.com/questions/77792137/how-to-fix-the-learning-rate-for-huggingface%c2%b4s-trainer
machine-learning, deep-learning, huggingface-transformers, huggingface-trainer, learning-rate
1,704,878,066
se_79419018
stackoverflow
MACHINE_LEARNING
YOLOv8 Final Detection Head Still Outputs (1, 7, 8400) Instead of (1, 8, 8400) for 3 Classes
YOLOv8 Final Detection Head Still Outputs (1, 7, 8400) Instead of (1, 8, 8400) for 3 Classes I trained a YOLOv8 detection model with 3 classes, but the raw forward pass still shows a final detect output of (1, 7, 8400) instead of (1, 8, 8400). What I’ve Done: Checked my data.yaml: train: path/to/train/images val: path...
https://stackoverflow.com/questions/79419018/yolov8-final-detection-head-still-outputs-1-7-8400-instead-of-1-8-8400-f
machine-learning, deep-learning, pytorch, yolov8, ultralytics
1,738,867,161
se_79590419
stackoverflow
MACHINE_LEARNING
Trouble loading tensorflow when running cloned repo
Trouble loading tensorflow when running cloned repo So, I'm trying to get the code from this repo https://github.com/amin20/GBM_WSSM working but I'm running into a persistent error. Using TensorFlow backend. Traceback (most recent call last): File "C:\Users\trans\source\repos\GBM_WSSM\.venv\lib\site-packages\tensorf...
https://stackoverflow.com/questions/79590419/trouble-loading-tensorflow-when-running-cloned-repo
python, tensorflow, keras, deep-learning
1,745,492,847
se_77842203
stackoverflow
MACHINE_LEARNING
ValidationError: 2 validation errors for LLMChain
ValidationError: 2 validation errors for LLMChain This is my complete code: !pip install -q transformers einops accelerate langchain bitsandbytes sentence_transformers faiss-cpu pypdf sentencepiece from langchain import HuggingFacePipeline from transformers import AutoTokenizer from langchain.embeddings impo...
https://stackoverflow.com/questions/77842203/validationerror-2-validation-errors-for-llmchain
python, machine-learning, deep-learning, langchain, large-language-model
1,705,609,248
se_79583654
stackoverflow
MACHINE_LEARNING
Logits Don&#39;t Change in a Custom Reimplementation of a CLIP model [PyTorch]
Logits Don&#39;t Change in a Custom Reimplementation of a CLIP model [PyTorch] The problem The similarity scores are almost the same for texts that describe both a photo of a cat and a dog (the photo is of a cat). Cat similarity: tensor([[-3.5724]], grad_fn=<MulBackward0>) Dog similarity: tensor([[-3.4155]], grad_fn=<...
https://stackoverflow.com/questions/79583654/logits-dont-change-in-a-custom-reimplementation-of-a-clip-model-pytorch
python, deep-learning, pytorch, artificial-intelligence, transformer-model
1,745,174,763
se_79584724
stackoverflow
MACHINE_LEARNING
Is there a way to update weights of an nnx.Module in Flax&#39;s NNX using the lax.scan function?
Is there a way to update weights of an nnx.Module in Flax&#39;s NNX using the lax.scan function? I have a neural network (nnx.Module) written in Flax's NNX. I want to train this network efficiently using lax.scan instead of a for loop. However, as scan doesn't allow in place changes, how can I update the weights of my...
https://stackoverflow.com/questions/79584724/is-there-a-way-to-update-weights-of-an-nnx-module-in-flaxs-nnx-using-the-lax-sc
deep-learning, jax, flax
1,745,242,153
se_74411789
stackoverflow
MACHINE_LEARNING
How to use early terminate in wandb sweep?
How to use early terminate in wandb sweep? I am trying to use wandb sweep to tune the hyperparameter in a model, and also try to use the hyperband early terminate method to accelerate it. However, I don't understand how this mechanism works by looking up the docs https://docs.wandb.ai/guides/sweeps/define-sweep-config...
https://stackoverflow.com/questions/74411789/how-to-use-early-terminate-in-wandb-sweep
deep-learning, hyperparameters, wandb
1,668,245,466
se_79582481
stackoverflow
MACHINE_LEARNING
Torch gradient estimates disagreeing with analytic and perturbation approximated gradients
Torch gradient estimates disagreeing with analytic and perturbation approximated gradients I'm faced with a problem where as the title says I'm having trouble with the torch package's built in automatic differentiation algorithms (or my usage?). I think it was meant to be used on mini-batches in my assignment but it s...
https://stackoverflow.com/questions/79582481/torch-gradient-estimates-disagreeing-with-analytic-and-perturbation-approximated
deep-learning, pytorch, neural-network, gradient-descent
1,745,071,934
se_79559377
stackoverflow
MACHINE_LEARNING
How to handle outputs of variable length when predicting with a Feed Forward Neural Network?
How to handle outputs of variable length when predicting with a Feed Forward Neural Network? I am working on a regression problem where, given an input X of fixed size, the output Y can be a sequence of values of variable length. Both input and output are normalised float values. Thus, we are talking about a regressio...
https://stackoverflow.com/questions/79559377/how-to-handle-outputs-of-variable-length-when-predicting-with-a-feed-forward-neu
machine-learning, deep-learning, neural-network
1,744,013,634
se_65616825
stackoverflow
MACHINE_LEARNING
DCgAN generates only noises
DCgAN generates only noises I'm new to GANs and I have trouble in training DCGAN on mnist, when I was working with GAN with linear layers everything was fine and the generator generates pretty good images. But when I started working with Convolutional GAN, the generator generators only noise. Does anybody know how to ...
https://stackoverflow.com/questions/65616825/dcgan-generates-only-noises
machine-learning, deep-learning, neural-network, generative-adversarial-network, dcgan
1,610,039,116
se_79354623
stackoverflow
MACHINE_LEARNING
Low accuracy using vision transformers for Image classification
Low accuracy using vision transformers for Image classification I'be been learning workings of an Vision transformer, I couldn't get it to run at first(building the ViT from scratch). But somehow I managed to scramble up a code that shows very low accuracy(3%). Tried chatgpting myself through it, couldn't seem to figu...
https://stackoverflow.com/questions/79354623/low-accuracy-using-vision-transformers-for-image-classification
python, machine-learning, deep-learning, computer-vision, transformer-model
1,736,849,235
se_79429910
stackoverflow
MACHINE_LEARNING
Using tf.keras.utils.image_dataset_from_directory mismatches labels on the images
Using tf.keras.utils.image_dataset_from_directory mismatches labels on the images Here's the code train_dset = image_dataset_from_directory( directory = data_path, batch_size = 32, image_size = (256,256), label_mode = "int", shuffle = True ) in data_path, I have -> dataset |-> train |-> ...
https://stackoverflow.com/questions/79429910/using-tf-keras-utils-image-dataset-from-directory-mismatches-labels-on-the-image
python, tensorflow, keras, deep-learning, conv-neural-network
1,739,275,721
se_79571227
stackoverflow
MACHINE_LEARNING
DIfference in variable values in jax non-jit runtime and jit transformed runtime
DIfference in variable values in jax non-jit runtime and jit transformed runtime I have a deep learning mode which I am running in the jit transformed manner by: my_function_checked = checkify.checkify(model.apply) model_jitted = jax.jit(my_function_checked) err, pred = model_jitted({"params": params}, batch, ...
https://stackoverflow.com/questions/79571227/difference-in-variable-values-in-jax-non-jit-runtime-and-jit-transformed-runtime
python, deep-learning, pytorch, artificial-intelligence, jax
1,744,522,432