Commit 17cb3554 authored by Yuxin Wu's avatar Yuxin Wu

update docs

parent e83b0797
...@@ -51,13 +51,16 @@ is in fact a small helper which uses some heuristics to return you one of ...@@ -51,13 +51,16 @@ is in fact a small helper which uses some heuristics to return you one of
[DictRestore](../modules/tfutils.html#tensorpack.tfutils.sessinit.DictRestore). [DictRestore](../modules/tfutils.html#tensorpack.tfutils.sessinit.DictRestore).
They are responsible for the actual initialization work. They are responsible for the actual initialization work.
Whatever you use in `session_init`, this is what happens during the loading: Whatever you use in `session_init`, this is what happens during the initialization:
* Variable restoring is completely based on __exact name match__ between * Variable restoring is completely based on __exact name match__ between
variables in the current graph and variables in the `session_init` initializer. variables in the current graph and variables in the `session_init` initializer.
* Variables that appear in only one side will be printed as warning. * Variables that appear in only one side will be printed as warning.
* Variables of the same name but incompatible shapes will cause exceptions. * Variables of the same name but incompatible shapes will cause exceptions.
If you set `ignore_mismatch=True`, then such errors will only be printed as warnings. If you set `ignore_mismatch=True`, then such errors will only be printed as warnings.
You can also use `SmartInit` to load a model to a session manually,
without involving the rest of the tensorpack, by `SmartInit(...).init(session)`.
## Transfer Learning ## Transfer Learning
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment