Category "tensorflow2.0"

Implementing Multiclass Dice Loss Function

I am doing multi class segmentation using UNet. My input to the model is HxWxC and my output is, outputs = layers.Conv2D(n_classes, (1, 1), activation='sigmoid'

how to apply ModelCheckpoint in a custom training loop for tensorflow 2.0?

we can set tf.keras.callbacks.ModelCheckpoint(), then pass a callbacks argument to fit() method to save the best modelcheckpoint, but how to make the same thing

What's code snippet of tf.contrib.crf.crf_log_likelihood in latest tensorflow version 2.8

The below functions existed in Tensorflow 1.5 which is currently deprecated. What's the corresponding code for the function: tf.contrib.crf.crf_log_likelihood(

How to use CPPFlow with giving a .txt as input

I recently used cppflow on VS 2019 on Windows 10. My original data is data in 4 columns per row. I want to use neural network to classify precipitation particle

How do I include the bias term with other weights when performing gradient descent in TensorFlow?

I'm a beginner with ML and have been following the Coursera intro syllabus. I am trying to implement the exercises using TensorFlow rather than Octave. I have t

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

Focal-loss pip installation screwed my conda env for supported GPU tensorflow installation

When I did pip install focal-loss <2022-04-20 Wed 10:00> I got this: Installing collected packages: tensorboard-data-server, tf-estimator-nightly, tenso

Python New Env created by Anaconda Prompt not showing in Jupyter Notebook kernel list

I created a new python env using Anaconda Prompt by using the following steps: conda create --name py3-TF2.0 python=3 conda activate py3-TF2.0 conda install ten

Is it possible to create labels.txt manually?

I recently convert my model to tensorflow lite but I only got the .tflite file and not a labels.txt for my Android project. So is it possible to create my own l

Apply affine transformation to value

I use TF.js to run a key-point prediction model for an input image in browser. And I'd like to apply affine transformation to the value of every keypoint using

How to implement tf.gather with some other tf ops

I want to replace tf.gather with some simple and common tf ops like concat,stack,reshape,slice etc to achieve the same result, because tf.gather is not supporte

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 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

tensorflow 2 TextVectorization process tensor and dataset error

I would like to process text with tensorflow 2.8 on Jupyter notebook. my code: import re import string import tensorflow as tf from tensorflow import keras from

tensorflow ModelCheckpoint on validation precision and recall

I want to checkpoint model whenever validation precision and recall improves - this is on top of validation accuracy and validation loss. So I have added follow

sliding window on a tensor

I'm trying to build a simple word generator. However, I encounter some difficulty with the sliding windows. here is my actual code: files = glob("transfdata/*")

Matrix multiplication in TensorFlow model

I want to use matrix multiplication inside TF model. My model is a NN with input shape = (1,9). And I want to get a product of this vectors by themself (i.e. I

How to do atrous convolution in tensorflow 2 (tf.keras)

I am trying to convert some code from tensorflow 1.x to tensorflow 2.x. It's been going well so far, but I'm stuck on atrous convolution. Unlike other layers, t

Keras - no good way to stop and resume training?

After a lot of research, it seems like there is no good way to properly stop and resume training using a Tensorflow 2 / Keras model. This is true whether you ar