Skip to main content

All Questions

-2 votes
1 answer
85 views

How to create a tensor based on another one - Studying PyTorch in practice?

I'm studying IA using PyTorch and implementing some toy examples. First, I created a one-dimensional tensor (X) and a second tensor (y), derived from the first one: X = torch.arange(0, 100, 1.0)....
Victor Vidigal Ribeiro's user avatar
0 votes
1 answer
40 views

Problem in defining a ML model for my Npy dataset

I need help in defining a torch model for my data. I have tried various methods but nothing seems to be working out. Error after error related to input size and shaping. How can I resolve these issues?...
Hanzo Hasashi's user avatar
0 votes
2 answers
347 views

How to train a network with two or more layers

I am implementing a neural network from scratch using python. I have a Neuron class, layer class and network class. I have managed to train and use a network with 1 layer, 1 Neuron and 3 inputs. I now ...
Matthew Haywood's user avatar
-1 votes
1 answer
43 views

MNIST number guesser stuck at 9.84% accuracy

I built a MNIST dataset through watching yt tutorials. Every tutorial was using numpy but since pytorch is a newer technology I decided to build mine using pytorch. The problem is that my model is ...
josill's user avatar
  • 1
-1 votes
1 answer
1k views

Trouble with numpy np.int when using SHAP values

whenever i try to run shap explainers i get the following error code: "/envs/shapTest/lib/python3.9/site-packages/shap/explainers/_kernel.py", line 277, in explain num_subset_sizes = np....
Sebastianostby's user avatar
-1 votes
1 answer
3k views

How to make a Python program to predict the next outcome of a game (of picking a color out of two), using AI and machine learning libraries

I wanted to make a program in Python using the LSTM technique that can predict the next outcome or say probability of a picking a color out of two. The program should use AI and machine learning ...
Ashish's user avatar
  • 1
0 votes
1 answer
126 views

How remove the label data from feature data from window time series (tensorflow)

I train a models of time series forecasting use tensorflow. The models in this tutorial will make a set of predictions based on a window of consecutive samples from the data. *I want to remove the ...
Abdelrahman Hamdy's user avatar
0 votes
1 answer
73 views

Need to compare data of 5000 houses to the top 5000 rows of original dataset

i have a house pricing data set of 80000+ rows. I calculated, according to lattitude and longitude, each houses distance to a landmark in the city, for price detection. And, i found out that 5500+ is ...
nihad aliyev's user avatar
-1 votes
2 answers
2k views

How to reshape machine learning data to match input shape?

So I have some machine learning data split into testing and training data. The data is imported from a csv file and split into training and testing data using a numpy array. I manage to split the data ...
Robert Stevie's user avatar
3 votes
1 answer
21k views

ValueError: matmul: Input operand 0 does not have enough dimensions (has 0, gufunc core with signature (n?,k),(k,m?)->(n?,m?) requires 1)

im new in the crate and programm A.I, and idk how solve this problem, i was programming with the help of YouTube, but he haven't this problem and since I'm new I have no idea how to solve it, much ...
Ignacio Reyes Toledo's user avatar
1 vote
1 answer
442 views

Can anyone make sense of this unexpected value error from scipy.sparse.csr_matrix((data, indices, indptr), [shape=(M, N)])?

When using scipy.sparse.csr_matrix((data, indices, indptr), [shape=(M, N)]) I get the value error: data, indices, and indptr should be rank 1. BUT the data indices and indptr I am using are rank 1 ...
user avatar
-3 votes
1 answer
65 views

NumPy package gives an array() error how to fix this? [closed]

This is a sample code to perform Binarization of data using Techniques for Data Preprocessing : import numpy as np import sklearn.preprocessing input_data = np.array([2.1, -1.9, 5.5], ...
Kushagra's user avatar
1 vote
0 answers
294 views

How to predict a winner in a 5v5 game using tensorflow?

I have data from a 5v5 player game that looks like this: map1,ally1,ally2,ally3,ally4,ally5,enemy1,enemy2,enemy3,enemy4,enemy5,winner For example: Jaguar Falls,Androxus,Tiberius,Khan,Jenos,Seris,Inara,...
lexxish's user avatar
  • 81
2 votes
1 answer
146 views

What is the difference between this two lines of code? ML arrays

So I started learning ML and I need to code in Python. I follow a tutorial on back propagation. So, in it, I am presented with the problem of turning an algorithm to support matrix multiplication so ...
user avatar
1 vote
1 answer
284 views

The truth value of an array with more than one element is ambiguous. Use a.any() or a.all() - Numpy Library

I have seen this same topic some other place but no real answer to my question. I have a numpy array and I need to find the index of a number. a=np.argsort(cosine_similarity(tfidf_matrix[11:12], ...
Alexandru Petrea's user avatar

15 30 50 per page