LBANN  0.103.0
LivermoreBigArtificialNeuralNetworkToolkit
binary_with_constant.hpp File Reference
#include "lbann_config.hpp"
#include "lbann/operators/elementwise_operator.hpp"
#include "lbann/utils/cloneable.hpp"
#include "lbann/proto/operators.pb.h"
#include "lbann/operators/operator.hpp"
Include dependency graph for binary_with_constant.hpp:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Namespaces

 lbann
 

Macros

#define LBANN_DECLARE_BINARY_WITH_CONSTANT_OPERATOR(OP_NAME, OP_STRING, NEEDS_PREVACTS)
 

Functions

 lbann::LBANN_DECLARE_BINARY_WITH_CONSTANT_OPERATOR (AddConstant, "add constant", false)
 
 lbann::LBANN_DECLARE_BINARY_WITH_CONSTANT_OPERATOR (Scale, "scale", false)
 
 lbann::LBANN_DECLARE_BINARY_WITH_CONSTANT_OPERATOR (SubtractConstant, "subtract constant", false)
 
 lbann::LBANN_DECLARE_BINARY_WITH_CONSTANT_OPERATOR (ConstantSubtract, "subtract from constant", false)
 
 lbann::LBANN_DECLARE_BINARY_WITH_CONSTANT_OPERATOR (MaxConstant, "max constant", true)
 
 lbann::LBANN_DECLARE_BINARY_WITH_CONSTANT_OPERATOR (MinConstant, "min constant", true)
 
 lbann::LBANN_DECLARE_BINARY_WITH_CONSTANT_OPERATOR (EqualConstant, "equals constant", false)
 
 lbann::LBANN_DECLARE_BINARY_WITH_CONSTANT_OPERATOR (NotEqualConstant, "not equals constant", false)
 
 lbann::LBANN_DECLARE_BINARY_WITH_CONSTANT_OPERATOR (LessEqualConstant, "less-equals constant", false)
 
 lbann::LBANN_DECLARE_BINARY_WITH_CONSTANT_OPERATOR (LessConstant, "less than constant", false)
 
 lbann::LBANN_DECLARE_BINARY_WITH_CONSTANT_OPERATOR (GreaterEqualConstant, "greater-equals constant", false)
 
 lbann::LBANN_DECLARE_BINARY_WITH_CONSTANT_OPERATOR (GreaterConstant, "greater than constant", false)
 

Detailed Description

These operators are idiomatic replacements for patterns like:

Op(layer, ConstantLayer(1))

where it's a pessimization to actually allocate a persistent array for such an ephemeral operation.

Definition in file binary_with_constant.hpp.

Macro Definition Documentation

◆ LBANN_DECLARE_BINARY_WITH_CONSTANT_OPERATOR

#define LBANN_DECLARE_BINARY_WITH_CONSTANT_OPERATOR (   OP_NAME,
  OP_STRING,
  NEEDS_PREVACTS 
)

Definition at line 55 of file binary_with_constant.hpp.