bp::class_<PyNet, shared_ptr<PyNet> >(
"Net", bp::init<string, string>())
.def(bp::init<string>())
+ .def("copy_from", &PyNet::CopyTrainedLayersFrom)
.def("_forward", &PyNet::Forward)
.def("_backward", &PyNet::Backward)
.def("reshape", &PyNet::Reshape)
inline void check_contiguous_array(PyArrayObject* arr, string name,
int channels, int height, int width);
+ void CopyTrainedLayersFrom(const string filename) {
+ net_->CopyTrainedLayersFrom(filename);
+ }
void Forward(int start, int end) { net_->ForwardFromTo(start, end); }
void Backward(int start, int end) { net_->BackwardFromTo(start, end); }
void Reshape() { net_->Reshape(); }