Questions tagged [python]

For questions related to AI implementation in the Python language

109 questions with no upvoted or accepted answers
Filter by
Sorted by
Tagged with
5
votes
1answer
126 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
2answers
363 views

How to implement a neural network for Flappy Bird in Python?

I am new in the field of AI. I am working to create the flappy bird using Genetic Algorithm. After reading and seeing some examples, I saw that most implementations use a Neural Network + Genetic ...
4
votes
0answers
103 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-...
4
votes
1answer
770 views

How do you handle multiple categorical values in a single column for wide_deep model in tensorflow?

To start, let me just say that I am very new to tensorflow and Machine Learning in general. But, as part of my learning project I am trying to adapt the tensorflow wide and deep model to generate ...
3
votes
0answers
30 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
45 views

when should I create a custom loss function?

Hi I'm using neural network to solve a multi regression problem. I'm trying to predict continuous values, to be more specific I'm making a tracking algorithm to track the position of an Object, I'm ...
3
votes
0answers
112 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
42 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
233 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 ...
3
votes
1answer
2k views

Training AI to play NES/SNES games on NN python

I am currently getting into Deep Learning and would like to set up an environment for training an Artificial Neural Network or NEAT to play simple video games on NES (Mario etc.) and SNES ( Donkey ...
2
votes
0answers
17 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
34 views

How can I implement derivative of softmax function for matrices in Python?

I have trouble understanding how to implement derivative of softmax function. Here is what I tried: ...
2
votes
0answers
24 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
21 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
26 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
2answers
87 views

Are there any public real-life code examples of ML applications in Python?

Problems I often face at work usually differ from tutorial or book-like examples so I end up with a code that works but it's not elegant and takes too much time to write. I wanted to ask you if there ...
2
votes
0answers
15 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
57 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
12 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
17 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
33 views

How to control the switches of a railway track with Artificial Intelligence?

Usually, it's very complicated to program a real time strategy game from scratch. Notable examples like Lemmings or Starcraft are software projects with a large amount of codelines. A much easier ...
2
votes
0answers
52 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
91 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 ...
2
votes
0answers
40 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
58 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
24 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
75 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
33 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
220 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
82 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
254 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
1answer
281 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 ...
1
vote
0answers
7 views

Standardize images using ImageDataGenerator in keras

I was trying to normalize my input data images for feeding to my convolutional neural network and wanted to use standardize my input data. I referred to this article: https://stackoverflow.com/...
1
vote
0answers
14 views

How to program instructions for outputs in the neat-python module

I've made a snake game in python and I'm trying to make a NEAT ai for it. I've successfully made the game but I'm having trouble implementing the ai. Right now I want to know how to give it ...
1
vote
0answers
19 views

Does this tutorial use normalization the right way?

There is this video on pythonprogramming.net that trains a network on the MNIST handwriting dataset. At ~9:15, the author explains that the data should be normalized. The normalization is done with ...
1
vote
0answers
13 views

Predict a value calculated from a hash (and hash before that hash)

I have a hash, e.g. 552c51576e2a6dec462b0d56af8c31713e26a763c0e2a3d48ebbf4b99958eeba. This hash hashed again, is ...
1
vote
0answers
15 views

How to build sort objects model using Deep Learning

How to build sort objects model using Deep Learning if i have some objects in an image enter image description here if i give him an similar image he sort the detected order according to Learning ...
1
vote
1answer
17 views

Best Camera and protocol for embedded real time CNN project

I'm looking to develop a stand-alone real-time outdoor imaging CNN application, and I can't wrap my head around the myriad of camera options and their communication protocols. The target is a Linux ...
1
vote
0answers
27 views

Why I got the same action when I train A2C when I increase the number of episodes?

I'm working on an advantage actor-critic (A2C) reinforcement learning model but the problem when I trained the system for 3500 episodes, I start to get the same action for all my testing results. ...
1
vote
0answers
50 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 ...
1
vote
0answers
24 views

Can anyone explain the pixelwise accuracy metric used in this paper? Also a question to the KL Divergence Loss

So I am making a project based on this paper: https://arxiv.org/ftp/arxiv/papers/1901/1901.07761.pdf In this paper, a U-Net is used to generate optimized mechanical structures. I am trying to ...
1
vote
0answers
38 views

How can I split the data into training and validation sets such that entries with a certain value are kept together?

I have the following kind of data frame. These are just example: A 1 Normal A 2 Normal A 3 Stress B 1 Normal B 2 Stress B 3 Stress C 1 Normal C 2 Normal C 3 Normal ...
1
vote
0answers
40 views

Why isn't this deep Q network agent for the snake game learning?

I wanted to combine this snake game with this DQN implementation I found in this article. First, I tried to change the NN's input layer to a 400 input. The game has a field of 20 times 20, so I ...
1
vote
0answers
37 views

Did I understand deep Q leaning right? (Implementation)

Gday guys, so I tried to implement my own enviroment and agent in order to fully understand DQNs. The enviroment is a dungeon with five states. actionspace = 2 statespace = 5 !!!Action a0 is ...
1
vote
1answer
46 views

Can A.I/Deep Learning use one image as content for another image?

Is it possible for A.I to redraw an image in a new context? More specifically, suppose I take a photo of a notebook. I get the angle, lighting and perspective perfect. Now I copy an image I found ...
1
vote
0answers
29 views

I am trying to create a network with dynamic connections for every different training example

I have developed a new algorithm which has dynamic connections. it is based off of the following paper: https://www.researchgate.net/publication/...
1
vote
0answers
19 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, ...
1
vote
0answers
39 views

AI for Warcraft 3 Dota

I want to create AI for Dota1. Is it possible to create AI for Warcraft 3? How Open AI works in Dota2? I want to know more about algorithms what are in foundation in Open AI.
1
vote
0answers
23 views

i have trained my model & now trying to predict but unable to do using keras

i have trained my model & now trying to predict but unable to do please help. trying to predict cat or dog stuck in "prediction" ...
1
vote
0answers
46 views

Understanding log probabilities of actions in PPO objective

I'm trying to implement Proximal Policy Optimization algorithm (code here) but am confused about certain concepts:- 1) What is the correct way to implement log probability of a policy (denoted by ...