All Questions
456 questions
-1
votes
1
answer
43
views
Tensorflow perfomance issue
I'm trying to do a very primitive reinforced learning model on tensorflow. Although it's relatively small, a single iteration takes ~6-7 seconds.
def build_model():
model = keras.Sequential([
...
0
votes
1
answer
113
views
add_hparams() function from TensorBoard doesn't work properly
I'm trying to add metrics to this SummaryWriter, but it's not working.
I'm using the add_hparams() function of SummaryWriter, the details of which can be found here: https://pytorch.org/docs/stable/...
0
votes
0
answers
30
views
TensorFlow PPO model not giving model output
I'm using stable_baselines3 module based on tensorflow and created a training model with custom feedback system but train ends in seconds and then when I try to use saved data I can see it doesn't ...
2
votes
1
answer
809
views
AttributeError: module 'tensorflow.python.keras.layers' has no attribute 'BatchNormalization'
I am currently working on a project where I need to use BatchNormalization in TensorFlow Keras. I have imported layers from tensorflow.python.keras, but when I try to use BatchNormalization, I ...
6
votes
2
answers
9k
views
Why do I get ValueError: Unrecognized data type: x=[...] (of type <class 'list'>) with model.fit() in TensorFlow?
I tried to run the code below, taken from CS50's AI course:
import csv
import tensorflow as tf
from sklearn.model_selection import train_test_split
# Read data in from file
with open("banknotes....
1
vote
2
answers
399
views
Pycharm debug is not working with Tensorflow. How do I resolve it?
I have successfully installed the following:
tensorflow (latest version 2.16.1)
keras (latest version 3.1.1
I am using pycharm 2023.3.5 (community Edition). I have some lines of codes with imports ...
0
votes
1
answer
134
views
Custom Peephole LSTM Layer Returns TypeError
I have built a custom Peephole LSTM Layer for TensorFlow:
import tensorflow as tf
class PeepholeLSTM(tf.keras.layers.Layer):
def __init__(self, units, activation='tanh', return_sequences=False, **...
-3
votes
1
answer
242
views
What part of the fits file from sdss contains the spectrum?
I'm working on a CNN quasar detector that takes the optical spectrum as input, and classifies it as Quasar or non-quasar.
I'm currently gathering data from this site:https://dr18.sdss.org/optical/...
0
votes
2
answers
92
views
Keras model.fit() fails with ValueError: Shapes (None, 5) and (None, 1) are incompatible
I'm trying to train a multi-output Keras model using a custom data generator. The model suppose to classify the mammography images by BIRADS categories(1-5) and density(A-D). I expect model to return ...
0
votes
1
answer
127
views
decayed learning rate in CNN
I want to implement a CNN with a callback for learning rate decay (using keras/tensorflow), with Adam optimizer:
class CustomCallback(tf.keras.callbacks.Callback):
def on_epoch_begin(self, epoch, ...
0
votes
0
answers
2k
views
CUDA compatibility with Tensorflow and CuDNN for Deep Learning Models
I tried several combinations from this list to try and activate GPU acceleration for deep learning. However, nothing seems to work with tensorflow.
The CUDA installation works fine (by fine I mean ...
0
votes
0
answers
115
views
TensorFlow/WaveGAN Failing To Detect Audio Files
When I'm trying to train WaveGAN (https://github.com/chrisdonahue/wavegan) on Google Colaboratory, I keep getting this error message that goes as follows:
Traceback (most recent call last):
File &...
1
vote
1
answer
227
views
How to pass multi-input data loader to single-input model
I have the following code that works fine. But the problem is that it works only on one batch because I am using next(iter)
I created a tensorflow dataset that must return 3 values (i.e. X: [x,y,z]) ...
0
votes
1
answer
238
views
Tensorflow/Keras model not fitting data
I'm working on a project with Tensorflow and Keras, but I'm running into an error with the shape of my data. When I run the model.fit() portion of the code I get this error below. I know I need to ...
0
votes
1
answer
61
views
How to use only one program that can train and evaluate the model in object detection
Is there a solution that uses only one program that can train and evaluate the model in object detection, and can stop training the program when the loss value no longer decreases?
I would like to be ...