Decide if a node is in backward pass by checking if its name is led by "gradients". TODO(jmchen): Make this check more robust as it is not guaranteed that the forward node will not be named with a leading "gradients".
| 69 | // TODO(jmchen): Make this check more robust as it is not guaranteed that the |
| 70 | // forward node will not be named with a leading "gradients". |
| 71 | inline bool IsGradientNode(const Graph* graph, const Node* node) { |
| 72 | static const string tag = "gradients"; |
| 73 | return (node->name().compare(0, tag.size(), tag) == 0); |
| 74 | } |
| 75 | |
| 76 | // Find the type of the input to set the parameters for the |
| 77 | // quantize_and_dequantize op. |
no test coverage detected