reid from https://github.com/michuanhaohao/reid-strong-baseline
zhangmeng
2020-01-17 f7c4a3cfd07adede3308f8d9d3d7315427d90a7c
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
#pragma once
#include <torch/csrc/WindowsTorchApiMacro.h>
#include <torch/csrc/jit/script/compilation_unit.h>
#include <functional>
#include <memory>
 
namespace torch {
namespace jit {
namespace script {
struct Module;
}
 
using ModuleHook = std::function<void(script::Module module)>;
using FunctionHook = std::function<void(StrongFunctionPtr function)>;
 
TORCH_API void didFinishEmitModule(script::Module module);
TORCH_API void didFinishEmitFunction(StrongFunctionPtr defined);
TORCH_API void setEmitHooks(ModuleHook for_module, FunctionHook for_fn);
 
TORCH_API std::pair<ModuleHook, FunctionHook> getEmitHooks();
 
} // namespace jit
} // namespace torch