net.cc 530 字节
Newer Older
S
Superjom 已提交
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23
#include "paddle/framework/net.h"

namespace paddle {
namespace framework {

PlainNet::PlainNet(const NetDesc& def) {}

virtual Error PlainNet::InferShape() {
  for (auto& op : ops_) {
    // wrong shape
    auto err = op.InferShape();
    if (!err) return err;
  }
  // ok
  return Error();
}

virtual Error PlainNet::Run(Scope* scope = nullptr,
                            OpContext* context = nullptr, OpIndex begin = -1,
                            OpIndex end = -1) const {}

}  // namespace framework
}  // namespace paddle