Questions tagged [python]

For questions related to AI implementation in the Python language

126 questions with no upvoted or accepted answers
Filter by
Sorted by
Tagged with
5
votes
1answer
208 views

What are the ways to calculate the error rate of a deep Convolutional Neural Network, when the network produces different results using the same data?

I am new to the object recognition community. Here I am asking about the broadly accepted ways to calculate the error rate of a deep CNN when the network produces different results using the same data....
4
votes
0answers
115 views

Supervised K-means clustering doesn't appear to work

I have a data set containing actions taken by customers (e.g., view a product, add a product to cart, purchase product), the product bought (if any) and times of said actions. I am attempting to use K-...
3
votes
0answers
98 views

How to perform classification with NEAT-Python?

I am trying to do classification using NEAT-python for the first time, and I am having difficulty getting the accuracy rate. I tried the same problem with an ANN and was able to get a good accuracy ...
3
votes
0answers
36 views

Reinforcement Learning on quantum circuit

I am trying to teach an agent to make any random 1-qubit state reach uniform superposition. So basically, the full circuit will be ...
3
votes
1answer
84 views

When should I create a custom loss function?

I'm using a neural network to solve a multi regression problem because I'm trying to predict continuous values. To be more specific, I'm making a tracking algorithm to track the position of an object, ...
3
votes
0answers
177 views

Image to image regression in tensorflow

I am working on an image to image regression task which requires me to develop a deep learning model that takes in a sequence of 5 images and return another image. The sequence of 5 images and the ...
3
votes
0answers
112 views

Understanding log probabilities of actions in the PPO objective

I'm trying to implement the Proximal Policy Optimization (PPO) algorithm (code here), but I am confused about certain concepts. What is the correct way to implement log probability of a policy (...
3
votes
0answers
154 views

Deep Q-Network (DQN) to learn the game 2048

