Show / Hide Table of Contents

Class Backend

Keras is a model-level library, providing high-level building blocks for developing deep learning models. It does not handle low-level operations such as tensor products, convolutions and so on itself. Instead, it relies on a specialized, well optimized tensor manipulation library to do so, serving as the "backend engine" of Keras. Rather than picking one single tensor library and making the implementation of Keras tied to that library, Keras handles the problem in a modular way, and several different backend engines can be plugged seamlessly into Keras.

Inheritance
System.Object
Keras
Base
Backend
Implements
System.IDisposable
Inherited Members
Base.Parameters
Base.None
Base.Init()
Base.ToPython()
Base.InvokeStaticMethod(Object, String, Dictionary<String, Object>)
Base.InvokeMethod(String, Dictionary<String, Object>)
Base.Item[String]
Keras.Instance
Keras.keras
Keras.keras2onnx
Keras.tfjs
Keras.Dispose()
Keras.ToTuple(Array)
Keras.ToList(Array)
System.Object.Equals(System.Object)
System.Object.Equals(System.Object, System.Object)
System.Object.GetHashCode()
System.Object.GetType()
System.Object.MemberwiseClone()
System.Object.ReferenceEquals(System.Object, System.Object)
System.Object.ToString()
Namespace: Keras
Assembly: Keras.dll
Syntax
public class Backend : Base, IDisposable

Methods

| Improve this Doc View Source

CastToFloatX(NDarray)

Cast a Numpy array to the default Keras float type.

Declaration
public NDarray CastToFloatX(NDarray x)
Parameters
Type Name Description
Numpy.NDarray x

The x, Numpy array..

Returns
Type Description
Numpy.NDarray

The same Numpy array, cast to its new type.

| Improve this Doc View Source

ClearSession()

Destroys the current TF graph and creates a new one.Useful to avoid clutter from old models / layers.

Declaration
public static void ClearSession()
| Improve this Doc View Source

Epsilon()

Returns the value of the fuzz factor used in numeric expressions.

Declaration
public static float Epsilon()
Returns
Type Description
System.Single
| Improve this Doc View Source

FloatX()

Returns the default float type, as a string. (e.g. 'float16', 'float32', 'float64').

Declaration
public string FloatX()
Returns
Type Description
System.String

String, the current default float type.

| Improve this Doc View Source

GetBackend()

Publicly accessible method for determining the current backend.

Declaration
public static string GetBackend()
Returns
Type Description
System.String

String, the name of the backend Keras is currently using.

| Improve this Doc View Source

GetUid(String)

Get the uid for the default graph.

Declaration
public static string GetUid(string prefix = "")
Parameters
Type Name Description
System.String prefix

An optional prefix of the graph.

Returns
Type Description
System.String

A unique identifier for the graph.

| Improve this Doc View Source

ImageDataFormat()

Returns the default image data format convention.

Declaration
public static string ImageDataFormat()
Returns
Type Description
System.String

A string, either 'channels_first' or 'channels_last'

| Improve this Doc View Source

IsSparse(NDarray)

Determines whether the specified tensor is sparse.

Declaration
public static bool IsSparse(NDarray tensor)
Parameters
Type Name Description
Numpy.NDarray tensor

The tensor.

Returns
Type Description
System.Boolean

true if the specified tensor is sparse; otherwise, false.

| Improve this Doc View Source

ResetUids()

Resets graph identifiers.

Declaration
public static void ResetUids()
| Improve this Doc View Source

SetEpsilon(Single)

Sets the value of the fuzz factor used in numeric expressions.

Declaration
public void SetEpsilon(float e)
Parameters
Type Name Description
System.Single e

float. New value of epsilon.

| Improve this Doc View Source

SetFloatX(String)

Sets the default float type.

Declaration
public void SetFloatX(string floatx)
Parameters
Type Name Description
System.String floatx

String, 'float16', 'float32', or 'float64'.

| Improve this Doc View Source

SetImageDataFormat(String)

Sets the image data format.

Declaration
public static void SetImageDataFormat(string data_format)
Parameters
Type Name Description
System.String data_format

data_format: string. 'channels_first' or 'channels_last'.

| Improve this Doc View Source

ToDense(NDarray)

Converts a sparse tensor into a dense tensor and returns it.

Declaration
public static NDarray ToDense(NDarray tensor)
Parameters
Type Name Description
Numpy.NDarray tensor

The tensor potentially sparse.

Returns
Type Description
Numpy.NDarray

A dense tensor.

Implements

System.IDisposable
  • Improve this Doc
  • View Source
Back to top Generated by DocFX