Commit Graph

7 Commits

Author SHA1 Message Date
Xiaolong Wang
e9d5863860 Allow Load operator to load into overriden names
Summary:
A new argument `blob_name_overrides` is added, which is to specify the
destination of loaded blob (in order to allow they have different names than
what are in the saved file/db).

This will be used for parameter initailization by pretrained model
in Dper 2. When loading a blob, we need to avoid name collision by assigning the
loaded blob with a new (temp) name.

Reviewed By: xianjiec

Differential Revision: D4952485

fbshipit-source-id: 4ce79bf40223314bb94981c22cbe537ae3f3d27c
2017-04-27 01:18:12 -07:00
Dmytro Dzhulgakov
43b6fcba7d Improve error message from LogFileDB on missing file
Summary: A lot of people get confused if the file can't be loaded.

Reviewed By: rpenggithub

Differential Revision: D4686572

fbshipit-source-id: 519ff68a3d4f04cf8ce893f255f7814e043383b6
2017-03-10 23:31:28 -08:00
Wael Abdelghani
9ef35f4a0b Add validation checks to load op
Summary: Added validation for load op when doing load_all by refactoring validation logic for loading specific blobs.

Reviewed By: kennyhorror

Differential Revision: D4641986

fbshipit-source-id: e0075a12188ca09d7628add72c143b40d5d9f382
2017-03-06 09:46:35 -08:00
Pooya Davoodi
aef75ca5dd Strip prefix of strip_prefix in blob names before save and load.
Summary:
- Replaces strip_regex implementation in SaveOp. It deletes the prefix of blob names upto a given substring.
- Adds the same functionality to LoadOp. Needed for loading checkpoints that are stored using the strip_prefix feature.
Closes https://github.com/caffe2/caffe2/pull/129

Differential Revision: D4512234

Pulled By: Yangqing

fbshipit-source-id: d926c1c5adcc7a711365cede11f21421bb7d4138
2017-03-04 15:46:47 -08:00
Artem Volkhin
0c03c8fca5 Add name_overrides argument to SaveOp
Summary:
In current implementation of SaveOp we always use names for blobs from the
current workspace. But there is a use case for replacing names in saved model:
for example, to use half-floats in prediction model but keep full-floats for
training model we might want to save a blob "w_fp16" as "w".

Differential Revision: D4567304

fbshipit-source-id: 87bc84fa6a45d8bfa33edb55ac1fb1cff542dbe3
2017-02-16 12:32:51 -08:00
Yangqing Jia
238ceab825 fbsync. TODO: check if build files need update. 2016-11-15 00:00:46 -08:00
Yangqing Jia
09bed67e4f add untracked files 2016-07-21 11:26:41 -07:00