mxnet
|
Data structures that can appear in operator attributes. More...
#include <vector>
#include <string>
#include <utility>
#include <functional>
#include <unordered_map>
#include "base.h"
#include "node.h"
#include "tuple.h"
#include "layout.h"
Go to the source code of this file.
Namespaces | |
nnvm | |
Typedefs | |
using | nnvm::FListInputNames = std::function< std::vector< std::string >(const NodeAttrs &attrs)> |
Return list of input arguments names of each operator. More... | |
using | nnvm::FNumVisibleOutputs = std::function< uint32_t(const NodeAttrs &attrs)> |
Return number of visible outputs by the user. More... | |
using | nnvm::FListOutputNames = std::function< std::vector< std::string >(const NodeAttrs &attrs)> |
Return list of output arguments names of each operator. More... | |
using | nnvm::FMutateInputs = std::function< std::vector< uint32_t >(const NodeAttrs &attrs)> |
Check whether operator will mutate k-th input. More... | |
template<typename AttrType > | |
using | nnvm::FInferNodeEntryAttr = std::function< bool(const NodeAttrs &attrs, std::vector< AttrType > *in_attrs, std::vector< AttrType > *out_attrs)> |
Inference function of certain type. More... | |
using | nnvm::FGetAttrDict = std::function< std::unordered_map< std::string, std::string >(const NodeAttrs &attrs)> |
Get attribute dictionary from node. More... | |
using | nnvm::FInferShape = FInferNodeEntryAttr< TShape > |
Shape inference function. Update the shapes given the input shape information. TShape.ndim() == 0 means the shape is still unknown. More... | |
using | nnvm::FInferType = FInferNodeEntryAttr< int > |
Type inference function. Update the type given the known type information. More... | |
using | nnvm::TIsBackward = bool |
Whether this op is an explicit backward operator, If TIsBackward is true: More... | |
using | nnvm::TIsGhost = bool |
Whether this op is a ghost node. If TIsGhost is true: More... | |
using | nnvm::FInplaceOption = std::function< std::vector< std::pair< int, int > >(const NodeAttrs &attrs)> |
Get possible inplace options. This function enables optimization to reuse memory of inputs in output. More... | |
using | nnvm::FInplaceIdentity = std::function< std::vector< bool >(const NodeAttrs &attrs)> |
Get if the inplace option is an identity This function enables inplace optimization even when input reference count is greater than one. More... | |
using | nnvm::FIgnoreInputs = std::function< std::vector< uint32_t >(const NodeAttrs &attrs)> |
Get list of inputs in the op whose content are actually not used by the operator These are dummy input that can be used for example in zeros_like, ones_like. More... | |
using | nnvm::FGradient = std::function< std::vector< NodeEntry >(const ObjectPtr &nodeptr, const std::vector< NodeEntry > &out_grads)> |
Get the gradient node of the op node This function generates the backward graph of the node. More... | |
using | nnvm::FSetInputVarAttrOnCompose = std::function< void(const NodeAttrs &attrs, ObjectPtr var, const int index)> |
Set the attributes of input variable. Usually used for setting initialization or weight decay. More... | |
using | nnvm::FCorrectLayout = std::function< bool(const NodeAttrs &attrs, std::vector< Layout > *ilayouts, const std::vector< Layout > *last_ilayouts, std::vector< Layout > *olayouts)> |
Infer & correct function of node layout. See Layout for layout convention. More... | |
using | nnvm::FInputGraph = std::function< std::vector< uint32_t >(const NodeAttrs &attrs)> |
Get a list of inputs that represent graphs instead of data. Normally, input symbols are considered as data to the operator. However, control flow operators and high-order functions need to interpret symbols as graphs. More... | |
Data structures that can appear in operator attributes.