All Questions
Tagged with tensorflow numpy
2,713 questions
0
votes
1
answer
57
views
Why do model.evaluate() vs. manual loss computation with model.predict() in tf.keras do not add up?
I use keras and tensorflow to train a 'simple' Multilayer Perceptron (MLP) for a regression task, where I use the mean-squared error (MSE) as loss-function. I denote my training data as x_train, ...
0
votes
0
answers
97
views
What is wrong with my Python and Tensorflow install?
I work on a PC with Windows 11 and have installed Python 3.11.9 which is supposed to be the required Python version for Tensorflow. I also installed numpy 1.26.4, scipy 1.15.2, Orange3 3.38.1 which ...
0
votes
1
answer
58
views
Discrepancy Between NumPy and TensorFlow FFT Outputs: Missing Imaginary Components in TensorFlow
I am working on a project where I need to perform Fourier Transform on synthetic periodic data using both NumPy and TensorFlow. However, I am encountering a discrepancy between the FFT outputs of ...
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 ...
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 ...
0
votes
0
answers
66
views
Tensorflow numpy gradient function in keras model
I have a problem since i want to use the Numpy's gradient function in a keras model. I've tried to code a custom Layer with tensorflow operations but I'm still stuck with the numpy gradient function ...
0
votes
1
answer
477
views
Understanding YOLOv11 Tensor Ouput Shape for Post-Processing
I tried export YOLOv11 model to tensorflow, it said:
'yolo11n.pt' with input shape (1, 3, 640, 640) BCHW and output shape(s) (1, 84, 8400) (5.4 MB)
Now I have this model summary in Keras 3:
Model: &...
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 -...
0
votes
0
answers
74
views
How to convert .h5 file to JSON format
I have tried all the steps at https://www.tensorflow.org/js/guide/conversion. I do not know whether i should install using pip or npm so I tried both, but when i tried using either of them, it gave me ...
0
votes
1
answer
1k
views
After installing Python 3.12.7 from 3.9.1 I got this issue. Numpy version has been altered and I received this error
I tried to incorporate tensorflow 2.0 into anaconda to be used in jupyter notebook. However, numerous issues have arise ranging from no module tensorflow detected to uninstall and reinstall anaconda. ...
0
votes
1
answer
43
views
How to create Dataset to generate random images with Tensorflow?
I am trying to setup an image pipeline: load images from disk into a dataset, rescale, generate patches, train. Loading from disk is slow so I want to create random data to simulate a real image.
I ...
4
votes
1
answer
46
views
keras model does not learn if using tf.data pipeline
A keras model does learn using Numpy arrays as the input, but fails to make any progress if reading data from a tf.data pipeline. What could be the reason potentially?
In particular, the model ...
2
votes
1
answer
105
views
How can I convert the datatype of a numpy array sourced from an awkward array
I have a numpy array I converted from awkward array by to_numpy() function, and the resulting array has the datatype: dtype=[('phi', '<f8'), ('eta', '<f8')]). I want to make it a regular tuple ...
0
votes
0
answers
39
views
Unable to install and use torch through CUDA and VSCode
I have set up Anaconda environment and downloaded CUDA and CuDNN in it. I also have tensorflow installed via conda (not tensorflow-gpu) along with keras and scikit-learn. Once that is done, I am ...
0
votes
0
answers
77
views
Anomaly detection using CNN autoencoder along with gramian angular field image encoding for time series data
bit of an interesting question here. I have a CNN autoencoder model built using tensorflow that I am trying to detect anomalies with using kernel density estimation along with reconstruction error. ...