I am trying to build a Deep Q-Network (DQN) agent that can learn to play the game 2048. I am orientating myself on other programs and articles that are based on the game snake and it worked well (...
3
votes
0answers
48 views

Deep Q-Learning agent poor performing actions. Need help optimizing

I'm trying to make deep q-learning agent from https://keon.io/deep-q-learning My environment looks like this: https://imgur.com/a/OnbiCtV As you can see my agent is a circle and there is one gray ...
3
votes
0answers
292 views

Q-learning in Python

I'm working on a q-learning project that involves a "robot" solving a maze, and there is a problem with how I update the Q values (every time the robot ends up switching between two squares instead of ...
3
votes
0answers
251 views

How do I make and use a dataset for StackGAN

So I am currently trying to create a program that when provided a list of descriptive words or a passage of text, would create a piece of abstract art based on the feelings evoked by those words. I ...
2
votes
0answers
57 views

How can I find a specific word in an audio file?

I'm trying to train and use a neural network to detect a specific word in an audio file. The input of the neural network is an audio of 2-3 seconds duration, and the neural network must determine ...
2
votes
0answers
117 views

Why is DDPG not learning and it does not converge?

I have used a different setting, but DDPG is not learning and it does not converge. I have used these codes 1,2, and 3 and I used different optimizers, activation functions, and learning rate but ...
2
votes
0answers
38 views

Inaccurate masks with Mask-RCNN: Stairs effect and sudden stops

I've been using matterport's Mask R-CNN to train on a custom dataset. However, there seem to be some parameters that i failed to correctly define because on practically all of the images, the bottom ...
2
votes
0answers
93 views

Wooden railway search problem AI

I have this problem. A basic wooden railway set contains the pieces shown in Figure 3.32. The task is to connect these pieces into a railway that has no overlapping tracks and no loose ends where a ...
2
votes
0answers
120 views

How to select good inputs and fitness function to achive good results with NEAT for Icy Tower bot

I'm trying to make a bot to the famous "Icy Tower" game. I rebuilt the game using pygame and I'm trying to build the bot using Python-NEAT. Every generation a population of 70 characters ...
2
votes
1answer
93 views

In a single neuron output layer should the output be a scalar?

Given a neural network with 3 inputs, 4 hidden layers, and 1 output, should the output neuron be a vector or a scalar? I thought that at the end of the summation only one number between 0 and 1 would ...
2
votes
1answer
75 views

I created a snake game and fitted the NEAT algorithm and there's issues

Below are my Inputs Outputs and fitness function. The snake is learning at a slow rate, and seems to be stagnant, additionally when the snake collides with the food, it gets deleted from the genome, ...
2
votes
0answers
37 views

How do I make my LSTM model more sensitive to changes in the sequence?

I have a many to one LSTM model for multiclass classification. For reference, this is the architecture of the model ...
2
votes
0answers
32 views

How can I train a Deep Learning model using degraded photos and their clean version to correct photos

I have 5000 degraded pictures ( pixelated, blurry, too much luminosity ... ) and their clean versions, and I would like to train a model so that it can predict how to correct future pictures. I've ...
2
votes
0answers
83 views

Is it possible to use entity embedding with autoencoder for anomaly detetction?

I'm trying to build autoencoder in keras in order to detect anomalies. However, most of the data is categorical and I have to encode it. When it comes to production, categorical features can take new ...
2
votes
0answers
24 views

Can't figure out what's going wrong with my dataset construction for multivariate regression

TL;DR: I can't figure out why my neural network wont give me a sensible output. I assume it's something to do with how I'm presenting the input data to it but I have no idea how to fix it. Background:...
2
votes
0answers
47 views

How would one develop an action space for a game that is proprietary?

I'm currently trying to develop an RL that will teach itself to play the popular fighting game "Tekken 7". I initially had the idea of teaching it to play generally- against actual opponents with ...
2
votes
0answers
22 views

Calculation of Neural network biases in backpropagation

While learning neural networks I've found a basic Python working example to play with. It has 3 input nodes, 4 nodes in a hidden layer, 1 output node. 5 data sets for training. The initial code is ...
2
votes
0answers
74 views

Which machine learning algorithms can be used to build a recommendation system?

I am working on building a recommendation engine. I need to build a model that recommends similar items. Currently, I am using the Nearest Neighbor algorithm present in ...
2
votes
0answers
23 views

How to learn using DDPG in python solely using a timeseries datasets

I have a lengthy timeseries datasets which contains several variables (from sensors etc) to be classified as actions or states. Providing they are successfully done, I want to learn a control policy ...
2
votes
0answers
19 views

How to choose the suitable Neural Network Architecture for Regression Tasks

so I'm working on a Project where I want to predict the Vehicle Position from the Vehicle Data like speed, acceleration etc.. now the data that I have comes also with a timestamp for each sample ( I ...
2
votes
0answers
98 views

how to use Softmax action selection algorithm in atari-like game

I'm currently writing a program using keras (python 3) to play a game similar to Atari games, only in this one there are objects moving in the screen in different angles and directions (in most of ...
2
votes
0answers
30 views

Extracting Descriptors and feature points for 3d mesh

I'm programming my work with python, and I have a mesh and I want to extract 3d descriptors and feature points from it( trying to work on multi-scale strategy) , to visualize them later on the mesh, ...
2
votes
0answers
46 views

Grouped Text classification

I have thousands groups of paragraphs and I need to classify these paragraphs. The problem is that I need to classify each paragraph based on other paragraphs in the group! For example, a paragraph ...
2
votes
0answers
91 views

Understanding CNN+LSTM concept with attention and need help

I have a question about the context of CNN and LSTM. I have trained a CNN network for image classification. However, I would like to combine it with LSTM for visualizing the attention weights. So, I ...
2
votes
0answers
25 views

How to voxelize multiple frames at the time and append them together?

I'm trying to implement this approach for object detection and tracking. In this approach, the first step is voxelize each frame to construct a 3D tensor, the second step is to append multiple voxels ...
2
votes
0answers
80 views

Bert super easy implementation

I myself am not new to NLP, but for some reason I am unable to grasp purity of BERT. I have seen a ton of blogs, github repos, but none could clarify BERT usage to me. It would be helpful if you ...
2
votes
0answers
36 views

My naive (ha!) Gaussian Naive Bayes classifier is too slow

I am trying to build a film review classifier where I determine if a given review is positive or negative (w/ Python). I'm trying to avoid any other ML libraries so that I can better understand the ...
2
votes
0answers
266 views

Implementing AI/ML for the card game “Cheat”

Background info In Python, I've implemented a rudimentary engine to play "Cheat", supporting both bots and a human or only bots. When only bots are playing, the game is simulated. When placing cards,...
2
votes
0answers
88 views

Mapping Actions to the Output Layer in Keras Model for a Board Game

I have created a game based on this game here. I am attempting to use Deep Q Learning to do this, and this is my first foray into Neural networks (please be gentle!!) I am trying to create a NN that ...
2
votes
0answers
324 views

How many episodes does it take for a vanilla one-step actor-critic agent to master the OpenAI BipedalWalker-v2 problem?

I'm trying to solve the OpenAI BipedalWalker-v2 by using a one-step actor-critic agent. I'm implementing the solution using python and tensorflow. I'm following this pseudo-code taken from the book ...
2
votes
0answers
166 views

Generating time series for doing time-series forecasting with LSTM

I have a .db file with columns as described below. This data has been collected by a software which monitors the file usage in a filesystem or in other words generates metadata about all the files in ...
1
vote
0answers
24 views

Pytorch Deep q network not learning and step not stepping towards target

I am trying to create a simple deep q network for rl with conv2d layers. I can’t figure out what I am doing wrong, and the only thing I can see that doesn’t seem right is when I get the model ...
1
vote
0answers
22 views

What are the best techniques to perform text simplification?

I'm evaluating the state of the art techniques to translate legal text to simple text, what are the best approaches for a non-English language (Portuguese)?
1
vote
0answers
36 views

How to deal with very, very small time-series?

I have an ensemble of 231 time series, the largest among them being 14 lines long. The task at hand is to try to predict these time-series. But I'm finding this difficult due to the very small size of ...
1
vote
0answers
44 views

Classification or regression for deep Q learning

DQN implemented at https://github.com/PacktPublishing/PyTorch-1.x-Reinforcement-Learning-Cookbook/blob/master/Chapter07/chapter7/dqn.py uses the mean square error loss function for the neural network ...
1
vote
1answer
55 views

Binary mode or Multi-label mode is correct when using binary crossentropy and sigmoid output function on multi-label classification

I would like to ask a question about the relationship of accuracy with the loss function. My experiment is a multiclass text classification problem, and I have built a Keras neural network to tackle ...
1
vote
0answers
40 views

Why isn't my decision tree classifier able to solve the XOR problem properly?

I was trying to solve an XOR problem, and the dataset seems like the one in the image. I plotted the tree and got this result: As I understand, the tree should have depth 2 and four leaves. The ...
1
vote
0answers
22 views

Training a model for text document transformation?

I have a bunch of text documents, split into source documents and transformed documents. These text documents have multiple lines and are edited at specific locations, in a specific way. I make use ...
1
vote
0answers
32 views

What pre-processing of the image is needed before feeding it into the convolutional neural network?

I can't figure out what preprocessing of the image is needed before feeding it into the convolutional neural network. For example, I want to recognize circles on a 1000 by 1000 px photo. The learning ...
1
vote
0answers
25 views

An Encoder-Decoder based CNN to predict a tensor of points

So I have with me a data of rendered 2D images of a 3D object and along with that, I have the image projection coordinates (X, Y) of all the voxels that are in the ...
1
vote
0answers
49 views

How do i start building an autoclick bot for pubg mobile?

I want to make a bot which clicks the fire button on the mobile screen upon seeing an enemies head. In pubg mobile which is an android game you have to control the fire button and the aim along with ...
1
vote
0answers
35 views

Subtracting the entropy from our policy gradient will prevent our agent from being stuck in the local minimum?

In the information theory, the entropy is a measure of uncertainty in some system. Being applied to agent policy, entropy shows how much the agent is uncertain about which action to make. In math ...
1
vote
0answers
153 views

Replace epsilon greedy action selection and the standard DQN by an Independent Gaussian Noise Network Model

Here is my code Recently, I solved the game of Atari Breakout using a classic DQN model. The convergence of the mean reward slowly improved during three days. I was interested in learning a method ...