Skip to main content

All Questions

0 votes
0 answers
54 views

I am having a error with shape alignment, how can I solve this?

This is the code for a self playing game with a feedforwrd only neural network. I am gettin a error with the shapes alignment and I'm not being able to solve it setup.py: import pygame import os ...
FELIPE FERREIRA's user avatar
0 votes
0 answers
52 views

Stable torch, ultralytics, tensorflow packages for requirements.txt

I'm writing a requirements.txt for a real-time sports video analysis project and testing various libraries such as YOLOv8, Torch, TensorFlow, etc. I've tried multiple Python versions but encountered ...
www's user avatar
  • 59
1 vote
1 answer
87 views

numpy eager execution problem after loading a CNN model

I want to save and load a CNN model to further training. I have developed a model and saved it as .h5 file. There is no problem when creating, training, and saving at first run. The problem exists ...
Arief Kurniawan's user avatar
0 votes
1 answer
67 views

Tensorflow model training, List to numpy array conversion unevenly changes the shape of data

I am trying to predict LSDC from MRI images. For each study_id there are multiple images. Each study_id represents each patient. I want to predict 3 level of severity for 5 conditions on 5 levels. I ...
Kazi Md Abdullah Al Mubin's user avatar
0 votes
1 answer
81 views

Implementing a perceptron using numpy [closed]

I'm trying to implement a perceptron in python using numpy, when using the notation z=XW+b everything is fine. While studying ML I do see though that z=WX+b is also common, especially when talking ...
Statistician_guest's user avatar
0 votes
1 answer
112 views

Training a Keras model to identify leap years

I'm trying to teach my learning model how to identify leap years. My Python code can be seen below: import tensorflow as tf import numpy as np import calendar # ------------------- UTILITY FUNCTIONS -...
Ricardo DS's user avatar
0 votes
1 answer
106 views

NumPy Stride Tricks: Is it possible to add the windows back into the original array size at the same location without for loops?

I'm currently trying to implement my own version of 2D Pooling (with channels included) in Python using only NumPy, but I've run into a bit of a roadblock with vectorizing the backpropagation process. ...
user29391104's user avatar
0 votes
0 answers
103 views

Regression in Custom Neural Network giving same output for all inputs

I have recently started studying Neural Network and thought about writing my own Neural Network before using libraries like tensorflow or pytorch so that I understand deeply what happens inside the ...
Ritanshu's user avatar
  • 109
0 votes
1 answer
50 views

Statistical learning confusion table variable

I am getting an extra variable in my confusion table, not sure where it's coming from. The Dataset 'Default' has the following columns: default, student, income, balance The variable 'default' has two ...
weyronn12934's user avatar
0 votes
2 answers
72 views

`ValueError` in Matrix Multiplication for Gaussian Process Regression Implementation

I'm implementing a Gaussian Process Regression (GPR) model in Python using a Squared Exponential Kernel. However, I'm encountering a ValueError during the matrix multiplication step of the predict ...
Max Michlits's user avatar
0 votes
1 answer
56 views

ValueError: Failed to convert a NumPy array to a Tensor (Unsupported object type csr_matrix)

I tried to run: import numpy as np import pandas as pd import tensorflow as tf import numpy as np from tensorflow.keras import Sequential from tensorflow.keras.layers import Dense, Embedding, ...
Raghavendra Bhat's user avatar
0 votes
0 answers
39 views

resample_poly of one-hot encoded masking

I have these tensors: X_test = X_unseen_flutter[0,0,:][None, :] # (Batch Size, Amplitude Length) -> (1, 3208) y_true = y_unseen_flutter[0,0,:][None, :] # (Batch Size, Mask Length, Num of Classes) -&...
Muhammad Ikhwan Perwira's user avatar
0 votes
0 answers
755 views

Getting Error "object __array__ method not producing an array" while training a model

I am trying to train a model using the neural network model Sequential. Every thing is going good till the model compilation. As soon as i hit model.fit() for model training i get the error "...
Manthan Sharma's user avatar
1 vote
1 answer
63 views

Get directional elements in matrix

Lets suppose that I have a point of interest in my matrix that is NxN. The point is located in the position ij. So, given the index ij, is there a simple way to get the line elements passing trough ij ...
Rotacional's user avatar
0 votes
0 answers
51 views

Create a Machine Learning Numpy array with scalar features and an N-dimensional Coordinate Vector feature

I'm trying to format my data for a ML program. There are 33,000 events and each event has 3 things I want to consider: Mass, Energy, a coordinate. The Mass is of the shape (33000,) and looks like: [...
Liam B's user avatar
  • 1

15 30 50 per page
1
2 3 4 5
101
X