#include "mir/ops/ConstantOp.h"
#include "mir/ops/Conv2DOp.h"
#include "mir/ops/DepthwiseConv2DOp.h"
-#include "mir/ops/DropoutOp.h"
#include "mir/ops/FullyConnectedOp.h"
#include "mir/ops/InputOp.h"
#include "mir/ops/MulOp.h"
std::vector<mir::Operation::Output *>
Caffe2OpCreator::convertDropout(const std::vector<mir::Operation::Output *> &inputs,
- const ::caffe2::OperatorDef &op)
+ const ::caffe2::OperatorDef &)
{
- int is_test = getSingleArgument(op, "is_test", 0);
- if (is_test)
- return {inputs[0]};
-
- float dropout_ratio = getSingleArgument(op, "ratio", 0.5f);
- auto dropout = createOp<ops::DropoutOp>("Dropout", inputs[0], dropout_ratio);
- return {dropout->getOutput(0)};
+ // This is a no-op in inference mode.
+ return {inputs[0]};
}
std::vector<mir::Operation::Output *>