我有一个Estimator,用一种特殊的损失函数训练CNN。一旦完成训练,我想拥有相同的Estimator,使用已经训练过的卷积层训练一组新的完全连接的层,以及一个新的损失函数。这些必须一个接一个地完成。
当尝试开始训练第二组完全连接的层时,我遇到以下错误:
NotFoundError (see above for traceback): Key OptimizeLoss/inception_module_1_path_1/batch_normalization/beta/Adam not found in checkpoint
[[Node: save/RestoreV2_22 = RestoreV2[dtypes=[DT_FLOAT], _device="/job:localhost/replica:0/task:0/device:CPU:0"](_arg_save/Const_0_0, save/RestoreV2_22/tensor_names, save/RestoreV2_22/shape_and_slices)]]
[[Node: save/RestoreV2_21/_1 = _Recv[client_terminated=false, recv_device="/job:localhost/replica:0/task:0/device:GPU:0", send_device="/job:localhost/replica:0/task:0/device:CPU:0", send_device_incarnation=1, tensor_name="edge_280_save/RestoreV2_21", tensor_type=DT_FLOAT, _device="/job:localhost/replica:0/task:0/device:GPU:0"]()]]
似乎它需要已经设置了第二个损失函数,但我认为这是在运行model_fn时完成的。 Estimator正在使用两个连续的Estimator.train方法调用进行训练。