2021-12-27 17:45:07.871890: W tensorflow/core/data/root_dataset.cc:167] Optimization loop failed: Cancelled: Operation was cancelled 2021-12-27 17:45:07.877953: W tensorflow/core/data/root_dataset.cc:167] Optimization loop failed: Cancelled: Operation was cancelled 2021-12-27 17:45:07.911729: W tensorflow/core/data/root_dataset.cc:167] Optimization loop failed: Cancelled: Operation was cancelled 2021-12-27 17:45:08.332561: W tensorflow/core/data/root_dataset.cc:167] Optimization loop failed: Cancelled: Operation was cancelled 2021-12-27 17:45:08.338739: W tensorflow/core/data/root_dataset.cc:167] Optimization loop failed: Cancelled: Operation was cancelled 2021-12-27 17:45:08.643981: W tensorflow/core/data/root_dataset.cc:167] Optimization loop failed: Cancelled: Operation was cancelled 2021-12-27 17:45:08.798146: W tensorflow/core/data/root_dataset.cc:167] Optimization loop failed: Cancelled: Operation was cancelled 2021-12-27 17:45:08.804127: W tensorflow/core/data/root_dataset.cc:167] Optimization loop failed: Cancelled: Operation was cancelled 2021-12-27 17:45:09.134902: W tensorflow/core/data/root_dataset.cc:167] Optimization loop failed: Cancelled: Operation was cancelled 2021-12-27 17:45:10.016327: W tensorflow/core/data/root_dataset.cc:167] Optimization loop failed: Cancelled: Operation was cancelled 2021-12-27 17:45:10.231629: W tensorflow/core/data/root_dataset.cc:167] Optimization loop failed: Cancelled: Operation was cancelled 2021-12-27 17:45:10.907995: W tensorflow/core/data/root_dataset.cc:167] Optimization loop failed: Cancelled: Operation was cancelled 2021-12-27 17:45:10.914152: W tensorflow/core/data/root_dataset.cc:167] Optimization loop failed: Cancelled: Operation was cancelled 2021-12-27 17:45:12.144025: W tensorflow/core/data/root_dataset.cc:167] Optimization loop failed: Cancelled: Operation was cancelled
出现问题的原因:
可能是你的数据迭代器的批次大小问题,尝试调节以下,让他小于你的训练数据数。
解决方式:
这样问题即可解决,但这只是尽可能避免这个问题,还是会出现优化失败的问题。