Category "tensorflow"

Tensorflow CNN Image Classification - Using ImageDataGenerator and then Next&Model.fit gives error

I have a CNN model, which is basically processing images and classifying them at the end. There are four class labels, which are UN, D1, D2 and D3. If you look

tensorflow crashes on Mac M1

I am trying to start using tensorflow on my M1 Mac. However, I only get the following message when I try to import tensorflow Python 3.8.5 (v3.8.5:580fbb018f, J

How to convert rgb mask to categorical in keras

I try to find a proper solution to convert a rgb mask from "cam vid" dataset to categorical mask. I have the list of rgb value and corresponding label. What is

Keras semantic segmentation, infinite epoch using ImageDataGenerators

I am trying to train a model based on the U-Net architecture. I am using two data generators (one for training, the other one for validation). However, whatever

How to attach or get filenames from MapDataset from image_dataset_from_directory() in Keras?

I am training convolutional autoencoder and I have this code for loading data (images): train_ds = tf.keras.preprocessing.image_dataset_from_directory( 'pat

Will y_train change during training in keras?

I am trying to write a custom metric in keras like this: def C_index1(E,T): T = T.reshape(len(T),1) T_ind = T > T.T E_ind = E.reshape(len(E),1) E_ind

How to use tensorflow hub in Azure ML

I am trying to use TensorFlow Hub in Azure ML Studio I am using the kernel Python 3.8 PT and TF And I installed a few modules: !pip install bert-for-tf2 !pip

migrating keras + tensorflow cpu to tensorflow-gpu keras modelling

I'm a beginner of data-science and by now, I'm trying to migrate old code keras cpu modelling to gpu-tensorflow. fyi: I'm following instruction on prof.jeffheat

Keras simpleRNN by hand debugging

I plan to transfer my Keras model to embedded C code. In order to do that, I'm first validating in python whether my calculations are correct. There are some er

Work around Keras TypeError limitation when calling layer "tf.keras.backend.rnn_1"

I am trying to use Keras for an attention mechanism in a machine translation using an LSTM network. However, I get a TypeError exception when in my code. TypeEr

Error while creating a model for binary classification for text classification

code: model = create_model() model.compile(optimize=tf.keras.optimizers.Adam(learning_rate=2e-5), loss=tf.keras.losses.BinaryCrossentropy(),

how to score part of the neural network once and the rest multiple times caching the intermediate layer?

I train a model A and try to use the output of the intermediate layer with the name="layer_x" as an additional input for model B. model A is using input1, and m

Converting h5 to tflite [closed]

I have been trying to get this zero-shot text classification joeddav / xlm-roberta-large-xnli to convert from h5 to tflite file (https://huggi

Input 0 of layer "conv1d_5" is incompatible with the layer: expected min_ndim=3, found ndim=1. Full shape received: (None,) when predicting new values

I have trained a VAE and now I am trying to predict new data using this dataset. I have taken the predict code line from this tutorial. However, when I run the

Object Detection Google Colab: AttributeError: module 'tensorflow' has no attribute 'contrib'

I've been working on codes for Object Detection in Google Colab as in 1 and in 2 but, when using the following code sample: !git clone --quiet https://github.co

TypeError: 'type' object is not subscriptable when importing tensorflow_federated as tff

I'm working in colab notebook, and the importing of tff (import tensorflow_federated as tff) was working for months, but suddenly, now when I try to import tff

Can anyone give me a comprehensive guide to installing tensorflow-federated on M1 Mac?

i followed the instructions given by the official tf documentation, but i just cannot resolve the various problems encountered. Did anyone have the experience i

cannot import name 'LayerNormalization' from 'tensorflow.python.keras.layers.normalization'

I am trying to build a ANN model using Tensorflow library on Spyder. Afte ı set my training and test data, ı imported the keras library as seen below

How to overcome "No module named 'keras'" while importing tensoflow_hub

I am using Anaconda and Jupyter Notebook. I need a tensorflow_hub to import the ResNet model, however, I get the error No module named Keras. I've installed ker

Denoise autoencoder not training properly

I'm trying to make a denoise autoencoder wherein the encoder part is vgg16 and decoder is opposite of vgg16(encoder) network. My dataset consists of 5K images i