Category "keras"

Heroku : tensorflow 2.2.1 too large for deployment

im trying to deploy a keras project to heroku but pushing to the repository master branch seems to be problematic for me as the following error is reported ever

How does keras.evaluate() calculate the loss?

I am building a MLP using TensorFlow 2.0. I am plotting the learning curve and also using keras.evaluate on both training and test data to see how well it perfo

keras.utils importError in Colab cannot import name "to_categorical"

I'm using Google's Colab to run the Deep Learning codes from the Book " Deep Learning with python" by François Chollet. The 1st exercise is to use the mn

Reshape the input for BatchDataset trained model

I trained my tensorflow model on images after convert it to BatchDataset IMG_size = 224 INPUT_SHAPE = [None, IMG_size, IMG_size, 3] # 4D input model.fit(

Using tf.data.Dataset as training input to Keras model NOT working

I have a simple code, which DOES work, for training a Keras model in Tensorflow using numpy arrays as features and labels. If I then wrap these numpy arrays usi

Run keras.Models.fit() in graph

How to run keras.model.fit() in graph not with eager execution...?? I tried to run my model in graph by using tf.compat.v1.disable_eager_execution(), but the c

AttributeError: 'float' object has no attribute 'dtype'

When I try to use a custom activation function in keras (2.2.5), I create a new activation function gelu. add it in activations.py : from . import backend as K

Follow-up question regarding a Keras model issue

So about a week ago I posted this question: Issues running a Keras model with custom layers. The suggestion there was to try to make this question smaller and t

A `Concatenate` layer requires inputs with matching shapes except for the concatenation axis. Received: input_shape=[(None, 28), (None, 28, 28)]

""" Defining two sets of inputs Input_A: input from the features Input_B: input from images my train_features has (792,192) shape my train_images has (792,28,28

@tf.function( input_signature ) on an object's method defined outside of a class scope

Say I have a Custom Layer : class Custom_Layer(keras.layers.Layer): def __init__(self, **kwargs): self.w_0 = tf.Variable(tf.random_uniform_initializ

How can you save a keras model in 64bit format?

how can you save a keras model in 64bit format? This is able to 'put tensorflow' in 64bit 'mode' for the current runtime. But I've found that even just saving t

When predicting, shall we scale unseen inputs, and un-scale outputs of a model?

I am new to Machine Learning, and I followed this tutorial to implement LSTM model in Keras/Tensorflow: https://www.tensorflow.org/tutorials/structured_data/tim

model.predict yeilds more predictions than the number of outputs

I've created a multi-class image classifier using CNN. I am using the keras module specifically and I am using generators to fit and then predict 4 different cl

Binary image classification TypeError: Invalid keyword argument(s) in `compile()`

model.compile( optimizer= keras.optimizers.Adam(), loss= [keras.losses.SparseCategoricalCrossentropy(from_logits= True) ], metrices= ['accuracy']) mode

CNN model accuracy fluctuates

Tensorflow/Keras I have developed a CNN model to classify images as circle, triangle or square. However, my accuracy values have wide fluctuations. Is it someth

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