Questions tagged [python]

For questions related to AI implementation in the Python language

Filter by
Sorted by
Tagged with
0 votes
0 answers
27 views

Relating two small datasets with Poisson in a neural network or random network

I'm looking for a way to "relate" two small datasets, in Python, for predictive purposes. The two datasets are both independent and have no correlation (the numbers are randomly positioned). ...
Horiatiki's user avatar
  • 101
0 votes
0 answers
13 views

How to let the AI trained on MNIST recognize my own hand-written number?

I have already trained a simple model without using any frameworks to recognize the hand-written numbers from the MNIST dataset. Actually it's just a copy of the example on the book Grokking ...
Jason Jia's user avatar
0 votes
0 answers
6 views

NaN gradients while Training (but loss isn't NaN neither the computational graph is disconnected)

The reason I am asking this here is that I haven't found a bug in my code and maybe there isn't a bug at all (or maybe there is). I just want to validate the idea that I am trying to implement. Here ...
Ryukendo Dey's user avatar
1 vote
1 answer
41 views

Why are these two implementations of the $\epsilon$-greedy policy different?

According to the book Reinforcement Learning An Introduction, the epsilon greedy policy can generally implemented as: $$ \pi(a|s) = \begin{cases} \frac{\epsilon}{|A|} + 1 - \epsilon & \text{if } ...
kklaw's user avatar
  • 143
1 vote
0 answers
24 views

cGAN: Discriminator loss going to zero while Generator's going always up but the result is very good

I have a Conditional Generative Adversarial Network for Quantum State Tomography. The metrics I am monitoring during the training process are the losses and the Fidelity (the degree of similarity ...
Dimitri's user avatar
  • 11
-1 votes
0 answers
28 views

Diffusion model for image to image translation

I am interested in using the diffusion model for image-to-image translation (pair images). I used this repository for semantic image synthesis via diffusion models Code. How can I use it for image-to-...
yun dan's user avatar
1 vote
1 answer
52 views

RL agent for autonomous vehicle is able to follow the road but can't avoid crashing at all (Highway-Env / Racetrack Env.)

I coded some deep RL algorithms (DQN and SAC) with tf2/keras to solve an environment where a vehicle needs to follow the track and avoid crashing into one other vehicle (there is only one other ...
rafiqollective's user avatar
-2 votes
1 answer
38 views

How to run our python scripts utilizing our device's GPU? [closed]

My laptop has NVIDIA GeForce GTX1650 GPU. I want to utilize this GPU to run my Python script. Any help in the form of code would be really helpful. I mean tried researching this so much but I couldn't ...
Escanor6's user avatar
0 votes
0 answers
25 views

How to make a RandomForestRegressor learn to differentiatie similar inputs with different outputs?

I'm working on a regression task with Sklearn RandomForestRegressor and I'm having some trouble distinguishing between two similar data with very different expected outputs. For example, each pair of ...
Luís Henrique Bandória's user avatar
0 votes
0 answers
14 views

Change face landmarks using face mesh

I'm trying to use computer vision or image processing techniques to make nose smaller. Using a SDK called mediapipe we are able to get face mesh, which provides ...
Mary's user avatar
  • 101
0 votes
1 answer
36 views

Setting number of rows returned by vector stores

When using vector stores like pinecone or Faiss from langchain, is it possible to set the number of records returned based on similarity search? For example, consider the following code, is there a ...
Karl 17302's user avatar
0 votes
0 answers
13 views

How is the accuracy as a metric in a Keras machine learning model calculated? Is it a valuable metric for LSTM

I'm training a LSTM neural network for time series prediction in Keras. During the training of the model, the loss (mse) gradually decreases each epoch, but the accuracy as well as the validation ...
Mappy's user avatar
  • 1
0 votes
1 answer
28 views

Data out of scale

Imagine that you want to train a deep learning model for forecasting/transforming data and have a training dataset with endpoints 0 and 1000. Now, Imagine receiving a new dataset with endpoints 0 and ...
Nathaldien's user avatar
0 votes
0 answers
21 views

New input to NEAT not improving learning

I have a set of NEAT inputs for a jump game but the learning was getting stuck at one point. Consider the following screen where Z is the player and ...
paxdiablo's user avatar
  • 101
0 votes
0 answers
19 views

Confusion about the code for choosing "stumps" in Adaboost algorithm

(I actually asked the following question on Stack Overflow and Cross Validated Exchange for more than a month: https://stackoverflow.com/questions/76842431/confusion-about-the-code-for-choosing-...
Richard's user avatar
  • 101
0 votes
0 answers
577 views

Why are the vector stores I generate via langchain FAISS from_documents always ~4.8 GB in size?

I am working on a small application to query a set of PDF documents. Specifically, I am aiming to provide the same query to each document in parallel, not to all documents as a whole. I have utilized <...
KDecker's user avatar
  • 101
0 votes
0 answers
21 views

ROC curve for multiclassification - results sound not correct

I'm working on a multiclassification task using LSTM algorithm, i generated my roc curve plots but they give scores like 1 , 0.99, 0.97 however i have an accuracy of 0.97, Precision 0.65, Sensitivity/...
biihu's user avatar
  • 1
0 votes
0 answers
29 views

MultiLayer Perceptron not working for regression problem, what could I try?

I am trying to learn the inverse kinematics of a robotic manipulator. To do that I have a simulator with which I acquired data. My dataset is composed of positions in X, Y and Z and actuator variables ...
Guillaume's user avatar
0 votes
0 answers
86 views

How to implement Image Fusion Equation in Python

I am new to image processing. I am trying to implement this paper. (official implementation is available on github the link for the same is given below) I have applied one fusion strategy. I am not ...
programmer_04_03's user avatar
0 votes
0 answers
38 views

Backpropagation in a transformer

I have a transformer for timeseries forcasting based on this article https://arxiv.org/abs/2001.08317 Given a source containing $src=(x_{t-5},x_{t-4},x_{t-3},x_{t-2},x_{t-1})$ and a target of $tgt=(x_{...
Michał Kuczynski's user avatar
2 votes
0 answers
31 views

What's the result of multiple neurons using ReLU activation function?

This question comes from a doubt that I recently had on an amazing book called "Neural Networks from Scratch With Python by Harrison Kinsley & Daniel Kukieła" Let's suppose that I have ...
Tomorrow's user avatar
1 vote
2 answers
49 views

How to Represent Boardless Board Game as Input to RL Model?

I am currently doing my thesis project by creating an Imitation Learning (IL) agent that learns to play the board game Hive, which lacks a traditional 2D board. Pieces are placed relative to one ...
Johnny McKenzie's user avatar
0 votes
0 answers
21 views

Improving Fuzzy Logic Control System Results

I am new to using skfuzzy and the use of fuzzy logic for classification, but the results I am getting are both good and bad for some conditions. I am aware of the overarching impact the ...
GEobserver's user avatar
0 votes
0 answers
41 views

Updating custom output layers of an LSTM network

I have a text generation task learning to predict the next word with an LSTM network with multiple output layers. After the generation of a sentence has finished, I calculate a reward for the whole ...
eris's user avatar
  • 1
1 vote
1 answer
109 views

Getting always the same action on an A2C from stable_baselines3

I'm quite new to RL and have been trying to train an A2C model from stable_baselines3 to derive an integer sequence based on 3 other input sequences of floats. I have a custom gym environment that ...
Jesuspc's user avatar
  • 141
0 votes
0 answers
78 views

Feature Importance for FT Transformer

I hope someone is able to shed light on this. I was reading through the codes on this link with regards to getting feature importance from attention scores. https://github.com/aruberts/...
DDM's user avatar
  • 101
1 vote
0 answers
18 views

good period prediction but bad magnitude using keras LSTM neural network

I want to predict the voltage of a battery along time using neural networks. This voltage is read using an ADC and generates a charge/discharge profile that ideally looks like this: Which goes very ...
bardulia's user avatar
  • 111
0 votes
1 answer
36 views

Patterns binary classification - model doesn't overfit

I am working on a very basic binary classification problem. For each set of four float numbers $(x,y,z,w)$, I want to check if they fall or not into one category. I have written a model with 3 dense ...
apt45's user avatar
  • 123
0 votes
0 answers
18 views

What model should I use to find coordinate locations of objects on an image (not bounding boxes)

I am developing a neural network to count pits on an etched crystal wafer, and I created a dataset by placing points on each pit. Each line in my annotation file looks like this: Id, Filepath, ...
Jesse Wolf's user avatar
0 votes
0 answers
147 views

Tips for solving OpenAI/Faramas Gymnasium Car Racing Environment

Im quite new to ML and wanna solve Gyms Car Racing v2 using Q-Learning with a Q-Table. But I am having problems approaching this. Thats why I am hoping someone more advanced in this field could give ...
user72952's user avatar
0 votes
0 answers
27 views

What is the best approach to remove this additional container from the cropped image?

I'm working on a computer vision application in Python to analyze images of ice cream cuttings to measure the amount of variegate(ie. fruit syrup or fudge) compared to the base ice cream. My approach ...
RustyGoat's user avatar
0 votes
1 answer
146 views

Can transformer models be used to convert code from one programming language to another?

There was a question like this in 2019. I hope things have changed since then. Concretely, I am looking for a way to train a transformer model to convert code from SAS to Python. I guess the method ...
Vladimir's user avatar
0 votes
0 answers
57 views

How to Change the Length of a Sequence Using Linear Projection In PyTorch?

I was trying to reproduce a voice conversion model using PyTorch and I had difficulty implementing a module called PBTC (Parallel Bank of Transposed Convlutions), used in https://arxiv.org/pdf/2303....
Sophiefy's user avatar
0 votes
0 answers
17 views

Tips for getting LSTM to train for next word predcition

I am trying to train an LSTM network for next work prediction. I have scraped a rather large dataset from Wikipedia of country descriptions. I have done normal preprocessing (removing punctuation and ...
thehumaneraser's user avatar
0 votes
0 answers
9 views

How to create Nodes out of segmentation Mask of Objects in an image

I am new to geometric deep learning. I am trying to use GNN to create nodes based on the objects present in an image. However, most of the online resources refer to creating nodes equivalent to the ...
Lily's user avatar
  • 1
0 votes
0 answers
8 views

difference in two modified multi-view CNNI

I am working on a dataset where i have two views of a same object( lateral and dorsal). I modified the RESNET50 to take the two views as input( as two different branches of CNN, till the last layer) ...
user1631306's user avatar
0 votes
1 answer
207 views

(In stable diffusion) Why are the vae encoded latents sampled by adding randomness to their mean, instead of just taking the mean directly?

In the diffuser's code base they calculate the input img2img latents in the following manner: ...
yeerk's user avatar
  • 101
-1 votes
1 answer
90 views

How a begginer should start studies in ML? [closed]

People, I am a chemistry undergrad that wants to learn ML for application in my field(chemistry), however, I had never studied programming or anything related to code in my life, for this reason, I am ...
Everson Gomes's user avatar
0 votes
1 answer
32 views

Feature Extraction for timeseries temperature signal [closed]

i have two temperature signals from which one is sensitive toward a specific event. I would like to know what other features can be useful to extract apart from: Angles (between the two). Slopes ( ...
Mirza's user avatar
  • 61
1 vote
0 answers
37 views

Can I reduce computation by only predicting response tokens in a transformer and still get the same gradients?

I have been looking at the source code of the Stanford Alpaca model and I believe that during inference, the whole instruction + response data is fed into the model normally. Then the instruction part ...
Tianchen Zheng's user avatar
2 votes
1 answer
137 views

How do I start implementing a deep learning paper from scratch?

I am fairly new to deep learning. I want to implement a deep learning paper from scratch with proper data preprocessing, model, losses etc., using an object-oriented approach in python. I want to do ...
programmer_04_03's user avatar
2 votes
0 answers
27 views

Combining GANs and NLP for AI-Based Programming: Generating Input-Output Templates for Computer Functions

I would like to combine GANs and NLP to create a system that can take an input and generate an appropriate output. For example, ...
Doğuş Deniz's user avatar
2 votes
1 answer
483 views

Creating a support chat bot for my business

I am trying to create a kind of Support Bot to answer my clients about specific technical details about WordPress plugins that I sell. The goal is that the /completitions api would be feeded a prompt ...
digitalzoomstudio's user avatar
1 vote
1 answer
215 views

Can NEAT produce output which has no connection with any other node?

I recently developed a little tool called Neat Cars where you can drawa track, place a car and watch the NEAT algorithm in action (including the ANN). However, I saw something that caught my attention:...
Roux's user avatar
  • 13
0 votes
0 answers
24 views

How to classify e-mails, which are scanned into PDFs in order to tell if they have an attachment or not?

I have a very peculiar task I have to solve and I am looking for advice on how to solve it. I have over 40 000 e-mails, that are converted into pdfs and I hava to classify if they have an attachment ...
FinEng's user avatar
  • 1
1 vote
0 answers
25 views

Why is my validation accuracy fluctuating between two inverse values?

I am currently going through the FastAI course and to practise, I wanted to code a neural network that classifies the FashionMNIST dataset from scratch. Lately, I've been running into an issue where I ...
DerOeko's user avatar
  • 13
0 votes
0 answers
31 views

Plotting gradient over weights ratio, mean or std dev to synthetize tensors?

I was studying the lecture of Andrej Karpathy about "Activations, Gradients and BatchNorm" that he uploaded on youtube: link here. At chapter "viz #4: update:data ratio over time" ...
GaussD's user avatar
  • 1
0 votes
0 answers
68 views

Is there any way to change the YOLO algorithm's feature extractor with DenseNet?

Is there any way to change the YOLO algorithm's feature extractor with DenseNet? I saw that Circular Bounding Boxes could be used instead of Rectangular Bounding Boxes. How would you change the data ...
Mechatronic's user avatar
0 votes
1 answer
188 views

How to generate new data using VAE?

I have built the following function which takes as input some data and runs a VAE on them: ...
quant's user avatar
  • 101
0 votes
1 answer
325 views

What is the problem in my implementation of actor critic?

I have been implementing both REINFORCE with baseline and actor-critic to solve "cartpole-v1". As a reminder, here is the presentation of the algorithms in Sutton and Barto's book (http://...
Labo's user avatar
  • 111

1
2 3 4 5
8