Cerebras Basics
Getting Started
Reference Samples
General
Scripts and Templates
csrun_cpu
csrun_wse
cs_input_analyzer
Develop with TensorFlow
Develop with PyTorch
Compiler Reports
Extensions
Bases: modelzoo.common.layers.tf.BaseLayer.BaseLayer
modelzoo.common.layers.tf.BaseLayer.BaseLayer
Dense layer that takes in a kernel as a shared weight. Can also optionally add a bias.
Apply the densely-connected layer.
inputs (Tensor) – An N-D tensor with the shape: (batch_size, ..., input_dim).
(batch_size, ..., input_dim)
kernel (Tensor) – A 2-D tensor with the shape: (units, input_dim). The dense kernel.
(units, input_dim)
transpose_kernel (bool) – Whether to transpose the kernel when performing tf.matmul(inputs, kernel).
tf.matmul(inputs, kernel)
An N-D tensor with shape: (batch_size, ..., units).
(batch_size, ..., units)
Tensor
previous
tf.SegmentEmbeddingLayer module
next
tf.SoftmaxLayer module