dotnet / dotnet/machinelearning

TensorFlowTransformer: Passing constant value to the model

Open
#2,413 0 comments 0 reactions 0 assignees View on GitHub
area-TensorFlow enhancement Priority:2
Dominant language
C#
Stars
9.4k
Forks
2k
Avg merge
2d 20h
Merged PRs (30d)
11

Description

There should be a way to pass constant values to the TensorFlow model because there are cases when model requires an input which is constant regardless of the input feature vector.

For example, the [Batch Normalization](https://www.tensorflow.org/api_docs/python/tf/layers/batch_normalization) in TensorFlow requires a paramter called `training` which is set to `True` during training and `False` during inference. This variable is often set through as a `Placeholder` variable which is taken as input at runtime.

When using such a model for inference in `TensorFlowTransformer`, we need to always pass `False` for this variable or always set it to `True` when training.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.