Show / Hide Table of Contents

Class Lambda

Wraps arbitrary expression as a Layer object.

Inheritance
System.Object
Keras
Base
BaseLayer
Lambda
Implements
System.IDisposable
Inherited Members
BaseLayer.Set(BaseLayer[])
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.Layers
Assembly: Keras.dll
Syntax
public class Lambda : BaseLayer, IDisposable

Constructors

| Improve this Doc View Source

Lambda(Object, Shape, NDarray, Dictionary<String, Object>, Shape)

Initializes a new instance of the Lambda class.

Declaration
public Lambda(object function, Shape output_shape = null, NDarray mask = null, Dictionary<string, object> arguments = null, Shape input_shape = null)
Parameters
Type Name Description
System.Object function

The function to be evaluated. Takes input tensor or list of tensors as first argument.

Shape output_shape

Expected output shape from function. Only relevant when using Theano. Can be a tuple or function. If a tuple, it only specifies the first dimension onward; sample dimension is assumed either the same as the input: output_shape = (input_shape[0], ) + output_shape or, the input is None and the sample dimension is also None: output_shape = (None, ) + output_shape If a function, it specifies the entire shape as a function of the input shape: output_shape = f(input_shape)

Numpy.NDarray mask

Either None (indicating no masking) or a Tensor indicating the input mask for Embedding.

System.Collections.Generic.Dictionary<System.String, System.Object> arguments

optional dictionary of keyword arguments to be passed to the function.

Shape input_shape

Arbitrary. Use the keyword argument input_shape (tuple of integers, does not include the samples axis) when using this layer as the first layer in a model.

Implements

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