LSTM neural network test to predict SPY prices giving me this error after training

Error is as follows: Traceback (most recent call last): File “/Users/myname/PycharmProjects/LSTM1P/venv/lib/python3.7/site-packages/pandas/core/indexes/base.py”, line 3080, in get_loc …

Training a single model jointly over multiple datasets in tensorflow

I want to train a single variational autoencoder model or even a standard autoencoder over many datasets jointly (e.g. mnist, cifar, svhn, etc. where all the images in the datasets are resized to be …

If-Else Statement in Custom Training Loop in Tensorflow

I created a model class which is a subclass of keras.Model. While training the model, I want to change the weights of the loss functions after some epochs. In order to do that I created boolean …

Debugging tensorflow fit not making sense

So I was having different results with a self-implemented code and Tensorflow results. I wanted to test each value to see where was my error (loss, gradients, optimizer, etc). Therefore I did a test …

how to use more three channels input in train_datagen

I am trying to apply Keras for images with more than three spectral channels. I noticed that train_datagen handles images with three channels based on color_mode=’rgb’. Is there any way to increase …

TensorFlow CNN Incompatible Shapes: 4D input shape

I have sample data in the form: Data[n][31][31][5][2] with: “[n]” being the sample “[31][31]” being the array of data points “[5]” being the number of bits within that …

How to convert tensor from 2D to 4D

I’m currently working with DICOM files and the TensorFlow IO library for DICOM files seems to throw some errors. So what I was originally doing was this: # read file bytes image_bytes = tf.io….

How to get multiprocessing for subtask work with tensorflow-gpu?

Basically I use tf-gpu 2.3rc0 to perform image detection on a video stream. For each loop, there’s a subtask runs separately. So I try to use Pool from multiprocessing The structure is like: while …

tensorflow: InvalidArgumentError while find the AUC score

I have a dataset with labels 0’s and 1’s, which is binary classification problem. Getting error while try to find AUC score using tf.keras.metrics.AUC() as metrics in model.compile(.. function. Code: …

How to Calculate Confusion Matrix on test Data?

I want to plot a confusion matrix on the validation data. Specifically, I want to calculate a confusion matrix of the model output on the validation data. I tried everything online, but couldn’t …