Category "keras"

Tensorflow error: ValueError: Shapes (128, 100) and (128, 100, 139) are incompatible

I try to use Functional API for my model, but i don't understand why i have error: ValueError: Shapes (128, 100) and (128, 100, 139) are incompatible My code:

AttributeError: 'Sequential' object has no attribute '_get_distribution_strategy'

I am following an online course through linkedin regrading the Building of models through Keras. This is my code. (This is claimed to work) import pandas as p

Mask R-CNN is not loading weights properly for inference and re-training

QUESTION: I'm new to the world of computer vision and this is my second project with it. I am running an edited version of the Matterport Mask RCNN that runs wi

What is the prediction value of this LSTM neural network?

I just implemented a LSTM, but I'm not sure if I interpreted the structure right. is in this context testPredict = model.predict(Xtest) the last value of the se

How does tf.keras.metrics.TopKCategoricalAccuracy differ from Precision@k?

Coming from recommender systems, precision@k is a popular metric. precision@k = number of relevant predictions in top k / k On the tensorflow docs for tf.kera

Colab: Importing old modules from tf.keras 2.4 fails; importing from Keras 2.4 works, but leads to mixing tf and tf.keras

I'm trying to modify a jupyter notebook to run on colab. It's from a somewhat older repo with known compatibility issues for tensorflow/keras versions after ~2.

Tensorflow on Docker Engine Error Code 132

I am using Docker and Docker-Compose on Ubuntu 20. The application I am deploying on container is using Tensorflow. Docker-Compose build is able to be executed

how to use CRF in tensorflow keras?

The code is like this: import tensorflow as tf from keras_contrib.layers import CRF from tensorflow import keras def create_model(max_seq_len, adapter_size=64

AttributeError: 'Node' object has no attribute 'input_masks'

I created a network, but got the error: AttributeError: in user code: C:\Users\LocalAdmin\.conda\envs\newenvt\lib\site-packages\keras_contrib\metrics\crf_accura

How do I retrieve the one-hot-encoded feature names in tensorflow.keras preprocessing layers

What is the tf.keras equivalent of encoder.get_feature_names found in sklearn? As shown shown in this SO question Need this to get all the one-hot encoded featu

What is the meaning of "trainable_weights" in Keras?

If I freeze my base_model with trainable=false, I get strange numbers with trainable_weights. Before freezing my model has 162 trainable_weights. After freezin

What is the meaning of "trainable_weights" in Keras?

If I freeze my base_model with trainable=false, I get strange numbers with trainable_weights. Before freezing my model has 162 trainable_weights. After freezin

ValueError: Exception encountered when calling layer "sequential_5" (type Sequential)

I am following this course : TensorFlow Developer Certificate in 2022: Zero to Mastery This is the following code : # Set random seed tf.random.set_seed(42) #

Custom Loss Function returning - InvalidArgumentError: The second input must be a scalar, but it has shape [64]

I'm trying to use a modified version of this custom loss and I'm getting the error below InvalidArgumentError: The second input must be a scalar, but it has sh

Adding Dropout Layers to Segmentation_Models Resnet34 with Keras

I want to use the Segmentation_Models UNet (with ResNet34 Backbone) for uncertainty estimation, so i want to add some Dropout Layers into the upsampling part. T

labels and the predictions of multiclass images images Index Error: list index out of range

I am training a CNN with an dataset of images that consists of 2410 RGB images and belongs to two categories, i.e., crops and another is grass. After training t

'module' object is not callable sgd

Here is my code. from keras.optimizers import gradient_descent_v2 as SGD sgd=SGD(lr=0.01,momentum=0.9,decay=(0.01/25),nesterov=False) I get the following er

fit keras.model from generator_function

TF 2.x - just for the experience I tried with a simple experimental dataset - to show the problem: import numpy as np import tensorflow as tf import keras from

TensorFlow optimisation during running model speed up Predict

I want to disable a computation of several filters during Predict call with Tensorflow 2 and Keras. Do i have to modify the source code of Tensorflow to achieve

The method np_utils.to_categorical give me an error

np_utils.to_categorical Keras method give me an error when i gived it a a vector of [962] element which contain 3 classes [1,1,1,...,2,2,2,...3,3,3]. The used