Questions tagged [python]

For questions related to AI implementation in the Python language

Filter by
Sorted by
Tagged with
4
votes
2answers
110 views

Is it possible to teach an AI to edit video content?

Every week I will get a lot of videos from a game that I play, outside the game where you throw wooden skittle bats at skittles, and then I will cut videos, so that, at the end. there is video only ...
1
vote
1answer
81 views

Deep Q Learning Algorithm for Simple Python Game makes player stuck

I made a simple Python game. A screenshot is below: Basically, a paddle moves left and right catching particles. Some make you lose points while others make you gains points. This is my first Deep Q ...
32
votes
8answers
13k views

Is a switch from R to Python worth it? [closed]

I just finished a 1-year Data Science master's program where we were taught R. I found that Python is more popular and has a larger community in AI. Is it worth for someone in my position to switch ...
0
votes
1answer
66 views

How to train a LSTM model with multi dimensional data

I am trying to train my model using LTSM layer in Keras (python). I have some problems regarding the data representation and feeding it into the model. My data is 184 XY coodinates encoded as a numpy ...
1
vote
0answers
16 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
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 ...
0
votes
0answers
55 views

Understanding policy update in PPO2

I have a question regarding the functionality of the PPO2 algorithm together with the Stable Baselines implementation: From the original paper I know that the policy parameters $\theta$ are updated K-...
1
vote
0answers
35 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
22 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" ...
3
votes
1answer
122 views

Which approach can I use to generate text based on multiple inputs?

I have a little experience in building various models, but I've never created anything like this, so just wondering if I can be pointed in the right direction. I want to create (in python) a model ...
1
vote
0answers
40 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 ...
0
votes
1answer
56 views

Entropy term in Proximal Policy Optimization (PPO) becomes undefined after few training epochs

I have implemented the total loss of my PPO objective as follows:- ...
0
votes
0answers
14 views

Why are my convolutional layer activations large and saturating the softmax function?

I implemented a neural network in python from scratch (The github repo to it.). It works reasonably well and I benchmarked different designs using convolutional layers on MNIST and it worked better ...
2
votes
0answers
50 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 ...
0
votes
1answer
533 views

How to Mask an image using Numpy/OpenCV?

I am detecting wheels with a deep learning algorithm. The algorithm gives me the coordinates of those rectangles. I want to keep data that is in the rectangles of the image. I created rectangles as a ...
1
vote
1answer
42 views

How to rescale data to its original range after MinMaxScaler?

I'm using sklearn's MinMaxScaler in order to scale my data down. However, it would be nice to be able to rescale it back to its original range. Is there any way I ...
0
votes
1answer
32 views

How can I perform multivariable regression with neural networks?

I want to use a neural network to perform a multivariable regression, where my dataset contains multiple features, but I can't for the life of me figure it out. Every kind of tutorial on the internet ...
0
votes
1answer
50 views

Why does keras model get bigger after training?

I notice that I create a model using tensorflow.keras.Sequential(), save it and the file size is around 5 MiB, but after I call ...
2
votes
1answer
26 views

Better to learn the same small set for multiple epochs then go to the next or learn from each one time repeatedly for multiple times?

I don't know if I worded the title correctly. I have a big dataset (300000 of images after augumentation) and I've splitted it into 10 parts, because I can't convert the images into a numpy and save ...
3
votes
1answer
66 views

Which models accept numerical parameters and produce a numerical output?

