Open rnett opened 3 years ago
Some operations are implemented purely in python, as collections of other ops. In some cases we've built them out in Java, in other cases we've not got around to it yet. You're welcome to make a PR to add them, there are other examples in the tensorflow-core-api module.
Will do. A few questions:
SigmoidCrossEntropyWithLogits
that don't necessarily implement Op
and Operand
but have @Operator
and a @Endpoint
method? Op
and Operand
preferred when possible (i.e. Zeroes)?C-side operations should all be auto-generated. It is still possible that some are missing because they are marked as HIDDEN
in the base API def. When we identify such op, we override its visibility to VISIBLE
in our API def and let the op generator taking care of it.
Now normally all ops should implement Op
(if some are not, then they should be fixed) while Operand
can only be implemented if your custom op generates a single output.
If so, yes it is recommended that you implement it as well since it allows you to pass directly an instance of your op as an operand to another. Otherwise, the user needs to pick up manually which output of the operation should be pass as the operand.
I've noticed that a few ops present in the python docs are missing for reasons I can't determine. Specifically
reduce_mean
,reduce_std
, andreduce_variance
.reduce_mean
seems like it is just missing the reduce wrapper (it's present inmath.mean
) but I can't find methods for standard deviation or variance at all. I thought it might be related to #117 so I went looking through the api def protos, and there aren't any standard deviation or variance protos, but there aren't any reduce op protos either so I'm not sure what's up. Regardless of whether this is #117 or not, variance at least would be nice to have.