Questions tagged [tensorflow]
For questions related to Google's open-source library for machine learning and machine intelligence. However, note that programming questions are off-topic here.
348 questions
0
votes
0
answers
4
views
When Using Bidirectional Encoders Should The Onedirectional Decoder Have Twice The Dimension (Autoencoders)?
Just so we can avoid misunderstandings in the root: In general an Autoencoder tries to capture the complexity of an input in a latent space that is unable to hold all that input. It then tries to ...
0
votes
0
answers
63
views
Use TensorFlow's model in OpenCV (C++)
I've trained a model to recognize some captchas and the model is doing great. I've trained it using this tutorial (actually I just stole the code, tweaked it and run :) ). Now, I'd like to export it ...
0
votes
1
answer
41
views
CNN Fixed Predictions
I’m building a Keras model based on MobileNetV2 for frame-level prediction of 6 human competencies. Each output head represents a competency and is a softmax over 100 classes (scores 0–99). The model ...
0
votes
0
answers
20
views
Trained ML model is slowing down python code execution
I’m running a real-time inference loop in Python 3.12.3 with a pre-trained variational autoencoder (VAE) implemented in Tensorflow. Although I load the model once outside my main loop, each call to ...
1
vote
1
answer
53
views
How can STFT layer be trainable in Keras 3?
A traditional STFT parameter is window size, where greater window size means higher frequency domain resolution but in trade off the time domain resolution. It makes sense that if window size became ...
0
votes
0
answers
52
views
Kaggle notebook from keras 2 to keras 3 problems
as the title suggests, I'm trying to convert a notebook in keras 3, but idk why it's not working properly.
This is the original notebook (tell me if it's better to put here the code), I'm trying to do ...
0
votes
0
answers
28
views
ANN poor NMSE issue: complex valued input and output discrete-time voltage data from third order static non-linear system
I'm currently working on training a neural network in Python to model a nonlinear system using complex-valued voltage data. My dataset comprises 3400 training samples, each consisting of 128 discrete ...
0
votes
0
answers
58
views
Why am I getting the same accuracy on validation data? - Python - Computer Vision - Deep Learning
I'm getting the same accuracy on validation data, and the accuracy on the training data varies little in every epoch.
The training data consists of 19670 images (14445: class 0, 5225: class 1). The ...
0
votes
1
answer
56
views
custom seuential layer which can iterate over each value in the input
I would like to make a custom layer which takes an image (2D) and does some math to each pixel and then passes this to the next layer.
I have below some psudo code which tries to implement this. How ...
0
votes
0
answers
92
views
Keras Model: Input Shape Mismatch Issue After Debugging Dimensions
I have a multi-input Keras model combining a text input and a numeric input. Both inputs are passed through Dense layers followed by Embedding layers, then concatenated and pooled using ...
0
votes
1
answer
83
views
How to Resolve Matrix Size Mismatch in TensorFlow Model Builder for Combined Text and Numeric Inputs?
I'm working on a Keras model using the Functional API that processes two inputs:
Text Input: A padded integer array with a shape of (32, 1149) (batch size 32, sequence length 1149). Example: [5, 10, 3,...
0
votes
1
answer
79
views
How to print intermediate shapes in a Keras Functional API model_builder during graph construction?
I am trying to debug my model_builder function in Keras Functional API by printing the shapes of intermediate tensors. However, none of the methods I have tried so far seem to work as expected.
Here's ...
1
vote
2
answers
250
views
Why are PyTorch and TensorFlow the most widely used frameworks?
Even through there are several others, what's special about these two that make them so popular?
1
vote
1
answer
101
views
Regression model is doing exceptionally very well on time series
I have the following task to do: I have time series data. Training by the consecutive 3 days to predict the each 4th day. Each day data represents one CSV file which has dimension 24x25. Every ...
1
vote
0
answers
31
views
What Policy/Agent and Observation Spec To Use For TensorFlow Agents For Video Game Platformer?
I'm trying to create a model to beat a video game platformer I made a few months ago. In the game, the platforms scroll down from the sky and the player has to keep jumping to them to avoid touching ...
1
vote
1
answer
64
views
Tensorflow Fine-tune BERT error
I have a piece of Tensorflow code:
...
0
votes
0
answers
61
views
Predict more elements than the input
I can use any machine learning algorithms (but neural networks are better for me) to resolve this issue: use few elements as input (numerical) to predict more elements as output. In normal regression ...
1
vote
0
answers
68
views
Any tutorials/courses to learn variational autoencoders on tabular data?
I aim to use variational autoencoders (VAE) to find interpretable latent spaces for genetic data. So, I need to understand how they work, what activation function to use, etc. But all tutorials and ...
1
vote
1
answer
85
views
Feature Crossing with ~200 features
I am working on a project to make a model using Keras to guess the difficulty of climbing routes on a standardised climbing wall (https://moonclimbing.com/moonboard). Each hold on the wall is either:
...
0
votes
1
answer
175
views
Saving a stable diffusion model for later use
I am new to ML and plan to use KerasCV stabledifussion model to generate images from text. The example on the KerasCV website is straightforward but I could not find a way to save the model locally ...
0
votes
0
answers
219
views
How to solve the exploding gradient problem in VAE training?
I was trying to implement VAE on the CelebA dataset inspired by the Tensorflow implementation of MNIST. I have tried varying batch size but there seems to be no effect from that. The image formed is ...
0
votes
1
answer
62
views
Regression model training improvement
I am fairly new to TensorFlow and ML in general and am currently working on a regression neural network while learning about different parts and concepts of it. My goal is to try & achieve a model ...
2
votes
0
answers
176
views
How to Create a Neural Network Model to Generate Dance Movements Based on Music in MMD Format
I am working on a project where I need to create a neural network model to generate dance movements based on music. My goal is to achieve results similar to this video: https://youtu.be/FrA7f5F9TsI
...
0
votes
1
answer
168
views
How to use the tf.image.SSIM function [closed]
Can anyone please help me understand how to use this SSIM function (https://www.tensorflow.org/api_docs/python/tf/image/ssim)? The filter_size parameter has a ...
0
votes
0
answers
72
views
I can’t pass a treshold no matter what I do
I am currently training an CNN for classification. My training data are 80x80 images, 3 channels, which I have grouped into 25% validation, 75% training, all evenly distributed. I have 3 classes into ...
1
vote
1
answer
62
views
Why are the tutorials and built-in datasets giving us examples that simply do not work?
I have built a classical neural network based on IMDB reviews according to the tutorial in one book about AI. 25 000 positive reviews, 25 000 negative reviews. Positive reviews result to "0",...
2
votes
1
answer
266
views
How do I input multi-channel Numpy array to U-net for semantic segmentation
I had lidar 3D point cloud data from semantckitti. I want to perform Semantic Segmentation on the data using U-Net. I converted the 3d point cloud data into 2D using spherical conversion and saved the ...
1
vote
1
answer
60
views
Beginner need help - identify data [closed]
I am learning Tensorflow, and I have a specific problem I want to solve.
I want to identify on/off of my large power consumers at home. And calculate the power consumption elsewhere.
I expect to input ...
1
vote
3
answers
406
views
Does transformers' self-attention mechanism process tokens independently, or entire sequence at a time?
About attention: the Query, Key and Value vectors (before the linear transformations) are just the entire sequence, that is being inputted, or just each token? Chat-GPT nor Youtube didn't give me a ...
0
votes
0
answers
116
views
Why does the accuracy get stuck at a constant value when using Keras for multiclass singles-label classification problem?
I am trying to solve a multiclass classification problem using Keras. The current network looks as follows:
...
-1
votes
1
answer
74
views
2
votes
1
answer
108
views
If the output is 0.09, does this mean that the prediction is class 1 or 0?
I use a Keras EfficientNetB7 and transfer learning to solve a binary classification problem. I use tf.keras.layers.Dense(1, activation="sigmoid")(x) for ...
2
votes
0
answers
296
views
cGAN: Discriminator loss going to zero while Generator's going always up but the result is very good
I have a Conditional Generative Adversarial Network for Quantum State Tomography. The metrics I am monitoring during the training process are the losses and the Fidelity (the degree of similarity ...
1
vote
1
answer
70
views
Can I do incremental learning with different loss function in neural networks?
I have a saved tensorflow neural network model. I was wondering if it's possible to incrementally train the model but with different nt loss function.
1
vote
0
answers
89
views
How to represent cards for uno game
I am currently trying to build a DQN agent that plays the game UNO
The observation it gets looks like this:
...
1
vote
1
answer
178
views
RL agent for autonomous vehicle is able to follow the road but can't avoid crashing at all (Highway-Env / Racetrack Env.)
I coded some deep RL algorithms (DQN and SAC) with tf2/keras to solve an environment where a vehicle needs to follow the track and avoid crashing into one other vehicle (there is only one other ...
0
votes
1
answer
194
views
Transfer learning using pretrained tensorflow object detection model [closed]
I am new to AI/ML and wanted to seek guidance as I am totally lost. I will simplify my issue as follows:
Let's say I would like to detect apples and oranges in images.
I would like to leverage a pre-...
0
votes
2
answers
431
views
I'm trying to understand the use model for different Python libraries
I'm new to ML/AI field, and after completing several free university courses from MIT OpenCourseWare and Harvard CS50, I've gained some familiarity with the theoretical foundations of Artificial ...
3
votes
1
answer
316
views
How can I improve this toy Graph Neural Network Generative Language model [closed]
Background
I'm an undergraduate student with research interests in a field of physics that has significant overlap with graph theory, and a functioning knowledge of how simple neural nets work and how ...
1
vote
1
answer
134
views
Dealing with noise in models with softmax output
I have a device with an accelerometer and gyroscope (6-axis). The device sends live raw telemetry data to the model 40 samples for each input, 6 values per sample (accelerometer xyz, gyroscope xyz). ...
-1
votes
1
answer
673
views
Empty space detection [closed]
I'm looking for a TensorFlow model detecting empty spaces on the images. I need to add my company logo to this empty area so there shouldn't be any faces or objects in this area.
Also, I would be ...
0
votes
1
answer
55
views
Patterns binary classification - model doesn't overfit
I am working on a very basic binary classification problem. For each set of four float numbers $(x,y,z,w)$, I want to check if they fall or not into one category.
I have written a model with 3 dense ...
0
votes
1
answer
525
views
What is actually being saved in the file when you save a model? For example a Tensorflow SavedModel file [closed]
I'm building a feature for my application that requires reading the properties of a saved ML model file (after it's trained). However, as I am pretty new to this field, I don't really understand the ...
1
vote
1
answer
1k
views
Is it possible to write/build an AI model without using Frameworks? [closed]
I'm a relatively newbie in this world of Artificial Intelligence, although I am able to use frameworks such as Tensorflow and also understand the general concepts behind training weights and ...
0
votes
1
answer
2k
views
Keras Subclassing : TypeError: 'KerasTensor' object is not callable Call arguments received by layer [closed]
Implementing UNet but getting an error: type error 'KerasTensor' object is not callable
...
1
vote
2
answers
151
views
Transfer Learning for Solar Energy Production Forecasting with LSTM: Generalized vs. Specialized Models
I am working on a solar energy production forecasting problem using LSTM multi-step models to predict 1/4/8h ahead of solar energy production for different solar installations. Our goal is to help ...
0
votes
1
answer
65
views
How to convert my test data in the same dimensionality as my train data
I have trained a VAE with jpg images. My latent space dimension has 768 features and when plotting the latent space it looks like this:
However, when I use the scikit learn tool LDA (Linear ...
2
votes
0
answers
52
views
Combining GANs and NLP for AI-Based Programming: Generating Input-Output Templates for Computer Functions
I would like to combine GANs and NLP to create a system that can take an input and generate an appropriate output. For example, ...
0
votes
0
answers
325
views
Increasing "output_sequence_length" in TextVectorization layer worsens model's performance
When exploring the Twitter Sentiment Analysis dataset on Kaggle, I came up with a model that looks like this:
...
0
votes
0
answers
3k
views
How important is to fix this common Tensorflow warning?
I have seen some people with the same problem, this is the warning:
...