TensorFlow Model Analysis (TFMA) is a library for evaluating TensorFlow models. It allows users to evaluate their models on large amounts of data in a distributed fashion, using the same metrics defined in their trainer. These metrics can also be computed over different slices of data, and the results can be visualized in Jupyter Notebooks.
Questions tagged [tensorflow-model-analysis]
23 questions
7
votes
1 answer
What happens if tf.stop_gradient is not set?
I am reading the faster-rcnn code of tensorflow models. I am confused with the use of tf.stop_gradient.
Consider the following code snippet:
if self._is_training:
proposal_boxes = tf.stop_gradient(proposal_boxes)
if not…

tidy
- 4,747
- 9
- 49
- 89
4
votes
1 answer
Tensorflow model analysis, TFMA for keras model
I would like to use TFMA with keras model. The keras model was created with TF 2.0 alpha.
The model is a pretrained model with a classification layer:
_________________________________________________________________
Layer (type) …

eilalan
- 669
- 4
- 20
3
votes
0 answers
tfma.view.render_plot() won't render in Jupyter, getting 404 on GET /static/tensorflow_model-analysis.js?v=2020103020382
I'm not getting tfma.view.render_plot to render plots with:
tfma.view.render_plot(result)
or
tfma.view.render_time_series
note that tfma.view.render_slicing_metrics does work..
I suspect it's related to this 404... I'm getting the following error…

Jason Anderson
- 93
- 8
3
votes
1 answer
Keras + Tensorflow Model Optimization: TypeError: clone_model() got an unexpected keyword argument 'clone_function'
I'm trying Tensorflow Model Optimization in order to prune a simple Neural Network. Here's my code:
from __future__ import absolute_import, division, print_function, unicode_literals, unicode_literals
import tensorflow as tf
from tensorflow import…

razimbres
- 4,715
- 5
- 23
- 50
3
votes
2 answers
How to convert a saved_model.pb to EvalSavedModel?
I was going through the tensorflow-model-analysis documentation evaluating TensorFlow models. The getting started guide talks about a special SavedModel called the EvalSavedModel.
Quoting the getting started guide:
This EvalSavedModel contains…

Jash Shah
- 2,064
- 4
- 23
- 41
2
votes
1 answer
How to make a custom metric available to TFMA/Beam?
I have created a custom Keras metric, similar to the demo implementation below:
import tensorflow as tf
class MyMetric(tf.keras.metrics.Mean):
def __init__(self, name='my_metric', dtype=None):
super(MyMetric, self).__init__(name=name,…

neurix
- 4,126
- 6
- 46
- 71
2
votes
0 answers
tfma.view.render_slicing_metrics not working
I am trying to visualize model results using tfma.view.render_slicing_metrics. I am getting the results with tfma.load_eval_result(tfma_artifact.uri) and I am able to print the results.
[EvalResult(slicing_metrics=[((('trip_start_hour', 2),),…
2
votes
2 answers
Which model should i use for tensorflow (contrib or models)?
For example if i want to use renset_v2, there are two model file on tensorflow:
one is here, another is here. Lots of tensorflow model are both in models/research and tensorflow/contrib.
I am very confused: which model is better? which model should…

tidy
- 4,747
- 9
- 49
- 89
1
vote
0 answers
Tensorflow Fairness Indicators for Multiclass output
According to the github page for tensorflow fairness-indicators :
Fairness Indicators enables easy computation of commonly-identified fairness metrics for binary and multiclass classifiers.
However, I'm unable to find any example using…

Saurabh Verma
- 6,328
- 12
- 52
- 84
1
vote
1 answer
TFX Tensorflow model validator component - You passed a data dictionary with keys ['image_raw_xf']. Expected the following keys: ['input_1']
I'm building a tfx pipeline based on the cifar10 example : [https://github.com/tensorflow/tfx/tree/master/tfx/examples/cifar10]
The difference is that I don't want to convert it to tf_lite model and instead use a regular keras based tensorflow…

Juan Acevedo
- 1,768
- 2
- 20
- 39
1
vote
0 answers
Unable to find pip package
I have been using bazel build for my im2txt model from TensorFlow and it shows me
ModuleNotFoundError: No module named 'nltk'
I have installed the package nltk and tried to even create an environment and run the bazel script
Is there anyway i need…
user11840960
1
vote
1 answer
Tensorflow Custom Object Detection Training Speed
I tried to train a frcnn for detecting money it has 3 classes.
I used this link
https://github.com/EdjeElectronics/TensorFlow-Object-Detection-API-Tutorial-Train-Multiple-Objects-Windows-10
to generate something.
And it uses…

trabz
- 7
- 2
0
votes
0 answers
Render_plot is failing
System information
I have used stock example script provided in TensorFlow Model Analysis: https://github.com/tensorflow/tfx/blob/master/docs/tutorials/model_analysis/tfma_basic.ipynb
OS Platform and Distribution (e.g., Linux Ubuntu 16.04): Windows…

sroy
- 1
0
votes
1 answer
TFX Pipeline Error While Executing TFMA: AttributeError: 'NoneType' object has no attribute 'ToBatchTensors'
Basically I only reused code from iris utils and iris pipeline with minor change on serving input:
def _get_serve_tf_examples_fn(model, tf_transform_output):
model.tft_layer = tf_transform_output.transform_features_layer()
feature_spec =…

suisen
- 53
- 9
0
votes
1 answer
Run TFMA for Keras models without compiling
I am training a Keras model using custom training loops in TensorFlow, where the weights are updated using gradient tape rather than the model.fit() method. As such, the model is not compiled before training.
After exporting the saved_model, I am…

andre
- 41
- 6