38 BOOST_ASSERT(inferredShapes.size() == 1);
40 ConditionalThrowIfNotEqual<LayerValidationException>(
41 "SoftmaxLayer: TensorShape set on OutputSlot[0] does not match the inferred shape.",
const char * GetName() const override
std::vector< TensorShape > InferOutputShapes(const std::vector< TensorShape > &inputShapes) const override
virtual const TensorInfo & GetTensorInfo() const =0
This layer represents a softmax operation.
virtual std::unique_ptr< IWorkload > CreateWorkload(const IWorkloadFactory &factory) const override
void Accept(ILayerVisitor &visitor) const override
virtual std::unique_ptr< IWorkload > CreateSoftmax(const SoftmaxQueueDescriptor &descriptor, const WorkloadInfo &info) const
void Softmax(Decoder< float > &in, Encoder< float > &out, const TensorInfo &inputTensorInfo, float beta, int axis)
Computes the softmax function on some inputs, into outputs, with a shape given by tensorInfo...
SoftmaxLayer * Clone(Graph &graph) const override
const SoftmaxDescriptor & GetParameters() const
SoftmaxDescriptor m_Param
The parameters for the layer (not including tensor-valued weights etc.).
void VerifyLayerConnections(unsigned int expectedConnections, const CheckLocation &location) const
WorkloadInfo PrepInfoAndDesc(QueueDescriptor &descriptor) const
Helper function to reduce duplication in *LayerCreateWorkload.
virtual void VisitSoftmaxLayer(const IConnectableLayer *layer, const SoftmaxDescriptor &softmaxDescriptor, const char *name=nullptr)=0
A SoftmaxDescriptor for the SoftmaxLayer.
SoftmaxLayer(const SoftmaxDescriptor ¶m, const char *name)
const TensorShape & GetShape() const
const TensorInfo & GetTensorInfo() const override
const OutputSlot & GetOutputSlot(unsigned int index=0) const override
void ValidateTensorShapesFromInputs() override
const InputSlot & GetInputSlot(unsigned int index) const override