Questions tagged [python]

For questions related to AI implementation in the Python language

Filter by
Sorted by
Tagged with
0
votes
1answer
14 views

Should I be balancing the data before creating the vocab-to-index dictionary?

My question is about when to balance training data for sentiment analysis. Upon evaluating my training dataset, which has 3 labels (good, bad, neutral), I noticed there were twice as many neutral ...
1
vote
0answers
9 views

Feature extraction for exponentially damped signals

I am looking into exponentially damped signals where it is a stationary signal (after implementing the Adfuller statistical test) and I would like to look into how can I extract meaningful features ...
1
vote
1answer
20 views

Stochastic gradient descent does not behave as expected, even with different activation functions

I have been working on my own AI for a while now, trying to implemented SGD with momentum from scratch in python. After looking around and studying all the maths behind it, i finally managed to ...
1
vote
0answers
6 views
0
votes
1answer
45 views

How to handle extremely 'long' images?

After transforming timeseries into an image format, I get a width-height ratio of ~135. Typical image CNN applications involve either square or reasonably-rectangular proportions - whereas mine look ...
0
votes
0answers
10 views

Verifying if GPU is actually used in Keras/Tensorflow, not just verified as present [migrated]

I've just built a deep learning rig (AMD 12 core threadripper; GeForce RTX 2080 ti; 64Gb RAM). I originally wanted to install CUDnn and CUDA on Ubuntu 19.0, but the installation was too painful and ...
1
vote
1answer
38 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 ...
0
votes
0answers
30 views

Why am I getting “IndexError: list index out of range” when training on the cloud? [migrated]

I resorted to using the cloud training workflow. Given the product I got, I would have expected to drop directly into the code that I have that works with other tflite models, but the cloud produced ...
0
votes
0answers
25 views

Image data generator for my (x, 12, 370, 235, 3) dataset [migrated]

I have made a model with 12 2D CNN inputs. I suddenly realized that the ImageDataGenerator from from keras.preprocessing import image don't accept inputs with ...
1
vote
1answer
53 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, ...
1
vote
0answers
37 views

Neural Network Results always the same

I have a GRU model which has 12 features as inputs and I'm trying to predict output power. I really do not understand though whether I choose 1 layer or 5 layers 50 neurons or 512 neuron 10 epochs ...
1
vote
0answers
13 views

What algorithm to use for finding artists/bands in text and differentiating between artists that share the same name

Here's the data I have: Text from articles from various music blogs & music news sites (title, summary, full content, and sometimes tags). I used a couple different NLP/NER tools (nltk, ...
0
votes
0answers
32 views

How to Visualise a CNN model using Python [migrated]

I am new to Deep Learning and have been trying to show a plot of the CNN architecture using Python in Google Colab. Besides importing the necessary libraries, I have noticed from other resource that ...
0
votes
0answers
18 views

How to run tensorflow inference for multiple models on GPU in parallel? [migrated]

Do you know any elegant way to do inference on 2 python processes with 1 GPU tensorflow? Suppose I have 2 processes, first one is classifying cats/dogs, 2nd one is classifying birds/planes, each ...
1
vote
1answer
38 views

Owner Search for given Server SNO

I am newbie to NLP. I have a excel sheet with following columns: Server_SNo, Owner, Hosting Dept, Bus owner, Applications hosted, Functionality, comments a. Except ...
2
votes
1answer
42 views

Need help with this page from Graph Theory book

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/algorithm. Can ...
0
votes
0answers
27 views

How can I use a Keras trained model saved in a HDF5 file to make predictions? [migrated]

I recently got started with neural networks. I built a handwritten character prediction model using the extended MNIST dataset, sklearn, Keras, numpy and pandas. The main goal is to take and/or upload ...
0
votes
0answers
12 views

How to store the gradients as array in Python? [migrated]

I want to store the final gradient vector of a model as a bumpy array. Is there an easy and intuitive way to do that using Tensorflow?
1
vote
0answers
9 views

Convolutional Feature Encoding Methods in DCNN

In Computer Vision, feature encoding methods are used on pre-trained DCNN to increase the feature robustness to certain conditions such as viewpoint/appearance variations ref. I was just wondering if ...
1
vote
0answers
11 views

Continuing Pretraining on BERT

I need some help with continuing pre-training on Bert. I have a very specific vocabulary and lots of specific abbreviations at hand. I want to do a STS task. Let me specify my task: I have ...
0
votes
0answers
25 views

What are state of the art backward chaining packages in Python?

