Category "keras"

Variational AutoEncoder - TypeError

I am trying to implement a VAE for MNIST using convolutional layers using TensorFlow-2.6 and Python-3.9. The code I have is: # Specify latent space dimensions-

How is the smooth dice loss differentiable?

I am training a U-Net in keras by minimizing the dice_loss function that is popularly used for this problem: adapted from here and here def dsc(y_true, y_pred)

Keras ModelCheckpoint val_loss decreases but says it doesn't

I use a ModelCheckPoint in Keras to save only the best models. Although, I see the val_loss decreasing the ModelCheckPoint says; No. Any ideas? checkpoint = Mod

Siamese Network for binary classification with pre-encoded inputs

I want to train a Siamese Network to compare vectors for similarity. My dataset consist of pairs of vectors and a target column with "1" if they are the same an

How to run tensorflow inference for multiple models on GPU in parallel?

Do you know any elegant way to do inference on 2 python processes with 1 GPU tensorflow? Suppose I have 2 processes, first one is classifying cats/dogs, 2nd on

How can I run tensorflow without GPU?

My system has a GPU. When I run Tensorflow on it, TF automatically detects GPU and starts running the thread on the GPU. How can I change this? I.e. how can I r

Correct Implementation of Dice Loss in Tensorflow / Keras

I've been trying to experiment with Region Based: Dice Loss but there have been a lot of variations on the internet to a varying degree that I could not find tw

AttributeError: module 'keras.utils' has no attribute 'get_file'

When I'm trying to implement the following code from keras_segmentation.models.segnet import resnet50_segnet from keras_segmentation.predict import model_from_c

LSTM is Showing very low accuracy and large loss

I am applying LSTM on a dataset that has 53699 entries for the training set and 23014 entries for the test set. The shape of the input training set is (53699,4)

Calculate loss in Keras without running the model

Is there a way to get the loss of the model, with it's current weights, without running evaluate, or fit, on it? model = keras.Sequential([ keras.layers.In

Value Error: No such layer - Extracting the output of a tensorflow keras layer

I'm trying to extract the output of thelayer in my autoencoder and have referenced this Keras documentation and this stackoverflow post so far. When I try to ex

How to specify the correlation coefficient as the loss function in keras

I am using keras+tensorflow for the first time. I would like to specify the correlation coefficient as the loss function. It makes sense to square it so that it

Displaying images from each class of a batched tensorflow dataset

I'm doing an assignment creating a cv model with 6 different classes. I've loaded my dataset as per this example: https://keras.io/examples/vision/image_classif

Apply different loss function to part of tensor in keras

I'm trying to build a custom loss function where it will apply different function to different part of tensor based on groundtruth. Say for example the groundt

Dependent hyperparameters with keras tuner

My goal is to tune over possible network architectures that meet the following criteria: Layer 1 can have any number of hidden units from this list: [32, 64, 12

Making neural network training reproducible using RStudio's Keras interface

I'm trying to make neural network training reproducible using RStudio's Keras interface. Setting a seed in the R script (set.seed(42)) doesn't seem to work. Is

module 'keras.engine' has no attribute 'Layer'

----> 6 from mrcnn.model import MaskRCNN /usr/local/lib/python3.7/dist-packages/mrcnn/model.py in () 253 254 --> 255 class ProposalLayer(KE.Layer): 256

Use different metrics in tf.keras.metrics for mutli-classification model

I am using the TensorFlow federated framework for a multiclassification problem. I am following the tutorials and most of them use the metric (tf.keras.metrics.

How to split folders to 3 datasets with ImageDataGenerator?

validation_split parameter is able to allow ImageDataGenerator to split the data sets reading from the folder into 2 different disjoint sets. Is there any way t

ImportError: cannot import name 'keras' from 'tensorflow'

I'm try learning TensorFlow but i have a problem. I'm importing TensorFlow like in official website but i take a error. import pandas as pd import numpy as np i