Category "keras"

Can I feed intermediate result back into the CNN and get my final result? (update)

I am new to machine learning. I got the intermediate result of layer 31 of my CNN using the following code: conv2d = Model(inputs = self.model_ori.input, output

Reverse of keras Text Vectorization layer?

tf.keras.layers.TextVectorization layer maps text features to integer sequences, and since it can be added as a keras model layer it makes it easy to deploy the

Getting ValueError: Data Params Error when using masterful.trainer.train

I followed the tutorial here to try to train my model using CIFAR-100. But I'm getting this error. What do I do? ValueError: Data Params Error: The dataset labe

tensorflow keras savedmodel lost inputs name and add unknow inputs

I'm currently implement the sequantial deep matching model (https://arxiv.org/abs/1909.00385) using tensorflow 2.3. And I included the preprocessing layer as pa

How to ignore regularization losses from sub-layer of tf.keras.Model?

I want to distill knowledge from a teacher student to a student one, so I implemented a class named OCCSE that inherits from tf.keras.Model and accepts both tea

ValueError: Please initialize `TimeDistributed` layer with a `Layer` instance

I'm trying to build a model which can be trained on both audio and video samples but I get this error ValueError: Please initialize `TimeDistributed` layer with

Combine the outputs of a sub model intermediate layer and a parent model

I am trying to make a toy example work; there is a simple submodel: Model: "sub_model" _________________________________________________________________ Layer

What should be the class mode for training a multilabel classification model?

I am working on an image classification task to classify among cars and buses. The problem is that in most car images, there is buses in the background and vice

CNN accuracy plotting

I used a convolutional neural network (CNN) for training a dataset and I want to plotting accuracy for this. Before, I tried to use matplotlib but I couldn't su

Bert embedding layer raises 'ValueError: A target array with shape ' with BiLSTM in keras tensorflow

I've problems integrating Bert Embedding Layer in a BiLSTM model for text classification task. My dataset is in the form where each row has 2 columns: text and

got nan in keras tuner but it works when I train it

I trained my network several times and I already got some results. Then I found out about the Keras tuner and wanted to find the best hyperparameters with it. b

tensorflow2.x keras Embedding layer process tf.dataset error

This question is a follow-up of tensorflow 2 TextVectorization process tensor and dataset error I would like to make do a word embedding for the processed text

how to multiply two tensor on an axis

let say I got two tensor where tensor A has shape (100,7), tensor B has shape (100,7,64). I want to pick the first item from A and B and multiply them by tf.mat

How can I use tensorflow to create a recommendation system that returns a ratings matrix?

I am trying to use Tensorflow to create a recommendation system. What I want to do is to read data from two csv files, one containing 'item_id' and the other co

Target Data Missing from tensorflow fit()

So I have a problem when train deep learning with BERT with tensorflow which contain text dataset. So i want to fit() the model but got an error when training.

how to multiply two tensor on an axis

let say I got two tensor where tensor A has shape (100,7), tensor B has shape (100,7,64). I want to pick the first item from A and B and multiply them by tf.mat

Using tf.keras.utils.image_dataset_from_directory with label list

I have list of labels corresponding numbers of files in directory example: [1,2,3] train_ds = tf.keras.utils.image_dataset_from_directory( train_path, label

TypeError: __init__() missing 1 required positional argument: 'units' while coding an neural net

import pandas as pd import numpy as np from sklearn.preprocessing import StandardScaler from keras import Sequential from tensorflow.keras.layers import Dense f

How to call TensorFlow model with linspace?

I'm trying to call a TensorFlow model on a linspace but I can't seem to get even a very simple example (based on https://www.tensorflow.org/api_docs/python/tf/k

'TimeseriesGenerator' object has no attribute 'shape'

I have a LSTM model. which when I try to fit i get the error mentioned in the title. I have an array of timeseries data with multiple features I'm feeding as in