What are state of the art backward chaining packages/tools/github algorithms in Python? It would be nice if you could also comment on the strengths and weaknesses of each solution !
0
votes
0answers
13 views

How get matrix of word embeddings in FastText of gensim?

I try get the matrix embedding of my model but I can't because although this code gives no error it never ends running. The code is: ...
1
vote
1answer
18 views

Why I have a different number of terms in word2vec and TFIDF? How I can fix it?

I need multiply the weigths of terms in TFIDF matrix by the word-embeddings of word2vec matrix but I can't do it because each matrix have a different number of terms. I am using the same corpus for ...
0
votes
0answers
11 views

Can an AI use your polyphonic natural sounds to produce speech from text?

I've found this python basic text to speech engine but it doesn't work on languages other than an English
1
vote
0answers
13 views

AI Logistic center simulation [closed]

First of all, I am pretty new to python and Ai and never realised a project before. I am a PLC-programmer with experience, but never did anything like this: I was thinking about a logistic center ...
0
votes
0answers
14 views

Feed data into Keras LSTM layer

I'm trying to understand how to feed data into LSTM layer of Keras, but I'm in trouble and I don't understand how to do it. I've ...
1
vote
0answers
8 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/...
0
votes
1answer
54 views

Indexing tensors in custom loss function with Keras

I'm using a custom loss function in Keras. This is the function: ...
0
votes
0answers
10 views

Exhaustive Nearest Neighbor Search vs KNN

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

Is it possible to convert Neural Network code in Python into Matlab code? [closed]

I want to convert the code written in Python into Matlab code. May I know is it possible to do that. Share the available ways or methods to do the conversion. May I know is there any Online ...
0
votes
0answers
12 views

Keras MLP returns always loss 0.0

I'm implementing a multilayer perceptron with Keras to predict the correct words order in a sentence. I'm using train_on_batch()because I convert each sentence in a ...
2
votes
0answers
19 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 ...
1
vote
0answers
31 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 ...
0
votes
2answers
17 views

Binarize ConvNet Feature vector

Given a pre-trained CNN model, I extract feature vector of 3450 reference images FV_R as follows: ...
1
vote
0answers
14 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
28 views

How to encode 16bits PNG using cv2.imencode() in python? [closed]

I want to use cv2.imencode() to encode a 16 bits PNG image.The code in here: The 'depth' and 'data_encode' are as follows: We can find, the type of 'depth' is uint16, but the type of 'data_encode' ...
3
votes
1answer
52 views

How can I generate unique random patterns (similar to the ones in Nutella jars)?

How can I generate unique patterns, as they did for these Nutella jars? See, for example, the video Algorithm designs seven million different jars of Nutella.
1
vote
1answer
34 views

Applying Artificial neural network into kaggle's house prices data set gave bad predicted values

I am trying to solve the kaggle's house prices using neural network. I've already made it with ensembling several models (XGBoost, GradientBooster and Ridge) and I've got a great score ranking me ...
30
votes
6answers
9k views

Why do CNN's sometimes make highly confident mistakes, and how can one combat this problem?

I trained a simple CNN on the MNIST database of handwritten digits to 99% accuracy. I'm feeding in a bunch of handwritten digits, and non-digits from a document. I want the CNN to report errors, so I ...
1
vote
1answer
84 views

How many layers exists in my neural network?

I have a neural network model defined as below. How many layers exist there? Not sure which ones to count when we are asked about the number. ...
0
votes
0answers
33 views

Getting nan values after couple epochs in self built neural network

It is my first time building a neural network from scratch (using only numpy) and I came across this problem. Not only loss, but weights and all outputs become nan after just couple of epochs (around ...
2
votes
0answers
68 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: ...
0
votes
2answers
54 views

Why there's so much search for Python professionals in AI? [closed]

Even with ample knowledge about the low computational performance that Python has, and even though it is an interpreted language that is not recommended for real-time applications, it is the ...
1
vote
0answers
16 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 ...
2
votes
0answers
26 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 ...
1
vote
1answer
18 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 ...
6
votes
2answers
159 views

Can we get the inverse of the function that a neural network represents?

I was wondering if it's possible to get the inverse of a neural network. If we view a NN as a function, can we obtain its inverse? I tried to build a simple MNIST architecture, with the input of (784,...
1
vote
0answers
30 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
1answer
58 views

Interpretation of feature selection based on the model

The description of feature selection based on a random forest uses trees without pruning. Do I need to use tree pruning? The thing is, if I don't cut the trees, the forest will retrain. Below in the ...

1
2 3 4 5 6