FirebaseModelInputs.Builder

public static class FirebaseModelInputs.Builder extends Object

Builder class of FirebaseModelInputs.

Public Constructor Summary

FirebaseModelInputs.Builder()
Creates a new builder to build FirebaseModelInputs.

Public Method Summary

FirebaseModelInputs.Builder
add(Object input)
Adds an input for custom model inference.
FirebaseModelInputs
build()
Builds a FirebaseModelInputs.

Inherited Method Summary

Object
clone()
boolean
equals(Object arg0)
void
finalize()
final Class<?>
getClass()
int
hashCode()
final void
notify()
final void
notifyAll()
String
toString()
final void
wait(long arg0, int arg1)
final void
wait(long arg0)
final void
wait()

Public Constructors

public FirebaseModelInputs.Builder ()

Creates a new builder to build FirebaseModelInputs.

Public Methods

public FirebaseModelInputs.Builder add (Object input)

Adds an input for custom model inference.

Inputs must be added in the same order as inputs of the corresponding model. It accepts array, multidimensional array or a direct ByteBuffer as inputs of primitive types including int, float, long, and byte.

ByteBuffer is the preferred way to pass large input data. When ByteBuffer is used, its content should remain unchanged until model inference is done. Its type and dimensions must match the corresponding configurations provided by FirebaseModelInputOutputOptions.

Array and multidimensional array are also supported formats for input. However, these formats have performance impact especially when the data size is large. Please use it mainly for debugging or latency non-sensitive use cases.

Parameters
input an array, multidimensional array, or a direct ByteBuffer of primitive types including int, float, long, and byte.
Returns
  • a builder to build the FirebaseModelInputs.
Throws
NullPointerException if the input object is null.
IllegalArgumentException if the input object is not a ByteBuffer, an array or a multidimensional array.
FirebaseMLException if the input is not a direct ByteBuffer or is not in nativeOrder(). See also Direct VS non-direct buffers.

public FirebaseModelInputs build ()

Builds a FirebaseModelInputs.

Acintyo uses Firebase to streamline and speed up app development by 25%

Updated Oct 3, 2024

Firebase Authentication lets you add an end-to-end identity solution to your app for easy user authentication, sign-in, and onboarding in just a few lines of code.

Updated Feb 21, 2025

Firebase gives you the tools and infrastructure you need to build better mobile and web apps, improve app quality, and grow your business.

Updated Feb 6, 2024