I need a model that will take in a few numerical parameters, and give back a numerical answer (Context: predicting a slope based on environmental factors without having to actually take measurements ...
0
votes
0answers
11 views

Scikit-Learn: monotoneous quantile estimation

I would like to implement various AI-estimators for quantile estimation for a regression problem. It would be necessary to have non-crossing quantiles, that is larger quantiles would correspond to ...
0
votes
0answers
22 views

How to implement Multiple Neural network architecture, connected in parallel and series in Keras or Pytorch

Hello Dear StackExchange members, I want to make a deep network as shown in the image. I want each 'network 1 to look at the specific part of the input and I don't want to divide my input beforehand ...
1
vote
1answer
214 views

Reinforcement learning to play snake - network seems to not get trained at all

I am trying to build a network able to play snake game. This is my very first attempt to do such stuff. Unfortunately, I've stuck and even have no idea how to reason about the problem. I use ...
0
votes
0answers
285 views

Applying a 1D convolution for 4D input

i'm trying to implement this paper and I'm stuck for quite some time now. Here is the issue: I have a 3D tensor and has (180,200,20) as dimension and I'm trying ...
4
votes
1answer
106 views

DQN in stochastic environment

I'm trying to apply a DQN to a stochastic environment but i'm having trouble getting it to converge. I found some similar questions asked here, but no solutions yet. I can fairly easy get the DQN to ...
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 ...
1
vote
0answers
19 views

Issues related to RoI Pooling in keras

I am trying to do RoI pooling of an image whose RoI bounding box coordinates are known to me. Can anyone provide me the code for doing the same? I have read many repositories but I didn't get any ...
-2
votes
1answer
168 views

Problem over DQN Algorithm not converging on snake

I'm using a DQN Algorithm to play Snake. The input of the neural network is a stack of 4 images taken from the games 80x80. The output is an array of 4 values, one for every direction. The problem ...
0
votes
1answer
25 views

Intermittent type error when operating CNN inside Docker container

I've been working on a simple computer vision API with a few endpoints for grabbing useful information from ebay images. The API lives in a docker container that looks for the h5 files, downloads ...
3
votes
0answers
105 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 (...
0
votes
0answers
79 views

Exploding population size in neat-python

I am trying to make my AI win the board game "Catan" against my friends. Therefore i am using the python implementation of NEAT. As I changed the values of ...
0
votes
0answers
55 views

Railway set artificial inteligence

P3 A basic wooden railway set contains the pieces shown in Figure 3 The task is to connect these pieces into a railway that has no overlapping tracks and no loose ends where a train could run off onto ...
1
vote
0answers
30 views

What qualifies as 'fitness' for a genetic algorithm that minimizes an error function?

Suppose I have a set of data that I want to apply a segmented regression to, fitting linearly across the breakpoint. I aim to find the offsets and slopes of either line and the position of the ...
0
votes
0answers
16 views

Auto Regression Predicting large negative number

I am using Auto Regression for prediction Library: statsmodel Sample Python Code: ...
1
vote
0answers
32 views

Generate QA dataset from large text corpus

I have a corpus of a domain data in form of 10-15 books pdf and some articles and my end-goal is to make a question-answering system particular to that domain. For that, I would need a dataset on Q/A ...
0
votes
0answers
57 views

Online normalization of database for DQN

I have an issue with the normalization of the database (a large time series) for my DQN. I obtained optimal results and saved the NN (5 LSTM layers) weights training on a database normalized as such: ...
-3
votes
1answer
53 views

Which Carrer path to Choose AI Or Game Developmen [closed]

I am An Second Year B.Tech Student. I have Basic Idea Of Unity,C# For Game development and I Recently starting Learning AI in Python So I Am Confused Which to Choose as Career.
2
votes
0answers
72 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 ...
9
votes
2answers
840 views

Is neural networks training done one-by-one? [duplicate]

I'm trying to learn neural networks by watching this series of videos and implementing a simple neural network in Python. Here's one of the things I'm wondering about: I'm training the neural network ...
0
votes
0answers
67 views

train loss does not convergence

I am using Keras 2.07, with Python 3.5, Tensorflow 1.3.0 on Windows 10 I am testing the architecture used in paper intra prediction using fully connected network for video coding. I hope to use it ...
5
votes
2answers
225 views

Why am I getting the incorrect value of lambda?

I am trying to solve for lambda using Temporal Difference Learning I am trying to figure out what lambda I need, to make TD(λ)=TD(1) but I get the incorrect value of lambda. Here is how I did: <...
4
votes
2answers
348 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 ...
2
votes
1answer
270 views

How do I integrate Tensorflow with EV3DEV?

I've got a Lego Mindstorms EV3 with EV3DEV and EV3-Python installed. I wanted to try out artificial intelligence with the robot, and my first project is going to be to get the robot to try and ...
0
votes
1answer
254 views

Advice on creating a new environment using OpenAI Gym

I'm looking for some general advice here before I dive in. I'm interested in creating a new environment for OpenAI gym to provide some slightly more challenging continuous control problems than the ...
1
vote
1answer
212 views

Choice of inputs features for Snake game

I am designing a neural network using Deep Q-Learning, which teaches an agent how to play Snake (The classic Nokia game from the 90'ies). The goal of the game is to navigate the snake on a playing ...
1
vote
1answer
66 views

Static or dynamic learning rate (Q-learning)

I have the following code (below), where an agent uses Q-learning (RL) to play a simple game. What appears to be questionable for me in that code is the fixed learning rate. When it's set low, it's ...
0
votes
1answer
29 views

Google speech to text API

I need to fix this python code to my project There is the code: https://www.alexkras.com/transcribing-audio-file-to-text-with-google-cloud-speech-api-and-python/ Here the error: Traceback (most ...
1
vote
0answers
30 views

Deploy notebook in IBM Watson

I have a python notebook in IBM Watson Studio for a time series forecasting purpose. it takes two input data MAX MIN and it returns two lists of data having 10 steps ahead prediction of both ...
4
votes
2answers
497 views

Use Machine Learning/Artificial Intelligence to predict next number (n+1) in a given sequence of random increasing integers

The AI must predict the next number in a given sequence of incremental integers (with no obvious pattern) using Python but so far I don't get the intended result! I tried changing the learning rate ...
0
votes
0answers
114 views

Human Pose Comparison

I'm trying to create a service which compares 2 human poses as a part of my main application. I managed to plot skeletons on the images using OpenPose. A detailed explanation of my question: I have 2 ...