Questions tagged [python]

For questions related to AI implementation in the Python language

Filter by
Sorted by
Tagged with
1
vote
1answer
29 views

DQN layers when state space and action space are multi dimensional

I have built my own RL environment, where a state is composed of two elements: the agent's position and a matrix of 0s and 1s (1 if a user has requested a service from the agent, 0 otherwise); an ...
1
vote
1answer
53 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
1answer
32 views

What framework for a project with a custom environment?

I'm planning an RL project and I have to decide which RL framework do I use if any at all. The project has a highly custom environment, and testing different algorithms will be required to obtain ...
1
vote
1answer
39 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
1answer
56 views

How to create a Q-Learning agent when we have a matrix as an action space?

I have a 2-dimentional matrix as an action space, the rows being a resource to be allocated, and the columns are the users that we will allocate the resources to. (I built my own RL environment) The ...
0
votes
0answers
32 views

Problem having the right input for model.predict() in Keras model [closed]

I have a DQN agent, that receives a state composed of a numerical value indicating its position and a 2D array denoting the requests from a number of users. My attempt of architecting the neural ...
0
votes
1answer
49 views

Keras DQN Model with Multiple Inputs and Multiple Outputs [closed]

I am trying to create a DQN agent where I have 2 inputs: the agent's position and a matrix of 0s and 1s. The output is composed of the agent's new chosen position, a matrix of 0s and 1s (different ...
0
votes
0answers
12 views

Python Create Keras Neural Network with Bag Of Words Model for News Classification

I want to train a classification neural network then predict some inputs. It's classic classification example as you know. I'm implementing this with python. I searched a lot about it and I always ...
4
votes
0answers
54 views

Difficulty in agent's learning with increasing dimensions of continuous actions

I have been working on some RL project, where the policy is controlling the robot using its joint angles.Throughout the project I have noticed some phenomenon, which caught my attention. I have ...
0
votes
0answers
36 views

Distinguishing between handwritten compound fraction and subtraction

I am working in a project named "Handwritten Math Evaluation". So what basically happens in this is that there are 11 classes of (0 - 9) and (+, -) each containing 50 clean handwritten ...
0
votes
0answers
20 views

Fine tune bert to get contexualized embedding

I need to use BERT contextual embedding instead of stochastic Answer network in this model. And for generating the responsed in the same model, I would like to use the generator. Could any one help to ...
1
vote
1answer
187 views

Matterport MRCNN and multiclass classification

I want to create a model which solve a multiclass classification problem. The main concept is: every picture contain only one object the background is very simple all object is coming from the same ...
0
votes
1answer
28 views

Train a model using a multi-column text-filled excel sheet

I have an excel sheet filled with my own personal appreciations of movies I've watched, and I want to use it to train an AI model so that it can predict if I'll like a specific movie or not, based on ...
1
vote
2answers
87 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 ...
1
vote
0answers
40 views

How to design my Neural Network for Game AI

For my school project, I have to develop an agent to play my game. The base I have is a 'GameManager' which call 2 AIs, each taking a random move to do. To make my AI perform, I decided to make a ...
1
vote
0answers
36 views

How am I supposed to code equation 4.57 from the book “Machine Learning: An Algorithmic Perspective”?

Consider the equation 4.57 (p. 108) from section 4.6 of the Book Machine Learning: An Algorithmic Perspective, where the derivative of the softmax function is explained $$\delta_o(\kappa) = (y_\kappa -...
0
votes
0answers
17 views

Relative Weighting of Loss Weights for Self-Play Reinforcement Learning

I am training some self play reinforcement learning agents to play 2 player board games like Connect 4, Othello, and The Game of the Amazons. For each game, there is a single neural network with 2 ...
1
vote
0answers
14 views

How can I predict an anomaly based on FFT of multiple signals?

I have 999 signals, each with separate day timestamp, each T=10s long, sampled with fs=25kHz. This gives N=250,000 samples in total. My task was to obtain the averaged magnitude spectrum for each ...
0
votes
1answer
53 views

What is the difference between exhaustive nearest neighbor search and k-nearest neighbour search?

I have two lists of feature vectors calculated from pre-trained CNN for image retrieval task: Query: FV_Q and Reference FV_R. <...
0
votes
0answers
9 views

sklearn.exceptions.NotFittedError: This LabelEncoder instance is not fitted yet [migrated]

I'm trying to run a voice recognition code from Github HERE that analyzes voice. There is an example in final_results_gender_test.ipynb that illustrates the steps ...
0
votes
1answer
31 views

How to let the agent choose how to populate a state space matrix in RL (using python)

I have an agent (drone) that has to allocate subchannels for different types of User Equipment. I have represented the subchannel allocation with a 2-dimentional binary matrix, that is initialized to ...
35
votes
8answers
15k 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. What are the advantages that Python may have over R ...
4
votes
1answer
90 views

Are there Python packages for random search hyper-parameter optimisation? [closed]

Which Python packages do you recommend for random search hyperparameter optimization to use? Is there any recent and good one (better than the one in scikit-learn)?
0
votes
1answer
54 views

Q-learning agent stuck at taking same actions

I have created my own RL environment where I have a 2-dimensional matrix as a state space, the rows represent the users that are asking for a service, and 3 columns representing 3 types of users; so ...
0
votes
0answers
15 views

Extracting specific information from an Invoice images

Tried to extract only specific information from the images but Couldn't, We have to automate this process using this as the format of the Images keeps on changing. LinkSample data What I have Tried: <...
0
votes
0answers
19 views

Q-learning in Python (3D grid navigation): Values do not change between episodes

I am trying to implement a Q-learning algorithm in Python for a 3D gird world as part of an assignment, wherein the environment.py file defines the actions to be taken. So far I have tried several ...
0
votes
1answer
32 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 ...
2
votes
1answer
50 views

What is the Preferred Mathematical Representation for a Forward Pass in a Neural Network?

I know this may be a question of semantics but I always see different articles explain forward pass slightly different. e.g. Sometimes they represent a forward pass to a hidden layer in a standard ...
1
vote
0answers
35 views

Determining if an entity in free text is 'present' or 'absent'; what is this called in NLP?

I'm processing a semi-structured scientific document and trying to extract some specific concepts. I've actually made quite good progress without machine-learning so far, but I got to a block of true ...
0
votes
0answers
11 views

Cocatenate feature extractor layers with different channels

I have a network architecture for feature extraction and I wanted to concatenate layers of the same dimensions but with different feature channels. ...
0
votes
0answers
26 views

How to make a CNN/RNN on a non-binary dataset?

I am using TensorFlow + Keras to make a CNN/RNN. I'm quite new to AI, I've only made a few relatively basic networks for image regression/classification. The end goal of my project is to determine the ...
0
votes
1answer
43 views

How to use validation dataset in my logistic regression model?

I am new to machine learning and recently I joined a course where I was given a logistic regression assignment in which I had to split 20% of the training dataset for the validation dataset and then ...
1
vote
2answers
136 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 ...
0
votes
0answers
13 views

How to design the step() method in a custom-built environment when the action space is a 2-dimentional matrix?

I have an action space that is a matrix. I am struggling with finding how to choose how to take the action when the number of possible actions is huge.
0
votes
1answer
35 views
1
vote
1answer
54 views

not sure if fine-tuned network is finely-tuned

I am practicing with Resnet50 fine tuning for binary classification task, here is my code snippet. ...
0
votes
0answers
29 views

How to implement or avoid masking for transformer?

When it comes to using Transformers for image captioning is there any reason to use masking? I currently have a resnet101 encoder and am trying to use the features as the input for a transformer model ...
0
votes
1answer
29 views

Wind speed forecasting using ARIMA model in Python3

Recently, I started working on time-series models and would mention that I am very new to python and ML as a whole. I tried to implement a time-series model on wind speed data. Being a newbie, I ...
5
votes
1answer
224 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....
1
vote
2answers
44 views

Extract features with CNN and pass as sequence to RNN

I read an article about captioning videos https://blog.coast.ai/five-video-classification-methods-implemented-in-keras-and-tensorflow-99cad29cc0b5 and I want to use solution number 4 (extract features ...
0
votes
2answers
42 views

How could I convolve a 4D image and a 4D filter with stride?

I want to create a CNN in Python, specifically, only with NumPy, if possible. For optimizing the time of convolution (actually correlation) in the network, I wanna try to use FFT-based convolution. ...
0
votes
0answers
25 views

Are there any python implementations of GGP games or how to use game logic written in GDL in python?

I'm writing a General Game Playing (GGP) AI in python. I'd like to test it on some GGP games. So are there any python implementations of GGP games? I found in http://games.ggp.org/base games written ...
0
votes
1answer
25 views

A function in python that identifies the language a document is written in [duplicate]

How can I write a function in python that identifies the language a document is written in. For example I pass "Hello" as the parameter of the function and the function should return English
1
vote
1answer
319 views

How can I develop an object detection system that counts the number of objects and determines their position in an image?

I want to create a simple object detection tool. So, basically, an image will be provided to the tool, and, from that image, it has to detect the number of objects. For example, an image of a dining ...
2
votes
1answer
57 views

How do I turn this formula of the average degree of a graph into Python code?

I am working through the textbook "Graph-Based Natural Language Processing and Information Retrieval", where I've got a question on implementation of this first Latex looking formula/...
0
votes
0answers
17 views

Strategy to input and get large images in VGG neural networks

I'm using a transfert-style based deep learning approach that use VGG (neural network). The latter works well with images of small size (512x512pixels), however it provides distorted results when ...
0
votes
0answers
13 views

Is there a model suitable to predict one correct value based on a 2D input series?

I am using an encoder-decoder architecture, with 2 layers each in the encoder and decoder and 128 neurons in each hidden layer. The inputs are in a 2D form: one column has the days and the other ...
1
vote
2answers
92 views

What are some programming-oriented resources for reinforcement learning?

I have been reading : Reinforcement Learning: An Introduction by Sutton and Barto. I admit it's a good read for learning RL whereas it's more theoretical with detailed algorithms. Now, I want ...
0
votes
1answer
36 views

Should image augmentation be applied before or after image resizing?

For the purposes of training a Convolutional Neural Network Classifier, should image augmentation be done before or after resizing the training images? To reduce file size and speed up training time, ...

1
2 3 4 5
7