27,750 questions
0
votes
0
answers
3
views
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=...
0
votes
0
answers
13
views
Contrastive Loss from Scratch
so I am following a post online for implementing a contrastive loss function in python like this
class ContrastiveLoss(nn.Module):
def __init__(self, temperature=0.05):
super(...
-2
votes
0
answers
18
views
MLP engine in Tidymodels doesn't allow to set both dropout and L2 penalty [closed]
When trying to train a MLP in R using the Tidymodels framework tuning both dropout and L2 penalty is not possible. Actually, in the documentation of MLP it is clearly stated that both should not be ...
1
vote
1
answer
18
views
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 ...
0
votes
0
answers
26
views
How to Stitch Multiple Images with Occlusion to Get a Complete View of a Circuit Board? [closed]
I am working on a project where I need to detect indicator lights on a circuit board that is partially occluded by a grid. The images are captured from different angles, and the grid causes parts of ...
0
votes
0
answers
8
views
Kernel Dies When Testing a Quantized ResNet101 Model in PyTorch
Issue: I am encountering a kernel dies problem specifically during inference when using a quantized ResNet101 model in PyTorch. The model trains and quantized successfully, but the kernel dies when ...
0
votes
0
answers
9
views
Is data parallelism required when training a ranking model with millions of candidate lists?
I’m trying to train a deep learning ranking model using list-wise loss. A single candidate list has approximately 100 items. If I have tens of millions of candidate lists, and if I can only afford one ...
0
votes
0
answers
15
views
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 ...
0
votes
0
answers
14
views
How to reshape image tensor in pytorch
I am playing with the MNIST dataset, where each image is represented as a grayscale row of length 784, and I want to reformat it as 28x28:
DIM = int(len(features)**0.5)
X_train_tensor = torch.tensor(...
-2
votes
0
answers
13
views
Where can I find datasets for medical document analysis and disease diagnosis using NLP? [closed]
I'm working on a healthcare-related project where I need to analyze medical documents, extract specific values (e.g., creatinine, glucose levels, etc.), and generate personalized paragraphs for ...
0
votes
1
answer
15
views
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 ...
-1
votes
0
answers
26
views
How to split and spelling correct arabic text without spaces into list of words
I'm looking for a way to split and spelling correct the arabic text without spacing, just like in Microsoft Word for example:
تشرابالقطط الحليب
Expected:
[تشرب، القطط، الحليب]
If there Is no ready ...
0
votes
0
answers
21
views
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 ...
-1
votes
1
answer
36
views
How to deal with the binary classification problem of unbalanced sample data? [closed]
I tried to classify a certain attribute of the sample data into 2 categories. However, due to the severe imbalance in the number of positive and negative examples corresponding to the attribute in the ...
-2
votes
0
answers
47
views
Client error '403 Forbidden' for url while trying to download Llama3.3-70B-Instruct [closed]
I tried to download Llama with
$ llama model download --source meta --model-id Llama3.3-70B-Instruct
and entering my URL.
But, it gives me an error. I am using a pyhton3.11 virtual environment on ...
0
votes
0
answers
17
views
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 ...
-1
votes
0
answers
23
views
Does the ill-conditioning of the design matrix affect the ill-conditioning of the Hessian in the context of DL? [closed]
I know that when we use the square loss as our cost function in DL, the ill-conditioning of the Hessian is directly tied to that of the design matrix, does this apply to other cost functions?
If so, ...
0
votes
0
answers
26
views
SB3 for imitation learning. How to force demonstration action at given state?
I am trying to train a RL agent using SB3 (PPO algorithm), Gymnasium, and PyTorch.
As the dynamics of the environment is quite complex, I have a dataset of about 200 trajectories that I can use as ...
0
votes
0
answers
27
views
Segment anything(Meta Sapiens) fps on cpu [closed]
I have a 2017 MacBook Pro with intel i7 cpu and AMD Radeon Pro 555 gpu. I want use this model: 'sapiens_1b_goliath_best_goliath_mIoU_7994_epoch_151_torchscript.pt2' for segmentation. The input is ...
0
votes
0
answers
31
views
I can't train a model on my GPU getting CUDA-Assertion-Error [closed]
Here is my neural network code, using pytorch:
class BLSTM(nn.Module):
def __init__(self,vocab_size):
super(BLSTM,self).__init__()
self.Embeddings = nn.Embedding(...
-2
votes
0
answers
45
views
Guide on building an Invoice OCR model [closed]
My project is about building an OCR model to scan invoices, and these invoices have both handwritten and computer-generated text.
At first, I thought of using Tesseract, but after doing some research, ...
-3
votes
0
answers
39
views
Detect Any Thing using C# [closed]
I want to be able to detect any kind of objects in an image using pure C# code.
We used Tcp , in the c# the user will enter the image, it will be sent to the model on python, the model will segment ...
-1
votes
0
answers
16
views
How to properly train a GAN model? [migrated]
I tried to train a ViT-GAN model (from this repo) on my database, where i have images as input and output. The input image is a PNG map of a path planning problem. Red channel is obstacle map, green ...
-2
votes
1
answer
23
views
Training deep learning model on new medical images [closed]
I have a DL-based model for registration of medical images and I've trained it on dataset (MRI images of brain), given in the GitHub repo of the model. Now I want to train it on my own dataset (FBCT ...
1
vote
0
answers
21
views
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 ...
0
votes
0
answers
25
views
KeyError raised at input layer when trying to build a model with 2 inputs
KeyError: "Exception encountered when calling Functional.call().\n\n\x1b[1m140112707155856\x1b[0m\n\nArguments
received by Functional.call():
\n • inputs={'input_1': 'tf.Tensor(shape=(None, 256,...
0
votes
0
answers
11
views
How to log only the current script file to W&B code panel immediately?
How can I ensure that only the current script file (e.g., train.py) is logged to the W&B Code panel when running a script, without logging the entire directory?
Currently, I'm using:
wandb.run....
0
votes
1
answer
57
views
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 ...
-1
votes
0
answers
18
views
How to find mapping between two matrices where matrix one is of shape [B, n, features] and other is of shape [B, m, features] using ML/DL models [closed]
I am working on a problem where I need to map one matrix to another. consider X and Y as follows
X has shape [batch_size, seq_len_1, feature_dim]
Y has shape [batch_size, seq_len_2, feature_dim]
Here, ...
-2
votes
0
answers
18
views
How to reduce overfitting in my pytorch neural network [closed]
I am doing binary classification, any suggestions?
class NeuralNetModel(torch.nn.Module):
def __init__(self, input_dim, linear1_dim, output_dim=1):
assert linear1_dim//2 > 1, ...
0
votes
0
answers
27
views
Multi output Keras model - Arguments `target` and `output` must have the same rank (ndim)
Here is my model:
X, Y_segmentation, Y_classification, X_filenames, Y_filenames = shuffle(
np.array(X), np.array(Y_segmentation), np.array(Y_classification),
X_filenames, Y_filenames, ...
0
votes
1
answer
26
views
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 = ...
-2
votes
0
answers
36
views
Tried to develop an UI for Brain MRI image classification
I am using Google Colab python Notebook to develop the UI for my brain tumor classification demo frontend by importing streamlit, and run a app.py file for the interface. I am going to let the user ...
-2
votes
0
answers
24
views
Building inference for 3D point cloud using Pointcept V3 Point Transformer [closed]
import torch
from torch.utils.data import Dataset, DataLoader
import numpy as np
import open3d as o3d
from pointcept.models.point_transformer_v3.point_transformer_v3m1_base import PointTransformerV3
...
-3
votes
0
answers
31
views
How can we improve image reconstruction from fMRI brain activity using Algonauts data?
I need help with the Argonauts Image Reconstruction task using brain fMRI data.I have images of places and objects paired with corresponding fMRI scans. I'm using autoencoders to obtain latent codes ...
-1
votes
0
answers
14
views
How to handle varying Feature Dimensions in Graph Neural Networks training?
I have a question about how to handle datasets with different feature dimensions when training Graph Neural Networks (GNNs). For example, in one dataset (Dataset A), the node features have a dimension ...
-1
votes
0
answers
27
views
Tensorflow model takes so much RAM in google colab
When i try to train this model and this model doenst even have many trainable parameters, in google colab it crashes because it uses all the ram, i have a dataset of mp3 files, each mp3 file is 128 ...
0
votes
1
answer
74
views
"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 'aten::add.out' with arguments from the 'QuantizedCPU' ...
4
votes
3
answers
117
views
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 ...
1
vote
0
answers
23
views
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 ...
-1
votes
1
answer
54
views
"TypeError: object of type 'numpy.float32' has no len()" - DeepSORT Integration with YOLO
I'm integrating YOLOv8 with DeepSORT for multi-object tracking, but I'm encountering a TypeError when passing detection data to the DeepSORT update_tracks() function.
Error Message:
Speed: 4.5ms ...
0
votes
1
answer
23
views
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 ...
0
votes
0
answers
34
views
Multi-GPU fine-tuning llama issue. RuntimeError: Expected all tensors to be on the same device, but found at least two devices, cuda:2 and cuda:0
I am working on a llama fine-tuning task. When I train on a single GPU, the program runs fine.
import os
os.environ["CUDA_VISIBLE_DEVICES"] = "0"
os.environ["...
1
vote
0
answers
16
views
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 ...
0
votes
1
answer
55
views
How to Log Training Loss at Step Zero in Hugging Face Trainer or SFT Trainer?
’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 ...
1
vote
0
answers
40
views
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 ...
0
votes
0
answers
34
views
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,...
-1
votes
1
answer
64
views
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 ...
0
votes
0
answers
23
views
Missing a required argument: 'dec_input' in Transformer Model
I am busy with a forecasting model, and have turned to Transformers to see if they will be able to perform better than other sequence models.
I keep getting the error:
TypeError ...
-2
votes
0
answers
24
views
keep getting TypeError: load_model() missing 1 required positional argument: 'filepath' in tf version 2.15.0
I'm trying to load a model to use to for predictions, but it seems the model failed to load
my tf version: tensorflow 2.15.0
model = load_model('model.h5')
img_path = "app\model\test.jpg"
...