1 #include "caffe2/core/logging.h" 2 #include "caffe2/opt/converter.h" 3 #include "caffe2/opt/passes.h" 16 for (
const auto& node : nn->dataFlow.getMutableNodes()) {
17 NOM_REQUIRE_OR_CONT(nn::is<repr::NeuralNetOperator>(node));
20 for (
const auto& output : nn::getOutputs(node)) {
21 if (nn::hasConsumer(output) || nn->outputs.count(output)) {
27 NOM_REQUIRE_OR_CONT(!isUsed);
30 for (
const auto& output : nn::getOutputs(node)) {
40 REGISTER_OPT_PASS_FROM_FUNC(DeadCodeElim, deadCodeElim);
A global dictionary that holds information about what Caffe2 modules have been loaded in the current ...
void deleteNode(NodeRef n)
Deletes a node from the graph.