public class ExternalErrorsFunction extends DynamicCustomOp
DynamicCustomOp.DynamicCustomOpsBuilder
Modifier and Type | Field and Description |
---|---|
static String |
OP_NAME |
axis, bArguments, dArguments, iArguments, inplaceCall, inputArguments, outputArguments, outputVariables, tArguments
dimensions, extraArgs, inPlace, sameDiff, scalarValue
Constructor and Description |
---|
ExternalErrorsFunction() |
ExternalErrorsFunction(SameDiff sd,
List<SDVariable> inputs,
Map<String,INDArray> gradients) |
Modifier and Type | Method and Description |
---|---|
List<LongShapeDescriptor> |
calculateOutputShape()
Calculate the output shape for this op
|
List<LongShapeDescriptor> |
calculateOutputShape(OpContext oc)
Calculate the output shape for this op
|
List<SDVariable> |
doDiff(List<SDVariable> f1)
The actual implementation for automatic differentiation.
|
String |
getGradPlaceholderName() |
void |
initFromOnnx(Onnx.NodeProto node,
SameDiff initWith,
Map<String,Onnx.AttributeProto> attributesForNode,
Onnx.GraphProto graph)
Iniitialize the function from the given
Onnx.NodeProto |
void |
initFromTensorFlow(NodeDef nodeDef,
SameDiff initWith,
Map<String,AttrValue> attributesForNode,
GraphDef graph)
Initialize the function from the given
NodeDef |
String |
onnxName()
The opName of this function in onnx
|
String |
opName()
This method returns op opName as string
|
Op.Type |
opType()
The type of the op
|
SDVariable[] |
outputVariables(String baseName)
Return the output functions for this differential function.
|
String |
tensorflowName()
The opName of this function tensorflow
|
String |
toString() |
void |
updateBeforeExecution() |
addBArgument, addDArgument, addIArgument, addIArgument, addInputArgument, addOutputArgument, addTArgument, assertValidForExecution, bArgs, builder, clearArrays, dArgs, getBArgument, getDescriptor, getIArgument, getInputArgument, getOutputArgument, getTArgument, iArgs, inputArguments, numBArguments, numDArguments, numIArguments, numInputArguments, numOutputArguments, numTArguments, opHash, opNum, outputArguments, outputVariables, removeIArgument, removeInputArgument, removeOutputArgument, removeTArgument, setInputArgument, setInputArguments, setOutputArgument, tArgs, wrapFilterNull, wrapOrNull, wrapOrNull
arg, arg, argNames, args, attributeAdaptersForFunction, calculateOutputDataTypes, configFieldName, diff, dup, equals, getNumOutputs, getValue, hashCode, isConfigProperties, larg, mappingsForFunction, onnxNames, outputs, outputVariable, outputVariablesNames, propertiesForFunction, rarg, replaceArg, setInstanceId, setPropertiesForFunction, setValueFor, tensorflowNames
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
isInplaceCall
public static final String OP_NAME
public ExternalErrorsFunction(SameDiff sd, List<SDVariable> inputs, Map<String,INDArray> gradients)
public ExternalErrorsFunction()
public String getGradPlaceholderName()
public SDVariable[] outputVariables(String baseName)
DifferentialFunction
outputVariables
in class DynamicCustomOp
public List<SDVariable> doDiff(List<SDVariable> f1)
DifferentialFunction
doDiff
in class DynamicCustomOp
public void updateBeforeExecution()
public void initFromTensorFlow(NodeDef nodeDef, SameDiff initWith, Map<String,AttrValue> attributesForNode, GraphDef graph)
DifferentialFunction
NodeDef
initFromTensorFlow
in class DynamicCustomOp
public void initFromOnnx(Onnx.NodeProto node, SameDiff initWith, Map<String,Onnx.AttributeProto> attributesForNode, Onnx.GraphProto graph)
DifferentialFunction
Onnx.NodeProto
initFromOnnx
in class DynamicCustomOp
public String onnxName()
DifferentialFunction
onnxName
in class DynamicCustomOp
public String tensorflowName()
DifferentialFunction
tensorflowName
in class DynamicCustomOp
public String opName()
DynamicCustomOp
opName
in interface CustomOp
opName
in class DynamicCustomOp
public String toString()
toString
in class DynamicCustomOp
public List<LongShapeDescriptor> calculateOutputShape()
DifferentialFunction
calculateOutputShape
in interface CustomOp
calculateOutputShape
in class DynamicCustomOp
public List<LongShapeDescriptor> calculateOutputShape(OpContext oc)
CustomOp
calculateOutputShape
in interface CustomOp
calculateOutputShape
in class DynamicCustomOp
public Op.Type opType()
DifferentialFunction
opType
in class DynamicCustomOp
Copyright © 2020. All rights reserved.