Changing Optimizer results in “Not found in checkpoint” errors

爱⌒轻易说出口 提交于 2020-01-06 06:11:11

问题


I've trained a MobilenetV1 model using rmsprop optimizer for certain number of steps. And now I would like to switch the optimizer from rmsprop to adam and resume the training from here on. But when it's loading the trained model I get the following errors when I change the optimizer from rmsprop to adam. I'm using TF-slim for training the model.

2017-11-08 12:02:55.104019: W tensorflow/core/framework/op_kernel.cc:1192] Not found: Key MobilenetV1/Conv2d_0/weights/Adam_1 not found in checkpoint 2017-11-08 12:02:55.573251: W tensorflow/core/framework/op_kernel.cc:1192] Not found: Key MobilenetV1/Conv2d_0/weights/Adam not found in checkpoint 2017-11-08 12:02:55.574865: W tensorflow/core/framework/op_kernel.cc:1192] Not found: Key MobilenetV1/Conv2d_0/BatchNorm/beta/Adam_1 not found in checkpoint 2017-11-08 12:02:56.043749: W tensorflow/core/framework/op_kernel.cc:1192] Not found: Key MobilenetV1/Conv2d_10_depthwise/BatchNorm/beta/Adam_1 not found in checkpoint 2017-11-08 12:02:56.045234: W tensorflow/core/framework/op_kernel.cc:1192] Not found: Key MobilenetV1/Conv2d_11_depthwise/depthwise_weights/Adam not found in checkpoint 2017-11-08 12:02:56.046297: W tensorflow/core/framework/op_kernel.cc:1192] Not found: Key MobilenetV1/Conv2d_10_depthwise/depthwise_weights/Adam not found in checkpoint 2017-11-08 12:02:56.047492: W tensorflow/core/framework/op_kernel.cc:1192] Not found: Key MobilenetV1/Conv2d_0/BatchNorm/gamma/Adam not found in checkpoint 2017-11-08 12:02:56.048571: W tensorflow/core/framework/op_kernel.cc:1192] Not found: Key MobilenetV1/Conv2d_0/BatchNorm/beta/Adam not found in checkpoint 2017-11-08 12:02:56.050291: W tensorflow/core/framework/op_kernel.cc:1192] Not found: Key MobilenetV1/Conv2d_0/BatchNorm/gamma/Adam_1 not found in checkpoint 2017-11-08 12:02:56.050441: W tensorflow/core/framework/op_kernel.cc:1192] Not found: Key MobilenetV1/Conv2d_11_depthwise/BatchNorm/gamma/Adam not found in checkpoint 2017-11-08 12:02:56.050613: W tensorflow/core/framework/op_kernel.cc:1192] Not found: Key MobilenetV1/Conv2d_10_pointwise/BatchNorm/beta/Adam_1 not found in checkpoint 2017-11-08 12:02:56.052709: W tensorflow/core/framework/op_kernel.cc:1192] Not found: Key MobilenetV1/Conv2d_10_depthwise/BatchNorm/gamma/Adam_1 not found in checkpoint 2017-11-08 12:02:56.053678: W tensorflow/core/framework/op_kernel.cc:1192] Not found: Key MobilenetV1/Conv2d_10_depthwise/depthwise_weights/Adam_1 not found in checkpoint 2017-11-08 12:02:56.054344: W tensorflow/core/framework/op_kernel.cc:1192] Not found: Key MobilenetV1/Conv2d_11_pointwise/BatchNorm/beta/Adam_1 not found in checkpoint 2017-11-08 12:02:56.057392: W tensorflow/core/framework/op_kernel.cc:1192] Not found: Key MobilenetV1/Conv2d_11_depthwise/depthwise_weights/Adam_1 not found in checkpoint 2017-11-08 12:02:56.058328: W tensorflow/core/framework/op_kernel.cc:1192] Not found: Key MobilenetV1/Conv2d_11_depthwise/BatchNorm/beta/Adam_1 not found in checkpoint 2017-11-08 12:02:56.059245: W tensorflow/core/framework/op_kernel.cc:1192] Not found: Key beta2_power not found in checkpoint 2017-11-08 12:02:56.059316: W tensorflow/core/framework/op_kernel.cc:1192] Not found: Key MobilenetV1/Conv2d_11_pointwise/BatchNorm/gamma/Adam not found in checkpoint 2017-11-08 12:02:56.060721: W tensorflow/core/framework/op_kernel.cc:1192] Not found: Key MobilenetV1/Conv2d_11_depthwise/BatchNorm/beta/Adam not found in checkpoint 2017-11-08 12:02:56.060725: W tensorflow/core/framework/op_kernel.cc:1192] Not found: Key MobilenetV1/Conv2d_10_pointwise/BatchNorm/beta/Adam not found in checkpoint 2017-11-08 12:02:56.060772: W tensorflow/core/framework/op_kernel.cc:1192] Not found: Key MobilenetV1/Conv2d_11_pointwise/BatchNorm/beta/Adam not found in checkpoint 2017-11-08 12:02:56.061939: W tensorflow/core/framework/op_kernel.cc:1192] Not found: Key MobilenetV1/Conv2d_11_depthwise/BatchNorm/gamma/Adam_1 not found in checkpoint 2017-11-08 12:02:56.063585: W tensorflow/core/framework/op_kernel.cc:1192] Not found: Key MobilenetV1/Conv2d_10_pointwise/weights/Adam_1 not found in checkpoint 2017-11-08 12:02:56.064453: W tensorflow/core/framework/op_kernel.cc:1192] Not found: Key MobilenetV1/Conv2d_10_depthwise/BatchNorm/beta/Adam not found in checkpoint 2017-11-08 12:02:56.064561: W tensorflow/core/framework/op_kernel.cc:1192] Not found: Key MobilenetV1/Conv2d_10_pointwise/BatchNorm/gamma/Adam not found in checkpoint 2017-11-08 12:02:56.065362: W tensorflow/core/framework/op_kernel.cc:1192] Not found: Key MobilenetV1/Conv2d_11_pointwise/weights/Adam not found in checkpoint 2017-11-08 12:02:56.065617: W tensorflow/core/framework/op_kernel.cc:1192] Not found: Key MobilenetV1/Conv2d_10_pointwise/BatchNorm/gamma/Adam_1 not found in checkpoint 2017-11-08 12:02:56.065991: W tensorflow/core/framework/op_kernel.cc:1192] Not found: Key MobilenetV1/Conv2d_10_depthwise/BatchNorm/gamma/Adam not found in checkpoint 2017-11-08 12:02:56.066388: W tensorflow/core/framework/op_kernel.cc:1192] Not found: Key MobilenetV1/Conv2d_11_pointwise/BatchNorm/gamma/Adam_1 not found in checkpoint 2017-11-08 12:02:56.066636: W tensorflow/core/framework/op_kernel.cc:1192] Not found: Key MobilenetV1/Conv2d_12_depthwise/BatchNorm/beta/Adam not found in checkpoint 2017-11-08 12:02:56.071692: W tensorflow/core/framework/op_kernel.cc:1192] Not found: Key MobilenetV1/Conv2d_11_pointwise/weights/Adam_1 not found in checkpoint 2017-11-08 12:02:56.074423: W tensorflow/core/framework/op_kernel.cc:1192] Not found: Key MobilenetV1/Conv2d_10_pointwise/weights/Adam not found in checkpoint 2017-11-08 12:02:56.074599: W tensorflow/core/framework/op_kernel.cc:1192] Not found: Key MobilenetV1/Conv2d_12_depthwise/BatchNorm/beta/Adam_1 not found in checkpoint 2017-11-08 12:02:56.093603: W tensorflow/core/framework/op_kernel.cc:1192] Not found: Key MobilenetV1/Conv2d_12_pointwise/BatchNorm/beta/Adam_1 not found in checkpoint 2017-11-08 12:02:56.101253: W tensorflow/core/framework/op_kernel.cc:1192] Not found: Key MobilenetV1/Conv2d_12_depthwise/depthwise_weights/Adam_1 not found in checkpoint 2017-11-08 12:02:56.101527: W tensorflow/core/framework/op_kernel.cc:1192] Not found: Key MobilenetV1/Conv2d_12_depthwise/BatchNorm/gamma/Adam not found in checkpoint 2017-11-08 12:02:56.102623: W tensorflow/core/framework/op_kernel.cc:1192] Not found: Key MobilenetV1/Conv2d_13_depthwise/BatchNorm/gamma/Adam not found in checkpoint 2017-11-08 12:02:56.102796: W tensorflow/core/framework/op_kernel.cc:1192] Not found: Key MobilenetV1/Conv2d_12_pointwise/BatchNorm/gamma/Adam not found in checkpoint 2017-11-08 12:02:56.104507: W tensorflow/core/framework/op_kernel.cc:1192] Not found: Key MobilenetV1/Conv2d_12_pointwise/BatchNorm/gamma/Adam_1 not found in checkpoint 2017-11-08 12:02:56.107026: W tensorflow/core/framework/op_kernel.cc:1192] Not found: Key MobilenetV1/Conv2d_13_depthwise/BatchNorm/beta/Adam_1 not found in checkpoint 2017-11-08 12:02:56.107094: W tensorflow/core/framework/op_kernel.cc:1192] Not found: Key MobilenetV1/Conv2d_12_pointwise/weights/Adam_1 not found in checkpoint 2017-11-08 12:02:56.109413: W tensorflow/core/framework/op_kernel.cc:1192] Not found: Key MobilenetV1/Conv2d_13_pointwise/BatchNorm/beta/Adam not found in checkpoint 2017-11-08 12:02:56.110115: W tensorflow/core/framework/op_kernel.cc:1192] Not found: Key MobilenetV1/Conv2d_12_depthwise/BatchNorm/gamma/Adam_1 not found in checkpoint 2017-11-08 12:02:56.110336: W tensorflow/core/framework/op_kernel.cc:1192] Not found: Key MobilenetV1/Conv2d_12_depthwise/depthwise_weights/Adam not found in checkpoint 2017-11-08 12:02:56.112213: W tensorflow/core/framework/op_kernel.cc:1192] Not found: Key MobilenetV1/Conv2d_13_pointwise/BatchNorm/gamma/Adam not found in checkpoint 2017-11-08 12:02:56.130614: W tensorflow/core/framework/op_kernel.cc:1192] Not found: Key MobilenetV1/Conv2d_13_depthwise/depthwise_weights/Adam_1 not found in checkpoint 2017-11-08 12:02:56.130897: W tensorflow/core/framework/op_kernel.cc:1192] Not found: Key MobilenetV1/Conv2d_12_pointwise/weights/Adam not found in checkpoint 2017-11-08 12:02:56.136210: W tensorflow/core/framework/op_kernel.cc:1192] Not found: Key MobilenetV1/Conv2d_1_depthwise/BatchNorm/beta/Adam not found in checkpoint 2017-11-08 12:02:56.142911: W tensorflow/core/framework/op_kernel.cc:1192] Not found: Key MobilenetV1/Conv2d_13_depthwise/BatchNorm/gamma/Adam_1 not found in checkpoint 2017-11-08 12:02:56.142979: W tensorflow/core/framework/op_kernel.cc:1192] Not found: Key MobilenetV1/Conv2d_1_depthwise/BatchNorm/gamma/Adam_1 not found in checkpoint 2017-11-08 12:02:56.143942: W tensorflow/core/framework/op_kernel.cc:1192] Not found: Key MobilenetV1/Conv2d_1_depthwise/BatchNorm/beta/Adam_1 not found in checkpoint 2017-11-08 12:02:56.145029: W tensorflow/core/framework/op_kernel.cc:1192] Not found: Key MobilenetV1/Conv2d_13_pointwise/BatchNorm/gamma/Adam_1 not found in checkpoint 2017-11-08 12:02:56.151465: W tensorflow/core/framework/op_kernel.cc:1192] Not found: Key MobilenetV1/Conv2d_1_pointwise/BatchNorm/beta/Adam not found in checkpoint 2017-11-08 12:02:56.155150: W tensorflow/core/framework/op_kernel.cc:1192] Not found: Key MobilenetV1/Conv2d_13_pointwise/BatchNorm/beta/Adam_1 not found in checkpoint 2017-11-08 12:02:56.158805: W tensorflow/core/framework/op_kernel.cc:1192] Not found: Key MobilenetV1/Conv2d_13_pointwise/weights/Adam not found in checkpoint 2017-11-08 12:02:56.160840: W tensorflow/core/framework/op_kernel.cc:1192] Not found: Key beta1_power not found in checkpoint 2017-11-08 12:02:56.161308: W tensorflow/core/framework/op_kernel.cc:1192] Not found: Key MobilenetV1/Conv2d_13_depthwise/depthwise_weights/Adam not found in checkpoint 2017-11-08 12:02:56.161923: W tensorflow/core/framework/op_kernel.cc:1192] Not found: Key MobilenetV1/Conv2d_12_pointwise/BatchNorm/beta/Adam not found in checkpoint 2017-11-08 12:02:56.162912: W tensorflow/core/framework/op_kernel.cc:1192] Not found: Key MobilenetV1/Conv2d_13_pointwise/weights/Adam_1 not found in checkpoint 2017-11-08 12:02:56.164919: W tensorflow/core/framework/op_kernel.cc:1192] Not found: Key MobilenetV1/Conv2d_1_pointwise/weights/Adam_1 not found in checkpoint 2017-11-08 12:02:56.165276: W tensorflow/core/framework/op_kernel.cc:1192] Not found: Key MobilenetV1/Conv2d_2_pointwise/BatchNorm/beta/Adam_1 not found in checkpoint 2017-11-08 12:02:56.166302: W tensorflow/core/framework/op_kernel.cc:1192] Not found: Key MobilenetV1/Conv2d_2_pointwise/BatchNorm/beta/Adam not found in checkpoint 2017-11-08 12:02:56.166327: W tensorflow/core/framework/op_kernel.cc:1192] Not found: Key MobilenetV1/Conv2d_13_depthwise/BatchNorm/beta/Adam not found in checkpoint 2017-11-08 12:02:56.168597: W tensorflow/core/framework/op_kernel.cc:1192] Not found: Key MobilenetV1/Conv2d_1_depthwise/depthwise_weights/Adam_1 not found in checkpoint 2017-11-08 12:02:56.168642: W tensorflow/core/framework/op_kernel.cc:1192] Not found: Key MobilenetV1/Conv2d_2_depthwise/BatchNorm/gamma/Adam_1 not found in checkpoint 2017-11-08 12:02:56.170778: W tensorflow/core/framework/op_kernel.cc:1192] Not found: Key MobilenetV1/Conv2d_1_pointwise/BatchNorm/gamma/Adam_1 not found in checkpoint 2017-11-08 12:02:56.171603: W tensorflow/core/framework/op_kernel.cc:1192] Not found: Key MobilenetV1/Conv2d_1_depthwise/BatchNorm/gamma/Adam not found in checkpoint 2017-11-08 12:02:56.171758: W tensorflow/core/framework/op_kernel.cc:1192] Not found: Key MobilenetV1/Conv2d_1_pointwise/BatchNorm/beta/Adam_1 not found in checkpoint 2017-11-08 12:02:56.171917: W tensorflow/core/framework/op_kernel.cc:1192] Not found: Key MobilenetV1/Conv2d_1_pointwise/BatchNorm/gamma/Adam not found in checkpoint 2017-11-08 12:02:56.172088: W tensorflow/core/framework/op_kernel.cc:1192] Not found: Key MobilenetV1/Conv2d_2_depthwise/BatchNorm/gamma/Adam not found in checkpoint 2017-11-08 12:02:56.173677: W tensorflow/core/framework/op_kernel.cc:1192] Not found: Key MobilenetV1/Conv2d_2_depthwise/depthwise_weights/Adam_1 not found in checkpoint 2017-11-08 12:02:56.176383: W tensorflow/core/framework/op_kernel.cc:1192] Not found: Key MobilenetV1/Conv2d_1_depthwise/depthwise_weights/Adam not found in checkpoint 2017-11-08 12:02:56.176482: W tensorflow/core/framework/op_kernel.cc:1192] Not found: Key MobilenetV1/Conv2d_1_pointwise/weights/Adam not found in checkpoint 2017-11-08 12:02:56.176577: W tensorflow/core/framework/op_kernel.cc:1192] Not found: Key MobilenetV1/Conv2d_2_depthwise/BatchNorm/beta/Adam_1 not found in checkpoint 2017-11-08 12:02:56.177585: W tensorflow/core/framework/op_kernel.cc:1192] Not found: Key MobilenetV1/Conv2d_2_depthwise/BatchNorm/beta/Adam not found in checkpoint 2017-11-08 12:02:56.180751: W tensorflow/core/framework/op_kernel.cc:1192] Not found: Key MobilenetV1/Conv2d_3_depthwise/BatchNorm/gamma/Adam not found in checkpoint 2017-11-08 12:02:56.183693: W tensorflow/core/framework/op_kernel.cc:1192] Not found: Key MobilenetV1/Conv2d_2_depthwise/depthwise_weights/Adam not found in checkpoint 2017-11-08 12:02:56.186271: W tensorflow/core/framework/op_kernel.cc:1192] Not found: Key MobilenetV1/Conv2d_2_pointwise/weights/Adam not found in checkpoint 2017-11-08 12:02:56.193268: W tensorflow/core/framework/op_kernel.cc:1192] Not found: Key MobilenetV1/Conv2d_3_depthwise/BatchNorm/gamma/Adam_1 not found in checkpoint 2017-11-08 12:02:56.193934: W tensorflow/core/framework/op_kernel.cc:1192] Not found: Key MobilenetV1/Conv2d_3_depthwise/BatchNorm/beta/Adam not found in checkpoint 2017-11-08 12:02:56.194045: W tensorflow/core/framework/op_kernel.cc:1192] Not found: Key MobilenetV1/Logits/Conv2d_1c_1x1/weights/Adam_1 not found in checkpoint 2017-11-08 12:02:56.195357: W tensorflow/core/framework/op_kernel.cc:1192] Not found: Key MobilenetV1/Conv2d_2_pointwise/BatchNorm/gamma/Adam_1 not found in checkpoint 2017-11-08 12:02:56.195555: W tensorflow/core/framework/op_kernel.cc:1192] Not found: Key MobilenetV1/Conv2d_3_pointwise/BatchNorm/beta/Adam not found in checkpoint 2017-11-08 12:02:56.197646: W tensorflow/core/framework/op_kernel.cc:1192] Not found: Key MobilenetV1/Conv2d_3_pointwise/weights/Adam not found in checkpoint 2017-11-08 12:02:56.197862: W tensorflow/core/framework/op_kernel.cc:1192] Not found: Key MobilenetV1/Conv2d_3_pointwise/BatchNorm/beta/Adam_1 not found in checkpoint 2017-11-08 12:02:56.197918: W tensorflow/core/framework/op_kernel.cc:1192] Not found: Key MobilenetV1/Conv2d_3_depthwise/depthwise_weights/Adam not found in checkpoint 2017-11-08 12:02:56.200354: W tensorflow/core/framework/op_kernel.cc:1192] Not found: Key MobilenetV1/Conv2d_3_depthwise/BatchNorm/beta/Adam_1 not found in checkpoint 2017-11-08 12:02:56.201840: W tensorflow/core/framework/op_kernel.cc:1192] Not found: Key MobilenetV1/Conv2d_3_pointwise/BatchNorm/gamma/Adam_1 not found in checkpoint 2017-11-08 12:02:56.202547: W tensorflow/core/framework/op_kernel.cc:1192] Not found: Key MobilenetV1/Conv2d_3_depthwise/depthwise_weights/Adam_1 not found in checkpoint 2017-11-08 12:02:56.205285: W tensorflow/core/framework/op_kernel.cc:1192] Not found: Key MobilenetV1/Conv2d_2_pointwise/BatchNorm/gamma/Adam not found in checkpoint 2017-11-08 12:02:56.207759: W tensorflow/core/framework/op_kernel.cc:1192] Not found: Key MobilenetV1/Conv2d_4_depthwise/BatchNorm/gamma/Adam_1 not found in checkpoint 2017-11-08 12:02:56.210149: W tensorflow/core/framework/op_kernel.cc:1192] Not found: Key MobilenetV1/Conv2d_2_pointwise/weights/Adam_1 not found in checkpoint 2017-11-08 12:02:56.211509: W tensorflow/core/framework/op_kernel.cc:1192] Not found: Key MobilenetV1/Conv2d_5_depthwise/BatchNorm/beta/Adam not found in checkpoint 2017-11-08 12:02:56.211621: W tensorflow/core/framework/op_kernel.cc:1192] Not found: Key MobilenetV1/Conv2d_4_depthwise/BatchNorm/beta/Adam_1 not found in checkpoint 2017-11-08 12:02:56.222947: W tensorflow/core/framework/op_kernel.cc:1192] Not found: Key MobilenetV1/Conv2d_5_depthwise/depthwise_weights/Adam not found in checkpoint 2017-11-08 12:02:56.223892: W tensorflow/core/framework/op_kernel.cc:1192] Not found: Key MobilenetV1/Conv2d_4_depthwise/BatchNorm/beta/Adam not found in checkpoint 2017-11-08 12:02:56.224229: W tensorflow/core/framework/op_kernel.cc:1192] Not found: Key MobilenetV1/Conv2d_3_pointwise/BatchNorm/gamma/Adam not found in checkpoint 2017-11-08 12:02:56.228634: W tensorflow/core/framework/op_kernel.cc:1192] Not found: Key MobilenetV1/Conv2d_5_depthwise/BatchNorm/gamma/Adam not found in checkpoint 2017-11-08 12:02:56.228725: W tensorflow/core/framework/op_kernel.cc:1192] Not found: Key MobilenetV1/Conv2d_4_depthwise/BatchNorm/gamma/Adam not found in checkpoint 2017-11-08 12:02:56.232910: W tensorflow/core/framework/op_kernel.cc:1192] Not found: Key MobilenetV1/Conv2d_4_pointwise/BatchNorm/beta/Adam_1 not found in checkpoint 2017-11-08 12:02:56.232946: W tensorflow/core/framework/op_kernel.cc:1192] Not found: Key MobilenetV1/Conv2d_4_depthwise/depthwise_weights/Adam not found in checkpoint 2017-11-08 12:02:56.233005: W tensorflow/core/framework/op_kernel.cc:1192] Not found: Key MobilenetV1/Conv2d_4_pointwise/weights/Adam_1 not found in checkpoint 2017-11-08 12:02:56.235281: W tensorflow/core/framework/op_kernel.cc:1192] Not found: Key MobilenetV1/Conv2d_3_pointwise/weights/Adam_1 not found in checkpoint 2017-11-08 12:02:56.237324: W tensorflow/core/framework/op_kernel.cc:1192] Not found: Key MobilenetV1/Conv2d_4_depthwise/depthwise_weights/Adam_1 not found in checkpoint 2017-11-08 12:02:56.237430: W tensorflow/core/framework/op_kernel.cc:1192] Not found: Key MobilenetV1/Conv2d_4_pointwise/BatchNorm/gamma/Adam not found in checkpoint 2017-11-08 12:02:56.240165: W tensorflow/core/framework/op_kernel.cc:1192] Not found: Key MobilenetV1/Conv2d_5_pointwise/weights/Adam not found in checkpoint 2017-11-08 12:02:56.240403: W tensorflow/core/framework/op_kernel.cc:1192] Not found: Key MobilenetV1/Conv2d_4_pointwise/BatchNorm/beta/Adam not found in checkpoint 2017-11-08 12:02:56.242228: W tensorflow/core/framework/op_kernel.cc:1192] Not found: Key MobilenetV1/Conv2d_5_pointwise/BatchNorm/gamma/Adam not found in checkpoint 2017-11-08 12:02:56.254885: W tensorflow/core/framework/op_kernel.cc:1192] Not found: Key MobilenetV1/Conv2d_4_pointwise/BatchNorm/gamma/Adam_1 not found in checkpoint 2017-11-08 12:02:56.255150: W tensorflow/core/framework/op_kernel.cc:1192] Not found: Key MobilenetV1/Conv2d_5_depthwise/BatchNorm/gamma/Adam_1 not found in checkpoint 2017-11-08 12:02:56.255345: W tensorflow/core/framework/op_kernel.cc:1192] Not found: Key MobilenetV1/Conv2d_5_pointwise/BatchNorm/gamma/Adam_1 not found in checkpoint 2017-11-08 12:02:56.255350: W tensorflow/core/framework/op_kernel.cc:1192] Not found: Key MobilenetV1/Conv2d_6_depthwise/depthwise_weights/Adam_1 not found in checkpoint 2017-11-08 12:02:56.258022: W tensorflow/core/framework/op_kernel.cc:1192] Not found: Key MobilenetV1/Conv2d_5_depthwise/BatchNorm/beta/Adam_1 not found in checkpoint 2017-11-08 12:02:56.258183: W tensorflow/core/framework/op_kernel.cc:1192] Not found: Key MobilenetV1/Conv2d_6_depthwise/BatchNorm/gamma/Adam not found in checkpoint 2017-11-08 12:02:56.258294: W tensorflow/core/framework/op_kernel.cc:1192] Not found: Key MobilenetV1/Conv2d_5_depthwise/depthwise_weights/Adam_1 not found in checkpoint 2017-11-08 12:02:56.259887: W tensorflow/core/framework/op_kernel.cc:1192] Not found: Key MobilenetV1/Conv2d_7_pointwise/BatchNorm/beta/Adam_1 not found in checkpoint 2017-11-08 12:02:56.259985: W tensorflow/core/framework/op_kernel.cc:1192] Not found: Key MobilenetV1/Conv2d_5_pointwise/BatchNorm/beta/Adam not found in checkpoint 2017-11-08 12:02:56.261735: W tensorflow/core/framework/op_kernel.cc:1192] Not found: Key MobilenetV1/Conv2d_4_pointwise/weights/Adam not found in checkpoint 2017-11-08 12:02:56.261787: W tensorflow/core/framework/op_kernel.cc:1192] Not found: Key MobilenetV1/Conv2d_6_depthwise/depthwise_weights/Adam not found in checkpoint 2017-11-08 12:02:56.263350: W tensorflow/core/framework/op_kernel.cc:1192] Not found: Key MobilenetV1/Conv2d_6_pointwise/BatchNorm/beta/Adam_1 not found in checkpoint 2017-11-08 12:02:56.263924: W tensorflow/core/framework/op_kernel.cc:1192] Not found: Key MobilenetV1/Conv2d_6_pointwise/BatchNorm/beta/Adam not found in checkpoint 2017-11-08 12:02:56.266010: W tensorflow/core/framework/op_kernel.cc:1192] Not found: Key MobilenetV1/Conv2d_6_pointwise/BatchNorm/gamma/Adam not found in checkpoint 2017-11-08 12:02:56.266205: W tensorflow/core/framework/op_kernel.cc:1192] Not found: Key MobilenetV1/Conv2d_7_depthwise/BatchNorm/gamma/Adam_1 not found in checkpoint 2017-11-08 12:02:56.266461: W tensorflow/core/framework/op_kernel.cc:1192] Not found: Key MobilenetV1/Logits/Conv2d_1c_1x1/weights/Adam not found in checkpoint 2017-11-08 12:02:56.266500: W tensorflow/core/framework/op_kernel.cc:1192] Not found: Key MobilenetV1/Conv2d_6_depthwise/BatchNorm/beta/Adam not found in checkpoint 2017-11-08 12:02:56.266656: W tensorflow/core/framework/op_kernel.cc:1192] Not found: Key MobilenetV1/Conv2d_6_depthwise/BatchNorm/gamma/Adam_1 not found in checkpoint 2017-11-08 12:02:56.266831: W tensorflow/core/framework/op_kernel.cc:1192] Not found: Key MobilenetV1/Conv2d_6_pointwise/BatchNorm/gamma/Adam_1 not found in checkpoint 2017-11-08 12:02:56.272471: W tensorflow/core/framework/op_kernel.cc:1192] Not found: Key MobilenetV1/Conv2d_6_depthwise/BatchNorm/beta/Adam_1 not found in checkpoint 2017-11-08 12:02:56.272585: W tensorflow/core/framework/op_kernel.cc:1192] Not found: Key MobilenetV1/Conv2d_5_pointwise/weights/Adam_1 not found in checkpoint 2017-11-08 12:02:56.272833: W tensorflow/core/framework/op_kernel.cc:1192] Not found: Key MobilenetV1/Conv2d_7_pointwise/BatchNorm/gamma/Adam not found in checkpoint 2017-11-08 12:02:56.273087: W tensorflow/core/framework/op_kernel.cc:1192] Not found: Key MobilenetV1/Conv2d_6_pointwise/weights/Adam not found in checkpoint 2017-11-08 12:02:56.276749: W tensorflow/core/framework/op_kernel.cc:1192] Not found: Key MobilenetV1/Conv2d_7_pointwise/BatchNorm/gamma/Adam_1 not found in checkpoint 2017-11-08 12:02:56.277123: W tensorflow/core/framework/op_kernel.cc:1192] Not found: Key MobilenetV1/Conv2d_7_depthwise/BatchNorm/beta/Adam not found in checkpoint 2017-11-08 12:02:56.277264: W tensorflow/core/framework/op_kernel.cc:1192] Not found: Key MobilenetV1/Conv2d_7_pointwise/BatchNorm/beta/Adam not found in checkpoint 2017-11-08 12:02:56.277311: W tensorflow/core/framework/op_kernel.cc:1192] Not found: Key MobilenetV1/Conv2d_8_pointwise/weights/Adam not found in checkpoint 2017-11-08 12:02:56.277774: W tensorflow/core/framework/op_kernel.cc:1192] Not found: Key MobilenetV1/Conv2d_5_pointwise/BatchNorm/beta/Adam_1 not found in checkpoint 2017-11-08 12:02:56.278007: W tensorflow/core/framework/op_kernel.cc:1192] Not found: Key MobilenetV1/Conv2d_7_pointwise/weights/Adam not found in checkpoint 2017-11-08 12:02:56.289477: W tensorflow/core/framework/op_kernel.cc:1192] Not found: Key MobilenetV1/Conv2d_7_depthwise/depthwise_weights/Adam not found in checkpoint 2017-11-08 12:02:56.289757: W tensorflow/core/framework/op_kernel.cc:1192] Not found: Key MobilenetV1/Conv2d_7_depthwise/depthwise_weights/Adam_1 not found in checkpoint 2017-11-08 12:02:56.289982: W tensorflow/core/framework/op_kernel.cc:1192] Not found: Key MobilenetV1/Conv2d_7_depthwise/BatchNorm/beta/Adam_1 not found in checkpoint 2017-11-08 12:02:56.290007: W tensorflow/core/framework/op_kernel.cc:1192] Not found: Key MobilenetV1/Conv2d_7_depthwise/BatchNorm/gamma/Adam not found in checkpoint 2017-11-08 12:02:56.290150: W tensorflow/core/framework/op_kernel.cc:1192] Not found: Key MobilenetV1/Conv2d_8_depthwise/BatchNorm/gamma/Adam not found in checkpoint 2017-11-08 12:02:56.292335: W tensorflow/core/framework/op_kernel.cc:1192] Not found: Key MobilenetV1/Conv2d_8_pointwise/BatchNorm/beta/Adam not found in checkpoint 2017-11-08 12:02:56.302872: W tensorflow/core/framework/op_kernel.cc:1192] Not found: Key MobilenetV1/Conv2d_8_depthwise/BatchNorm/beta/Adam_1 not found in checkpoint 2017-11-08 12:02:56.302919: W tensorflow/core/framework/op_kernel.cc:1192] Not found: Key MobilenetV1/Conv2d_9_depthwise/depthwise_weights/Adam_1 not found in checkpoint 2017-11-08 12:02:56.306711: W tensorflow/core/framework/op_kernel.cc:1192] Not found: Key MobilenetV1/Conv2d_8_pointwise/BatchNorm/gamma/Adam_1 not found in checkpoint 2017-11-08 12:02:56.309400: W tensorflow/core/framework/op_kernel.cc:1192] Not found: Key MobilenetV1/Conv2d_9_pointwise/weights/Adam_1 not found in checkpoint 2017-11-08 12:02:56.310578: W tensorflow/core/framework/op_kernel.cc:1192] Not found: Key MobilenetV1/Conv2d_6_pointwise/weights/Adam_1 not found in checkpoint 2017-11-08 12:02:56.310677: W tensorflow/core/framework/op_kernel.cc:1192] Not found: Key MobilenetV1/Conv2d_8_depthwise/BatchNorm/gamma/Adam_1 not found in checkpoint 2017-11-08 12:02:56.310927: W tensorflow/core/framework/op_kernel.cc:1192] Not found: Key MobilenetV1/Conv2d_9_depthwise/BatchNorm/gamma/Adam_1 not found in checkpoint 2017-11-08 12:02:56.311997: W tensorflow/core/framework/op_kernel.cc:1192] Not found: Key MobilenetV1/Conv2d_9_pointwise/BatchNorm/gamma/Adam not found in checkpoint 2017-11-08 12:02:56.312181: W tensorflow/core/framework/op_kernel.cc:1192] Not found: Key MobilenetV1/Conv2d_8_depthwise/depthwise_weights/Adam not found in checkpoint 2017-11-08 12:02:56.312690: W tensorflow/core/framework/op_kernel.cc:1192] Not found: Key MobilenetV1/Conv2d_8_pointwise/BatchNorm/beta/Adam_1 not found in checkpoint 2017-11-08 12:02:56.313606: W tensorflow/core/framework/op_kernel.cc:1192] Not found: Key MobilenetV1/Logits/Conv2d_1c_1x1/biases/Adam not found in checkpoint 2017-11-08 12:02:56.313868: W tensorflow/core/framework/op_kernel.cc:1192] Not found: Key MobilenetV1/Conv2d_7_pointwise/weights/Adam_1 not found in checkpoint 2017-11-08 12:02:56.314337: W tensorflow/core/framework/op_kernel.cc:1192] Not found: Key MobilenetV1/Conv2d_8_pointwise/weights/Adam_1 not found in checkpoint 2017-11-08 12:02:56.314373: W tensorflow/core/framework/op_kernel.cc:1192] Not found: Key MobilenetV1/Conv2d_9_depthwise/BatchNorm/beta/Adam_1 not found in checkpoint 2017-11-08 12:02:56.315263: W tensorflow/core/framework/op_kernel.cc:1192] Not found: Key MobilenetV1/Conv2d_9_depthwise/BatchNorm/beta/Adam not found in checkpoint 2017-11-08 12:02:56.317037: W tensorflow/core/framework/op_kernel.cc:1192] Not found: Key MobilenetV1/Conv2d_9_pointwise/BatchNorm/beta/Adam not found in checkpoint 2017-11-08 12:02:56.317143: W tensorflow/core/framework/op_kernel.cc:1192] Not found: Key MobilenetV1/Logits/Conv2d_1c_1x1/biases/Adam_1 not found in checkpoint 2017-11-08 12:02:56.317737: W tensorflow/core/framework/op_kernel.cc:1192] Not found: Key MobilenetV1/Conv2d_9_pointwise/BatchNorm/beta/Adam_1 not found in checkpoint 2017-11-08 12:02:56.317806: W tensorflow/core/framework/op_kernel.cc:1192] Not found: Key MobilenetV1/Conv2d_9_depthwise/BatchNorm/gamma/Adam not found in checkpoint 2017-11-08 12:02:56.317970: W tensorflow/core/framework/op_kernel.cc:1192] Not found: Key MobilenetV1/Conv2d_8_depthwise/BatchNorm/beta/Adam not found in checkpoint 2017-11-08 12:02:56.319557: W tensorflow/core/framework/op_kernel.cc:1192] Not found: Key NotFoundError (see above for traceback): Key MobilenetV1/Conv2d_0/weights/Adam_1 not found in checkpoint [[Node: save/RestoreV2_10 = RestoreV2[dtypes=[DT_FLOAT], _device="/job:localhost/replica:0/task:0/cpu:0"](_arg_save/Const_0_0, save/RestoreV2_10/tensor_names, save/RestoreV2_10/shape_and_slices)]]

Could anyone please help me solve this issue ? Thanks in advance.


回答1:


The cause of this issue is different optimizer introduces different sets of extra variables, and these extra variables are also saved in the Checkpoint file. You can solve this issue by explicitly specifying the variables (model itself, not including optimizer-introduced ones) to restore, like the following way:

variables_to_restore_full = slim.get_variables_to_restore(include=["resnet_v2"])
variables_to_restore = []

for var in variables_to_restore_full:
    #if 'Momentum' in var.name:
    if 'Adam' in var.name:
       continue
    variables_to_restore.append(var)

self.restorer = tf.train.Saver(variables_to_restore)
self.restorer.restore(self.sess, '/PATH/TO/Checkpoint')


来源:https://stackoverflow.com/questions/47194449/changing-optimizer-results-in-not-found-in-checkpoint-errors

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!