Category "keras"

Is there a way to get the real sequence_length in the model description of a RNN/LSTM in Keras?

I would like to get to know the real sequence_length in Keras for a LSTM/RNN. Unfortunately, when I print the model I only get None all the time as a value. Her

Trying to write a custom loss function in tensorflow

I am trying to make a custom loss function where I perform an inverse fast Fourier transform to a set of data and then do the following calculations. When I run

Talos, syntax to select best_model

I'm running a toy model for learning, on Ubuntu 21.10, in a conda environment that comprises python 3.74, keras 2.4.3 and talos 1.0, among many other packages.

Negative dimension size error in tensorflow [duplicate]

so I have 2 images, img1 and img2 both with shape=(20,20), to which I expand_dims to (1,20,20) 1 being batch size and feed them to the network

Multi input problem Keras. Expected to see 2 array(s), but instead got the following list of 1 arrays

I have a model that takes two inputs of the same shape (batch_size,512,512,1), and predict two masks each of shape (batch_size,512,512,1). dataset_input = tf.da

Use Keras Neural Translation Model (h5 format model) in spacy v3

first 'im not a developer by trade, my developer is not available for health reasons but i have some experience in python/spacy development. I need some guidanc

Keras: Having trouble converting depreciated 'merge' layer to new version

I am trying to implement this model: https://github.com/abhishekkrthakur/is_that_a_duplicate_quora_question/blob/master/deepnet.py but it is from an older versi

How do you compile mixed data types for tensorflow?

I am trying to make a mixed dataset but I am struggling. I want to use an image and float value for the inputs. Then output a linear regression. I've tried rese

TensorFlow: TypeError when itterating through model architectures

I have a script which goes through a simple 2d CNN and I'm trying to run through a range of different values for the number of layers and neurons per layer in m

Weighted categorical cross entropy

please I'm trying to build an NLP classifier on top of BERT but I'm struggling with data imbalance. I'm looking for an implementation of weighted CategoricalCro

Model accuracy not improving in CNN for image classification

I am using ResNext architecture for classification. the training dataset contains approximately 31000 images distributed among 61 classes. And validation datase

`generator` yielded an element of shape (8, 0) where an element of shape (None,) was expected. Traceback (most recent call last):

I was training a network and I decided to add more data for training. my data set is selected from another data but both have (460,620,3) and Uint8 type. but wh

'NoneType' object has no attribute '_inbound_nodes'

I have a code to forecast a time series using an attention mechanism. Here's what I've got so far, but I'm getting an error. def dot_product(x, kernel): if

How to configure the Keras Optimizer and Learning rate using config.yaml file?

I have defined few parameters in my config.yaml like as below. params: epochs: 10 batch_size: 128 num_classes: 10 loss_function: sparse_categorical_cros

Matterport's mask rcnn doesn't train after setting up parameters

Task: Mask RCNN train_shapes.ipynb tutorial. Training to segment different shapes in the artificially generated shapes dataset. Problem: Matterport's Mask RCNN

GlobalAveragePooling1D equivalence with Lambda Layer

Is the GlobalAveragePooling1D Layer the same like calculating the mean with a custom Lambda Layer? The data is temporal, so x has shape (batch, time, features)

Create a Tensorflow Dataset from a Pandas data frame with numerous labels?

I am trying to load a pandas dataframe into a tensor Dataset. The columns are text[string] and labels[a list in string format] A row would look something like:

Keras/Tensorflow network inference performance

I am using a Keras network which I am calling predict() many times on a single input. A rough calculation based on the layers gives ~3Mops. Running on my CPU sh

Instantiate Keras model with some weights before training

I have Keras model: pre-trained CV model + a few added layers on top I would want to be able to do model.predict before model.fit Q: how do I instantiate model

tensorflow Keras fitting value_error

I am new to tensorflow. i've tried to fit X and y both shape=8 float64 tensors X as feature set and y as target set. X = np.array([-7.0, -4.0, -1.0, 2.0, 5.0, 8