Stack Exchange Network

Stack Exchange network consists of 175 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.

Visit Stack Exchange

Questions tagged [python]

For questions related to AI implementation in the Python language

0
votes
0answers
17 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 ...
5
votes
1answer
664 views

Is neural networks training done one-by-one?

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
56 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 ...
4
votes
1answer
116 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: <...
3
votes
0answers
49 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 ...
0
votes
0answers
21 views

Using the Iris Flower dataset, why does my classifier classify any data inputted as “Iris - Virginica”? [migrated]

I'm a high school senior who is very new to making neural networks. I've been using the Iris Flower dataset (https://www.kaggle.com/arshid/iris-flower-dataset) to build my neural network. My model ...
1
vote
1answer
24 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
25 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
64 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
29 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
18 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 ...
0
votes
0answers
11 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 ...
0
votes
0answers
18 views

Error LOading Tensorflow model [migrated]

I am following this Repository [deep-diver/CIFAR10-img-classification-tensorflow][1]. to make a neural network for CIFAR-10 Dataset. import pickle import numpy ...
4
votes
2answers
132 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
18 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 ...
0
votes
1answer
26 views

Auto-regression - Reduce error in prediction

I am trying to develop a time series model using autoregression. The data set is like as follows ...
0
votes
1answer
40 views

Monte-Carlo, every-visit gridworld, exploring starts, python code gets stuck in foreverloop in episode generation

I've been trying to implement policy improvement for Q(s,a) function as per Sutton&Barto reinforcement learning book. The original algorithm with first-visit MonteCarlo is pictured below. I ...
3
votes
0answers
29 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 ...
0
votes
0answers
19 views

Semantic search engine for a set of documents in python

I want to create a semantic search for a set documents with terms that could not appear on the set. Is there some code for that? I'm working on python.
0
votes
0answers
26 views

How can the bias and the coefficient be calculated in logistic regression?

How can the bias, $b_0$, and the coefficient for the single input value, $b_1$, be calculated in logistic regression? I am trying to calculate these coefficients with pure Python. Can anybody ...
1
vote
1answer
34 views

What types of machine learning model would fit?

I am working on a supervised machine learning problem where I have more than 10 probably 50 or 100 predicting label categories. Which type of model can be used to work on this type of problem in ...
0
votes
0answers
15 views

Controlling number of channels in weight/kernel in tensorflow

To implement a specific function, I need "input_channels" number of kernels in my layer, each having only a single channel depth, and not depth = "input_channels". I need to convolve one kernel with ...
1
vote
0answers
10 views

Is there a way to compare the similarities among different graphs and then cluster them using Unsupervised learning?

I have a dataset about (240000,23). For my task, I have to use an unsupervised learning method and apply it on every single column separately in order to detect anomalies that might exist. I have pre-...
1
vote
0answers
27 views

Why is my generator loss function increasing with iterations?

I'm trying to train a DC-GAN on CIFAR-10 Dataset. I'm using Binary Cross Entropy as my loss function for both discriminator and generator (appended with non-trainable discriminator). If I train using ...
1
vote
0answers
38 views

Running 2 NEAT nets on the same observations

So i have been playing around with neat-python. I made a program, applying neat, to play pinball on the Atari 2600. The code for that can be found in the file ...
5
votes
1answer
128 views

2 Player Games in OpenAI Retro

I have been using OpenAI Retro for awhile, and I wanted to experiment with two player games. By two player games, I mean co-op games like "Tennis-Atari2600" or even Pong, where 2 agents are present in ...
0
votes
0answers
16 views

Loading multiple trained models for use in multi-agent environment

I have an agent that will play in a multi-agent environment, and I'd like that agent to play against other agents that have been previously trained. The model for each agent was saved using ...
0
votes
0answers
46 views

Selu and how to implement it?

I just came accros the "Selu" function. It looks promising, especially with the header "self normalizing neural network", since I have some serious with exploding gradient within my network with (...
0
votes
0answers
32 views

How do I apply batch normalization to my algorithm?

I am working lately on batch normalization for the last couple of days, but I just can't seem to solve it on how to apply it. So, to give the full code to you, I will just send the implementation. ...
0
votes
0answers
25 views

Isolate the speech of two people in an audio record with two people only

I would like to find a way to isolate the speech of each of the people in an audio record so I can create a file of that form : ...
0
votes
2answers
57 views

Where can I find an implementation of the wake-sleep algorithm?

I'm looking to build from scratch an implementation of the wake-sleep algorithm also known as an unsupervised neural network. I plan on doing this in Python in order to better understand how it works. ...
0
votes
0answers
11 views

How to interpret the generated ACF and PACF plot in time-series problem?

I recently started working onto Time-Series problem and gathered insights onto the working and the logic behind. However I'm still not clear that how ACF and PACF plots help us in building a model? ...
0
votes
0answers
29 views

How to install XGBOOST, Lightgbm, catboost without connecting to the Internet

I want to install some libraries such as xgboost, lightgbm, and catboost without connecting to the Internet in Anaconda because of some security issues. Can anybody help me how to do this? Moreover, ...
0
votes
1answer
32 views

Python Packages for Recent Optimization Methods

I want to try and compare different optimization methods in some datasets. I know that in scikit-learn there are some corresponding functions for grid and random search optimizations. However, I also ...
1
vote
2answers
98 views

Is there more than one Q-matrix update formula?

I asked a question a while ago here and since then I've been solving the issues within my code but I have just one question... This is the formula for updating the Q-Matrix in Q-Learning: $$Q(s_t, ...
0
votes
0answers
58 views

Using AI to guess a mathematical pattern of certain polynomials in four variables: practical challenge

I'd like to use machine learning to guess a mathematical pattern: the input are certain polynomials in four variables $q_1,q_2,q_3,q_4$, the output can be zero or one. Allowed polynomials are such ...
2
votes
1answer
72 views

Text classification task chatbot

I'm building a customer assistant chatbot in Python, so a text classification task, and I have available more or less 7 hundred sentences of average length 15 words (unbalanced class). What do you ...
1
vote
0answers
25 views

GPFlow: Gaussian Process Uncertainty Quantification

I trained some Gaussian process model with the Python library GPFlow on a dataset consisting of $(X, Y)$, inputs and outputs, in a regression setting. This model gives me pretty good predictions in ...
2
votes
0answers
31 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 ...
1
vote
3answers
60 views

predict customer visit

Suppose we have a data set consists of columns TransactionId, CardNo, TransactionDate then how can we calculate the customer purchase interval (means if customer A purchased on Jan 1st and after ...
2
votes
1answer
31 views

Testing, Validation Percentage & Test, Validation Batch Size Difference?

I'm doing transfer learning using Inception on Tensorflow. The code that I used for training is https://raw.githubusercontent.com/tensorflow/hub/master/examples/image_retraining/retrain.py If you ...
2
votes
1answer
152 views

DQN stuck at suboptimal policy in Atari Pong task

I am in the process of implementing the DQN model from scratch in PyTorch with the target environment of Atari Pong. After a while of tweaking hyper-parameters, I cannot seem to get the model to ...
1
vote
0answers
41 views

Tensorflow : Inception V3 Transfer Learning Parameter Tuning

Sorry if my question is at the wrong place, I'm new in this community. So, I have dataset with total of 1 million images (augmented) that separated in 28 classes. I followed this tutorial https://www....
2
votes
0answers
14 views

Property based clustering

I've got a challenge that feels like it should be solvable using some kind of clustering algo, but I can't get my head around how I can change the perspective such that it is solvable for such an algo....
1
vote
2answers
147 views

How to use RNN With Attention Mechanism on Non Textual Data?

Recurrent Neural Networks (RNN) With Attention Mechanism is generally used for Machine Translation and Natural Language Processing. In Python, implementation of RNN With Attention Mechanism is ...
0
votes
2answers
44 views

Scaling and standardizing

I am trying to generate a model that uses several physico-chemical properties of a molecule (incl. number of atoms, number of rings, volume, etc.) to predict a numeric value Y. I would like to use PLS ...
1
vote
2answers
80 views

What is batch / batch size in neural networks?

I have some problems with understanding of batch concept and batch size. I messed something up. First i start it consider based on convolutional neural network I heard two versions: 1. When batch ...
-3
votes
1answer
280 views

RNN LSTM not converging with Adam

I am trying to train a RNN with text from wikipedia but I having having trouble getting the RNN to converge. I have tried increasing the batch size but it doesn't seem to be helping. All data is one ...
2
votes
0answers
174 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,...
0
votes
1answer
118 views

Label arrangement for custom Keras image generator

I am trying to generate 90 and 270 degrees rotated versions of my sample images on the fly during training. I found an example and modifying it. But I am confused about what should be the order? For ...