tensorflow / models

Models and examples built with TensorFlow
Other
76.79k stars 45.85k forks source link

ValueError: Parent directory of model.ckpt doesn't exist, can't save. #8424

Open DAis1 opened 4 years ago

DAis1 commented 4 years ago

I made the following error while trying to save the generated model.ckpt file as a. Pb file. Help me ,please. The error is as follows: D:\work\TensorFlow\envs\tensorflow\lib\site-packages\absl\flags_validators.py:359: UserWarning: Flag --trained_checkpoint_prefix has a non-None default value; therefore, mark_flag_as_required will pass even if flag is not specified in the command line! 'command line!' % flag_name) D:\work\TensorFlow\envs\tensorflow\lib\site-packages\absl\flags_validators.py:359: UserWarning: Flag --output_directory has a non-None default value; therefore, mark_flag_as_required will pass even if flag is not specified in the command line! 'command line!' % flag_name) WARNING:tensorflow:From D:\work\TensorFlow\envs\tensorflow\lib\site-packages\object_detection-0.1-py3.6.egg\object_detection\exporter.py:356: get_or_create_global_step (from tensorflow.contrib.framework.python.ops.variables) is deprecated and will be removed in a future version. Instructions for updating: Please switch to tf.train.get_or_create_global_step 2020-04-23 01:13:03.807883: I T:\src\github\tensorflow\tensorflow\core\platform\cpu_feature_guard.cc:141] Your CPU supports instructions that this TensorFlow binary was not compiled to use: AVX2 2020-04-23 01:13:04.844937: I T:\src\github\tensorflow\tensorflow\core\common_runtime\gpu\gpu_device.cc:1392] Found device 0 with properties: name: GeForce GTX 950M major: 5 minor: 0 memoryClockRate(GHz): 1.124 pciBusID: 0000:01:00.0 totalMemory: 4.00GiB freeMemory: 3.34GiB 2020-04-23 01:13:04.866714: I T:\src\github\tensorflow\tensorflow\core\common_runtime\gpu\gpu_device.cc:1471] Adding visible gpu devices: 0 2020-04-23 01:13:12.043030: I T:\src\github\tensorflow\tensorflow\core\common_runtime\gpu\gpu_device.cc:952] Device interconnect StreamExecutor with strength 1 edge matrix: 2020-04-23 01:13:12.050815: I T:\src\github\tensorflow\tensorflow\core\common_runtime\gpu\gpu_device.cc:958] 0 2020-04-23 01:13:12.054602: I T:\src\github\tensorflow\tensorflow\core\common_runtime\gpu\gpu_device.cc:971] 0: N 2020-04-23 01:13:12.076548: I T:\src\github\tensorflow\tensorflow\core\common_runtime\gpu\gpu_device.cc:1084] Created TensorFlow device (/job:localhost/replica:0/task:0/device:GPU:0 with 3070 MB memory) -> physical GPU (device: 0, name: GeForce GTX 950M, pci bus id: 0000:01:00.0, compute capability: 5.0) 2020-04-23 01:13:14.915827: W T:\src\github\tensorflow\tensorflow\core\framework\op_kernel.cc:1318] OP_REQUIRES failed at save_restore_v2_ops.cc:109 : Not found: Failed to create a directory: ; No such file or directory Traceback (most recent call last): File "D:\work\TensorFlow\envs\tensorflow\lib\site-packages\tensorflow\python\client\session.py", line 1322, in _do_call return fn(*args) File "D:\work\TensorFlow\envs\tensorflow\lib\site-packages\tensorflow\python\client\session.py", line 1307, in _run_fn options, feed_dict, fetch_list, target_list, run_metadata) File "D:\work\TensorFlow\envs\tensorflow\lib\site-packages\tensorflow\python\client\session.py", line 1409, in _call_tf_sessionrun run_metadata) tensorflow.python.framework.errors_impl.NotFoundError: Failed to create a directory: ; No such file or directory [[Node: save/SaveV2 = SaveV2[dtypes=[DT_FLOAT, DT_FLOAT, DT_FLOAT, DT_FLOAT, DT_FLOAT, ..., DT_FLOAT, DT_FLOAT, DT_FLOAT, DT_FLOAT, DT_INT64], _device="/job:localhost/replica:0/task:0/device:CPU:0"](_arg_save/Const_0_0, save/SaveV2/tensor_names, save/SaveV2/shape_and_slices, BoxPredictor_0/BoxEncodingPredictor/biases/_495, BoxPredictor_0/BoxEncodingPredictor/weights, BoxPredictor_0/ClassPredictor/biases/_497, BoxPredictor_0/ClassPredictor/weights, BoxPredictor_1/BoxEncodingPredictor/biases/_499, BoxPredictor_1/BoxEncodingPredictor/weights, BoxPredictor_1/ClassPredictor/biases/_501, BoxPredictor_1/ClassPredictor/weights, BoxPredictor_2/BoxEncodingPredictor/biases/_503, BoxPredictor_2/BoxEncodingPredictor/weights, BoxPredictor_2/ClassPredictor/biases/_505, BoxPredictor_2/ClassPredictor/weights, BoxPredictor_3/BoxEncodingPredictor/biases/_507, BoxPredictor_3/BoxEncodingPredictor/weights, BoxPredictor_3/ClassPredictor/biases/_509, BoxPredictor_3/ClassPredictor/weights, BoxPredictor_4/BoxEncodingPredictor/biases/_511, BoxPredictor_4/BoxEncodingPredictor/weights, BoxPredictor_4/ClassPredictor/biases/_513, BoxPredictor_4/ClassPredictor/weights, BoxPredictor_5/BoxEncodingPredictor/biases/_515, BoxPredictor_5/BoxEncodingPredictor/weights, BoxPredictor_5/ClassPredictor/biases/_517, BoxPredictor_5/ClassPredictor/weights, FeatureExtractor/MobilenetV1/Conv2d_0/BatchNorm/beta/_519, FeatureExtractor/MobilenetV1/Conv2d_0/BatchNorm/gamma/_521, FeatureExtractor/MobilenetV1/Conv2d_0/BatchNorm/moving_mean/_523, FeatureExtractor/MobilenetV1/Conv2d_0/BatchNorm/moving_variance/_525, FeatureExtractor/MobilenetV1/Conv2d_0/weights, FeatureExtractor/MobilenetV1/Conv2d_10_depthwise/BatchNorm/beta/_527, FeatureExtractor/MobilenetV1/Conv2d_10_depthwise/BatchNorm/gamma/_529, FeatureExtractor/MobilenetV1/Conv2d_10_depthwise/BatchNorm/moving_mean/_531, FeatureExtractor/MobilenetV1/Conv2d_10_depthwise/BatchNorm/moving_variance/_533, FeatureExtractor/MobilenetV1/Conv2d_10_depthwise/depthwise_weights, FeatureExtractor/MobilenetV1/Conv2d_10_pointwise/BatchNorm/beta/_535, FeatureExtractor/MobilenetV1/Conv2d_10_pointwise/BatchNorm/gamma/_537, FeatureExtractor/MobilenetV1/Conv2d_10_pointwise/BatchNorm/moving_mean/_539, FeatureExtractor/MobilenetV1/Conv2d_10_pointwise/BatchNorm/moving_variance/_541, FeatureExtractor/MobilenetV1/Conv2d_10_pointwise/weights, FeatureExtractor/MobilenetV1/Conv2d_11_depthwise/BatchNorm/beta/_543, FeatureExtractor/MobilenetV1/Conv2d_11_depthwise/BatchNorm/gamma/_545, FeatureExtractor/MobilenetV1/Conv2d_11_depthwise/BatchNorm/moving_mean/_547, FeatureExtractor/MobilenetV1/Conv2d_11_depthwise/BatchNorm/moving_variance/_549, FeatureExtractor/MobilenetV1/Conv2d_11_depthwise/depthwise_weights, FeatureExtractor/MobilenetV1/Conv2d_11_pointwise/BatchNorm/beta/_551, FeatureExtractor/MobilenetV1/Conv2d_11_pointwise/BatchNorm/gamma/_553, FeatureExtractor/MobilenetV1/Conv2d_11_pointwise/BatchNorm/moving_mean/_555, FeatureExtractor/MobilenetV1/Conv2d_11_pointwise/BatchNorm/moving_variance/_557, FeatureExtractor/MobilenetV1/Conv2d_11_pointwise/weights, FeatureExtractor/MobilenetV1/Conv2d_12_depthwise/BatchNorm/beta/_559, FeatureExtractor/MobilenetV1/Conv2d_12_depthwise/BatchNorm/gamma/_561, FeatureExtractor/MobilenetV1/Conv2d_12_depthwise/BatchNorm/moving_mean/_563, FeatureExtractor/MobilenetV1/Conv2d_12_depthwise/BatchNorm/moving_variance/_565, FeatureExtractor/MobilenetV1/Conv2d_12_depthwise/depthwise_weights, FeatureExtractor/MobilenetV1/Conv2d_12_pointwise/BatchNorm/beta/_567, FeatureExtractor/MobilenetV1/Conv2d_12_pointwise/BatchNorm/gamma/_569, FeatureExtractor/MobilenetV1/Conv2d_12_pointwise/BatchNorm/moving_mean/_571, FeatureExtractor/MobilenetV1/Conv2d_12_pointwise/BatchNorm/moving_variance/_573, FeatureExtractor/MobilenetV1/Conv2d_12_pointwise/weights, FeatureExtractor/MobilenetV1/Conv2d_13_depthwise/BatchNorm/beta/_575, FeatureExtractor/MobilenetV1/Conv2d_13_depthwise/BatchNorm/gamma/_577, FeatureExtractor/MobilenetV1/Conv2d_13_depthwise/BatchNorm/moving_mean/_579, FeatureExtractor/MobilenetV1/Conv2d_13_depthwise/BatchNorm/moving_variance/_581, FeatureExtractor/MobilenetV1/Conv2d_13_depthwise/depthwise_weights, FeatureExtractor/MobilenetV1/Conv2d_13_pointwise/BatchNorm/beta/_583, FeatureExtractor/MobilenetV1/Conv2d_13_pointwise/BatchNorm/gamma/_585, FeatureExtractor/MobilenetV1/Conv2d_13_pointwise/BatchNorm/moving_mean/_587, FeatureExtractor/MobilenetV1/Conv2d_13_pointwise/BatchNorm/moving_variance/_589, FeatureExtractor/MobilenetV1/Conv2d_13_pointwise/weights, FeatureExtractor/MobilenetV1/Conv2d_13_pointwise_1_Conv2d_2_1x1_256/BatchNorm/beta/_591, FeatureExtractor/MobilenetV1/Conv2d_13_pointwise_1_Conv2d_2_1x1_256/BatchNorm/gamma/_593, FeatureExtractor/MobilenetV1/Conv2d_13_pointwise_1_Conv2d_2_1x1_256/BatchNorm/moving_mean/_595, FeatureExtractor/MobilenetV1/Conv2d_13_pointwise_1_Conv2d_2_1x1_256/BatchNorm/moving_variance/_597, FeatureExtractor/MobilenetV1/Conv2d_13_pointwise_1_Conv2d_2_1x1_256/weights, FeatureExtractor/MobilenetV1/Conv2d_13_pointwise_1_Conv2d_3_1x1_128/BatchNorm/beta/_599, FeatureExtractor/MobilenetV1/Conv2d_13_pointwise_1_Conv2d_3_1x1_128/BatchNorm/gamma/_601, FeatureExtractor/MobilenetV1/Conv2d_13_pointwise_1_Conv2d_3_1x1_128/BatchNorm/moving_mean/_603, FeatureExtractor/MobilenetV1/Conv2d_13_pointwise_1_Conv2d_3_1x1_128/BatchNorm/moving_variance/_605, FeatureExtractor/MobilenetV1/Conv2d_13_pointwise_1_Conv2d_3_1x1_128/weights, FeatureExtractor/MobilenetV1/Conv2d_13_pointwise_1_Conv2d_4_1x1_128/BatchNorm/beta/_607, FeatureExtractor/MobilenetV1/Conv2d_13_pointwise_1_Conv2d_4_1x1_128/BatchNorm/gamma/_609, FeatureExtractor/MobilenetV1/Conv2d_13_pointwise_1_Conv2d_4_1x1_128/BatchNorm/moving_mean/_611, FeatureExtractor/MobilenetV1/Conv2d_13_pointwise_1_Conv2d_4_1x1_128/BatchNorm/moving_variance/_613, FeatureExtractor/MobilenetV1/Conv2d_13_pointwise_1_Conv2d_4_1x1_128/weights, FeatureExtractor/MobilenetV1/Conv2d_13_pointwise_1_Conv2d_5_1x1_64/BatchNorm/beta/_615, FeatureExtractor/MobilenetV1/Conv2d_13_pointwise_1_Conv2d_5_1x1_64/BatchNorm/gamma/_617, FeatureExtractor/MobilenetV1/Conv2d_13_pointwise_1_Conv2d_5_1x1_64/BatchNorm/moving_mean/_619, FeatureExtractor/MobilenetV1/Conv2d_13_pointwise_1_Conv2d_5_1x1_64/BatchNorm/moving_variance/_621, FeatureExtractor/MobilenetV1/Conv2d_13_pointwise_1_Conv2d_5_1x1_64/weights, FeatureExtractor/MobilenetV1/Conv2d_13_pointwise_2_Conv2d_2_3x3_s2_512/BatchNorm/beta/_623, FeatureExtractor/MobilenetV1/Conv2d_13_pointwise_2_Conv2d_2_3x3_s2_512/BatchNorm/gamma/_625, FeatureExtractor/MobilenetV1/Conv2d_13_pointwise_2_Conv2d_2_3x3_s2_512/BatchNorm/moving_mean/_627, FeatureExtractor/MobilenetV1/Conv2d_13_pointwise_2_Conv2d_2_3x3_s2_512/BatchNorm/moving_variance/_629, FeatureExtractor/MobilenetV1/Conv2d_13_pointwise_2_Conv2d_2_3x3_s2_512/weights, FeatureExtractor/MobilenetV1/Conv2d_13_pointwise_2_Conv2d_3_3x3_s2_256/BatchNorm/beta/_631, FeatureExtractor/MobilenetV1/Conv2d_13_pointwise_2_Conv2d_3_3x3_s2_256/BatchNorm/gamma/_633, FeatureExtractor/MobilenetV1/Conv2d_13_pointwise_2_Conv2d_3_3x3_s2_256/BatchNorm/moving_mean/_635, FeatureExtractor/MobilenetV1/Conv2d_13_pointwise_2_Conv2d_3_3x3_s2_256/BatchNorm/moving_variance/_637, FeatureExtractor/MobilenetV1/Conv2d_13_pointwise_2_Conv2d_3_3x3_s2_256/weights, FeatureExtractor/MobilenetV1/Conv2d_13_pointwise_2_Conv2d_4_3x3_s2_256/BatchNorm/beta/_639, FeatureExtractor/MobilenetV1/Conv2d_13_pointwise_2_Conv2d_4_3x3_s2_256/BatchNorm/gamma/_641, FeatureExtractor/MobilenetV1/Conv2d_13_pointwise_2_Conv2d_4_3x3_s2_256/BatchNorm/moving_mean/_643, FeatureExtractor/MobilenetV1/Conv2d_13_pointwise_2_Conv2d_4_3x3_s2_256/BatchNorm/moving_variance/_645, FeatureExtractor/MobilenetV1/Conv2d_13_pointwise_2_Conv2d_4_3x3_s2_256/weights, FeatureExtractor/MobilenetV1/Conv2d_13_pointwise_2_Conv2d_5_3x3_s2_128/BatchNorm/beta/_647, FeatureExtractor/MobilenetV1/Conv2d_13_pointwise_2_Conv2d_5_3x3_s2_128/BatchNorm/gamma/_649, FeatureExtractor/MobilenetV1/Conv2d_13_pointwise_2_Conv2d_5_3x3_s2_128/BatchNorm/moving_mean/_651, FeatureExtractor/MobilenetV1/Conv2d_13_pointwise_2_Conv2d_5_3x3_s2_128/BatchNorm/moving_variance/_653, FeatureExtractor/MobilenetV1/Conv2d_13_pointwise_2_Conv2d_5_3x3_s2_128/weights, FeatureExtractor/MobilenetV1/Conv2d_1_depthwise/BatchNorm/beta/_655, FeatureExtractor/MobilenetV1/Conv2d_1_depthwise/BatchNorm/gamma/_657, FeatureExtractor/MobilenetV1/Conv2d_1_depthwise/BatchNorm/moving_mean/_659, FeatureExtractor/MobilenetV1/Conv2d_1_depthwise/BatchNorm/moving_variance/_661, FeatureExtractor/MobilenetV1/Conv2d_1_depthwise/depthwise_weights, FeatureExtractor/MobilenetV1/Conv2d_1_pointwise/BatchNorm/beta/_663, FeatureExtractor/MobilenetV1/Conv2d_1_pointwise/BatchNorm/gamma/_665, FeatureExtractor/MobilenetV1/Conv2d_1_pointwise/BatchNorm/moving_mean/_667, FeatureExtractor/MobilenetV1/Conv2d_1_pointwise/BatchNorm/moving_variance/_669, FeatureExtractor/MobilenetV1/Conv2d_1_pointwise/weights, FeatureExtractor/MobilenetV1/Conv2d_2_depthwise/BatchNorm/beta/_671, FeatureExtractor/MobilenetV1/Conv2d_2_depthwise/BatchNorm/gamma/_673, FeatureExtractor/MobilenetV1/Conv2d_2_depthwise/BatchNorm/moving_mean/_675, FeatureExtractor/MobilenetV1/Conv2d_2_depthwise/BatchNorm/moving_variance/_677, FeatureExtractor/MobilenetV1/Conv2d_2_depthwise/depthwise_weights, FeatureExtractor/MobilenetV1/Conv2d_2_pointwise/BatchNorm/beta/_679, FeatureExtractor/MobilenetV1/Conv2d_2_pointwise/BatchNorm/gamma/_681, FeatureExtractor/MobilenetV1/Conv2d_2_pointwise/BatchNorm/moving_mean/_683, FeatureExtractor/MobilenetV1/Conv2d_2_pointwise/BatchNorm/moving_variance/_685, FeatureExtractor/MobilenetV1/Conv2d_2_pointwise/weights, FeatureExtractor/MobilenetV1/Conv2d_3_depthwise/BatchNorm/beta/_687, FeatureExtractor/MobilenetV1/Conv2d_3_depthwise/BatchNorm/gamma/_689, FeatureExtractor/MobilenetV1/Conv2d_3_depthwise/BatchNorm/moving_mean/_691, FeatureExtractor/MobilenetV1/Conv2d_3_depthwise/BatchNorm/moving_variance/_693, FeatureExtractor/MobilenetV1/Conv2d_3_depthwise/depthwise_weights, FeatureExtractor/MobilenetV1/Conv2d_3_pointwise/BatchNorm/beta/_695, FeatureExtractor/MobilenetV1/Conv2d_3_pointwise/BatchNorm/gamma/_697, FeatureExtractor/MobilenetV1/Conv2d_3_pointwise/BatchNorm/moving_mean/_699, FeatureExtractor/MobilenetV1/Conv2d_3_pointwise/BatchNorm/moving_variance/_701, FeatureExtractor/MobilenetV1/Conv2d_3_pointwise/weights, FeatureExtractor/MobilenetV1/Conv2d_4_depthwise/BatchNorm/beta/_703, FeatureExtractor/MobilenetV1/Conv2d_4_depthwise/BatchNorm/gamma/_705, FeatureExtractor/MobilenetV1/Conv2d_4_depthwise/BatchNorm/moving_mean/_707, FeatureExtractor/MobilenetV1/Conv2d_4_depthwise/BatchNorm/moving_variance/_709, FeatureExtractor/MobilenetV1/Conv2d_4_depthwise/depthwise_weights, FeatureExtractor/MobilenetV1/Conv2d_4_pointwise/BatchNorm/beta/_711, FeatureExtractor/MobilenetV1/Conv2d_4_pointwise/BatchNorm/gamma/_713, FeatureExtractor/MobilenetV1/Conv2d_4_pointwise/BatchNorm/moving_mean/_715, FeatureExtractor/MobilenetV1/Conv2d_4_pointwise/BatchNorm/moving_variance/_717, FeatureExtractor/MobilenetV1/Conv2d_4_pointwise/weights, FeatureExtractor/MobilenetV1/Conv2d_5_depthwise/BatchNorm/beta/_719, FeatureExtractor/MobilenetV1/Conv2d_5_depthwise/BatchNorm/gamma/_721, FeatureExtractor/MobilenetV1/Conv2d_5_depthwise/BatchNorm/moving_mean/_723, FeatureExtractor/MobilenetV1/Conv2d_5_depthwise/BatchNorm/moving_variance/_725, FeatureExtractor/MobilenetV1/Conv2d_5_depthwise/depthwise_weights, FeatureExtractor/MobilenetV1/Conv2d_5_pointwise/BatchNorm/beta/_727, FeatureExtractor/MobilenetV1/Conv2d_5_pointwise/BatchNorm/gamma/_729, FeatureExtractor/MobilenetV1/Conv2d_5_pointwise/BatchNorm/moving_mean/_731, FeatureExtractor/MobilenetV1/Conv2d_5_pointwise/BatchNorm/moving_variance/_733, FeatureExtractor/MobilenetV1/Conv2d_5_pointwise/weights, FeatureExtractor/MobilenetV1/Conv2d_6_depthwise/BatchNorm/beta/_735, FeatureExtractor/MobilenetV1/Conv2d_6_depthwise/BatchNorm/gamma/_737, FeatureExtractor/MobilenetV1/Conv2d_6_depthwise/BatchNorm/moving_mean/_739, FeatureExtractor/MobilenetV1/Conv2d_6_depthwise/BatchNorm/moving_variance/_741, FeatureExtractor/MobilenetV1/Conv2d_6_depthwise/depthwise_weights, FeatureExtractor/MobilenetV1/Conv2d_6_pointwise/BatchNorm/beta/_743, FeatureExtractor/MobilenetV1/Conv2d_6_pointwise/BatchNorm/gamma/_745, FeatureExtractor/MobilenetV1/Conv2d_6_pointwise/BatchNorm/moving_mean/_747, FeatureExtractor/MobilenetV1/Conv2d_6_pointwise/BatchNorm/moving_variance/_749, FeatureExtractor/MobilenetV1/Conv2d_6_pointwise/weights, FeatureExtractor/MobilenetV1/Conv2d_7_depthwise/BatchNorm/beta/_751, FeatureExtractor/MobilenetV1/Conv2d_7_depthwise/BatchNorm/gamma/_753, FeatureExtractor/MobilenetV1/Conv2d_7_depthwise/BatchNorm/moving_mean/_755, FeatureExtractor/MobilenetV1/Conv2d_7_depthwise/BatchNorm/moving_variance/_757, FeatureExtractor/MobilenetV1/Conv2d_7_depthwise/depthwise_weights, FeatureExtractor/MobilenetV1/Conv2d_7_pointwise/BatchNorm/beta/_759, FeatureExtractor/MobilenetV1/Conv2d_7_pointwise/BatchNorm/gamma/_761, FeatureExtractor/MobilenetV1/Conv2d_7_pointwise/BatchNorm/moving_mean/_763, FeatureExtractor/MobilenetV1/Conv2d_7_pointwise/BatchNorm/moving_variance/_765, FeatureExtractor/MobilenetV1/Conv2d_7_pointwise/weights, FeatureExtractor/MobilenetV1/Conv2d_8_depthwise/BatchNorm/beta/_767, FeatureExtractor/MobilenetV1/Conv2d_8_depthwise/BatchNorm/gamma/_769, FeatureExtractor/MobilenetV1/Conv2d_8_depthwise/BatchNorm/moving_mean/_771, FeatureExtractor/MobilenetV1/Conv2d_8_depthwise/BatchNorm/moving_variance/_773, FeatureExtractor/MobilenetV1/Conv2d_8_depthwise/depthwise_weights, FeatureExtractor/MobilenetV1/Conv2d_8_pointwise/BatchNorm/beta/_775, FeatureExtractor/MobilenetV1/Conv2d_8_pointwise/BatchNorm/gamma/_777, FeatureExtractor/MobilenetV1/Conv2d_8_pointwise/BatchNorm/moving_mean/_779, FeatureExtractor/MobilenetV1/Conv2d_8_pointwise/BatchNorm/moving_variance/_781, FeatureExtractor/MobilenetV1/Conv2d_8_pointwise/weights, FeatureExtractor/MobilenetV1/Conv2d_9_depthwise/BatchNorm/beta/_783, FeatureExtractor/MobilenetV1/Conv2d_9_depthwise/BatchNorm/gamma/_785, FeatureExtractor/MobilenetV1/Conv2d_9_depthwise/BatchNorm/moving_mean/_787, FeatureExtractor/MobilenetV1/Conv2d_9_depthwise/BatchNorm/moving_variance/_789, FeatureExtractor/MobilenetV1/Conv2d_9_depthwise/depthwise_weights, FeatureExtractor/MobilenetV1/Conv2d_9_pointwise/BatchNorm/beta/_791, FeatureExtractor/MobilenetV1/Conv2d_9_pointwise/BatchNorm/gamma/_793, FeatureExtractor/MobilenetV1/Conv2d_9_pointwise/BatchNorm/moving_mean/_795, FeatureExtractor/MobilenetV1/Conv2d_9_pointwise/BatchNorm/moving_variance/_797, FeatureExtractor/MobilenetV1/Conv2d_9_pointwise/weights, global_step/_799)]]

During handling of the above exception, another exception occurred:

Traceback (most recent call last): File "D:\work\TensorFlow\envs\tensorflow\lib\site-packages\tensorflow\python\training\saver.py", line 1652, in save {self.saver_def.filename_tensor_name: checkpoint_file}) File "D:\work\TensorFlow\envs\tensorflow\lib\site-packages\tensorflow\python\client\session.py", line 900, in run run_metadata_ptr) File "D:\work\TensorFlow\envs\tensorflow\lib\site-packages\tensorflow\python\client\session.py", line 1135, in _run feed_dict_tensor, options, run_metadata) File "D:\work\TensorFlow\envs\tensorflow\lib\site-packages\tensorflow\python\client\session.py", line 1316, in _do_run run_metadata) File "D:\work\TensorFlow\envs\tensorflow\lib\site-packages\tensorflow\python\client\session.py", line 1335, in _do_call raise type(e)(node_def, op, message) tensorflow.python.framework.errors_impl.NotFoundError: Failed to create a directory: ; No such file or directory [[Node: save/SaveV2 = SaveV2[dtypes=[DT_FLOAT, DT_FLOAT, DT_FLOAT, DT_FLOAT, DT_FLOAT, ..., DT_FLOAT, DT_FLOAT, DT_FLOAT, DT_FLOAT, DT_INT64], _device="/job:localhost/replica:0/task:0/device:CPU:0"](_arg_save/Const_0_0, save/SaveV2/tensor_names, save/SaveV2/shape_and_slices, BoxPredictor_0/BoxEncodingPredictor/biases/_495, BoxPredictor_0/BoxEncodingPredictor/weights, BoxPredictor_0/ClassPredictor/biases/_497, BoxPredictor_0/ClassPredictor/weights, BoxPredictor_1/BoxEncodingPredictor/biases/_499, BoxPredictor_1/BoxEncodingPredictor/weights, BoxPredictor_1/ClassPredictor/biases/_501, BoxPredictor_1/ClassPredictor/weights, BoxPredictor_2/BoxEncodingPredictor/biases/_503, BoxPredictor_2/BoxEncodingPredictor/weights, BoxPredictor_2/ClassPredictor/biases/_505, BoxPredictor_2/ClassPredictor/weights, BoxPredictor_3/BoxEncodingPredictor/biases/_507, BoxPredictor_3/BoxEncodingPredictor/weights, BoxPredictor_3/ClassPredictor/biases/_509, BoxPredictor_3/ClassPredictor/weights, BoxPredictor_4/BoxEncodingPredictor/biases/_511, BoxPredictor_4/BoxEncodingPredictor/weights, BoxPredictor_4/ClassPredictor/biases/_513, BoxPredictor_4/ClassPredictor/weights, BoxPredictor_5/BoxEncodingPredictor/biases/_515, BoxPredictor_5/BoxEncodingPredictor/weights, BoxPredictor_5/ClassPredictor/biases/_517, BoxPredictor_5/ClassPredictor/weights, FeatureExtractor/MobilenetV1/Conv2d_0/BatchNorm/beta/_519, FeatureExtractor/MobilenetV1/Conv2d_0/BatchNorm/gamma/_521, FeatureExtractor/MobilenetV1/Conv2d_0/BatchNorm/moving_mean/_523, FeatureExtractor/MobilenetV1/Conv2d_0/BatchNorm/moving_variance/_525, FeatureExtractor/MobilenetV1/Conv2d_0/weights, FeatureExtractor/MobilenetV1/Conv2d_10_depthwise/BatchNorm/beta/_527, FeatureExtractor/MobilenetV1/Conv2d_10_depthwise/BatchNorm/gamma/_529, FeatureExtractor/MobilenetV1/Conv2d_10_depthwise/BatchNorm/moving_mean/_531, FeatureExtractor/MobilenetV1/Conv2d_10_depthwise/BatchNorm/moving_variance/_533, FeatureExtractor/MobilenetV1/Conv2d_10_depthwise/depthwise_weights, FeatureExtractor/MobilenetV1/Conv2d_10_pointwise/BatchNorm/beta/_535, FeatureExtractor/MobilenetV1/Conv2d_10_pointwise/BatchNorm/gamma/_537, FeatureExtractor/MobilenetV1/Conv2d_10_pointwise/BatchNorm/moving_mean/_539, FeatureExtractor/MobilenetV1/Conv2d_10_pointwise/BatchNorm/moving_variance/_541, FeatureExtractor/MobilenetV1/Conv2d_10_pointwise/weights, FeatureExtractor/MobilenetV1/Conv2d_11_depthwise/BatchNorm/beta/_543, FeatureExtractor/MobilenetV1/Conv2d_11_depthwise/BatchNorm/gamma/_545, FeatureExtractor/MobilenetV1/Conv2d_11_depthwise/BatchNorm/moving_mean/_547, FeatureExtractor/MobilenetV1/Conv2d_11_depthwise/BatchNorm/moving_variance/_549, FeatureExtractor/MobilenetV1/Conv2d_11_depthwise/depthwise_weights, FeatureExtractor/MobilenetV1/Conv2d_11_pointwise/BatchNorm/beta/_551, FeatureExtractor/MobilenetV1/Conv2d_11_pointwise/BatchNorm/gamma/_553, FeatureExtractor/MobilenetV1/Conv2d_11_pointwise/BatchNorm/moving_mean/_555, FeatureExtractor/MobilenetV1/Conv2d_11_pointwise/BatchNorm/moving_variance/_557, FeatureExtractor/MobilenetV1/Conv2d_11_pointwise/weights, FeatureExtractor/MobilenetV1/Conv2d_12_depthwise/BatchNorm/beta/_559, FeatureExtractor/MobilenetV1/Conv2d_12_depthwise/BatchNorm/gamma/_561, FeatureExtractor/MobilenetV1/Conv2d_12_depthwise/BatchNorm/moving_mean/_563, FeatureExtractor/MobilenetV1/Conv2d_12_depthwise/BatchNorm/moving_variance/_565, FeatureExtractor/MobilenetV1/Conv2d_12_depthwise/depthwise_weights, FeatureExtractor/MobilenetV1/Conv2d_12_pointwise/BatchNorm/beta/_567, FeatureExtractor/MobilenetV1/Conv2d_12_pointwise/BatchNorm/gamma/_569, FeatureExtractor/MobilenetV1/Conv2d_12_pointwise/BatchNorm/moving_mean/_571, FeatureExtractor/MobilenetV1/Conv2d_12_pointwise/BatchNorm/moving_variance/_573, FeatureExtractor/MobilenetV1/Conv2d_12_pointwise/weights, FeatureExtractor/MobilenetV1/Conv2d_13_depthwise/BatchNorm/beta/_575, FeatureExtractor/MobilenetV1/Conv2d_13_depthwise/BatchNorm/gamma/_577, FeatureExtractor/MobilenetV1/Conv2d_13_depthwise/BatchNorm/moving_mean/_579, FeatureExtractor/MobilenetV1/Conv2d_13_depthwise/BatchNorm/moving_variance/_581, FeatureExtractor/MobilenetV1/Conv2d_13_depthwise/depthwise_weights, FeatureExtractor/MobilenetV1/Conv2d_13_pointwise/BatchNorm/beta/_583, FeatureExtractor/MobilenetV1/Conv2d_13_pointwise/BatchNorm/gamma/_585, FeatureExtractor/MobilenetV1/Conv2d_13_pointwise/BatchNorm/moving_mean/_587, FeatureExtractor/MobilenetV1/Conv2d_13_pointwise/BatchNorm/moving_variance/_589, FeatureExtractor/MobilenetV1/Conv2d_13_pointwise/weights, FeatureExtractor/MobilenetV1/Conv2d_13_pointwise_1_Conv2d_2_1x1_256/BatchNorm/beta/_591, FeatureExtractor/MobilenetV1/Conv2d_13_pointwise_1_Conv2d_2_1x1_256/BatchNorm/gamma/_593, FeatureExtractor/MobilenetV1/Conv2d_13_pointwise_1_Conv2d_2_1x1_256/BatchNorm/moving_mean/_595, FeatureExtractor/MobilenetV1/Conv2d_13_pointwise_1_Conv2d_2_1x1_256/BatchNorm/moving_variance/_597, FeatureExtractor/MobilenetV1/Conv2d_13_pointwise_1_Conv2d_2_1x1_256/weights, FeatureExtractor/MobilenetV1/Conv2d_13_pointwise_1_Conv2d_3_1x1_128/BatchNorm/beta/_599, FeatureExtractor/MobilenetV1/Conv2d_13_pointwise_1_Conv2d_3_1x1_128/BatchNorm/gamma/_601, FeatureExtractor/MobilenetV1/Conv2d_13_pointwise_1_Conv2d_3_1x1_128/BatchNorm/moving_mean/_603, FeatureExtractor/MobilenetV1/Conv2d_13_pointwise_1_Conv2d_3_1x1_128/BatchNorm/moving_variance/_605, FeatureExtractor/MobilenetV1/Conv2d_13_pointwise_1_Conv2d_3_1x1_128/weights, FeatureExtractor/MobilenetV1/Conv2d_13_pointwise_1_Conv2d_4_1x1_128/BatchNorm/beta/_607, FeatureExtractor/MobilenetV1/Conv2d_13_pointwise_1_Conv2d_4_1x1_128/BatchNorm/gamma/_609, FeatureExtractor/MobilenetV1/Conv2d_13_pointwise_1_Conv2d_4_1x1_128/BatchNorm/moving_mean/_611, FeatureExtractor/MobilenetV1/Conv2d_13_pointwise_1_Conv2d_4_1x1_128/BatchNorm/moving_variance/_613, FeatureExtractor/MobilenetV1/Conv2d_13_pointwise_1_Conv2d_4_1x1_128/weights, FeatureExtractor/MobilenetV1/Conv2d_13_pointwise_1_Conv2d_5_1x1_64/BatchNorm/beta/_615, FeatureExtractor/MobilenetV1/Conv2d_13_pointwise_1_Conv2d_5_1x1_64/BatchNorm/gamma/_617, FeatureExtractor/MobilenetV1/Conv2d_13_pointwise_1_Conv2d_5_1x1_64/BatchNorm/moving_mean/_619, FeatureExtractor/MobilenetV1/Conv2d_13_pointwise_1_Conv2d_5_1x1_64/BatchNorm/moving_variance/_621, FeatureExtractor/MobilenetV1/Conv2d_13_pointwise_1_Conv2d_5_1x1_64/weights, FeatureExtractor/MobilenetV1/Conv2d_13_pointwise_2_Conv2d_2_3x3_s2_512/BatchNorm/beta/_623, FeatureExtractor/MobilenetV1/Conv2d_13_pointwise_2_Conv2d_2_3x3_s2_512/BatchNorm/gamma/_625, FeatureExtractor/MobilenetV1/Conv2d_13_pointwise_2_Conv2d_2_3x3_s2_512/BatchNorm/moving_mean/_627, FeatureExtractor/MobilenetV1/Conv2d_13_pointwise_2_Conv2d_2_3x3_s2_512/BatchNorm/moving_variance/_629, FeatureExtractor/MobilenetV1/Conv2d_13_pointwise_2_Conv2d_2_3x3_s2_512/weights, FeatureExtractor/MobilenetV1/Conv2d_13_pointwise_2_Conv2d_3_3x3_s2_256/BatchNorm/beta/_631, FeatureExtractor/MobilenetV1/Conv2d_13_pointwise_2_Conv2d_3_3x3_s2_256/BatchNorm/gamma/_633, FeatureExtractor/MobilenetV1/Conv2d_13_pointwise_2_Conv2d_3_3x3_s2_256/BatchNorm/moving_mean/_635, FeatureExtractor/MobilenetV1/Conv2d_13_pointwise_2_Conv2d_3_3x3_s2_256/BatchNorm/moving_variance/_637, FeatureExtractor/MobilenetV1/Conv2d_13_pointwise_2_Conv2d_3_3x3_s2_256/weights, FeatureExtractor/MobilenetV1/Conv2d_13_pointwise_2_Conv2d_4_3x3_s2_256/BatchNorm/beta/_639, FeatureExtractor/MobilenetV1/Conv2d_13_pointwise_2_Conv2d_4_3x3_s2_256/BatchNorm/gamma/_641, FeatureExtractor/MobilenetV1/Conv2d_13_pointwise_2_Conv2d_4_3x3_s2_256/BatchNorm/moving_mean/_643, FeatureExtractor/MobilenetV1/Conv2d_13_pointwise_2_Conv2d_4_3x3_s2_256/BatchNorm/moving_variance/_645, FeatureExtractor/MobilenetV1/Conv2d_13_pointwise_2_Conv2d_4_3x3_s2_256/weights, FeatureExtractor/MobilenetV1/Conv2d_13_pointwise_2_Conv2d_5_3x3_s2_128/BatchNorm/beta/_647, FeatureExtractor/MobilenetV1/Conv2d_13_pointwise_2_Conv2d_5_3x3_s2_128/BatchNorm/gamma/_649, FeatureExtractor/MobilenetV1/Conv2d_13_pointwise_2_Conv2d_5_3x3_s2_128/BatchNorm/moving_mean/_651, FeatureExtractor/MobilenetV1/Conv2d_13_pointwise_2_Conv2d_5_3x3_s2_128/BatchNorm/moving_variance/_653, FeatureExtractor/MobilenetV1/Conv2d_13_pointwise_2_Conv2d_5_3x3_s2_128/weights, FeatureExtractor/MobilenetV1/Conv2d_1_depthwise/BatchNorm/beta/_655, FeatureExtractor/MobilenetV1/Conv2d_1_depthwise/BatchNorm/gamma/_657, FeatureExtractor/MobilenetV1/Conv2d_1_depthwise/BatchNorm/moving_mean/_659, FeatureExtractor/MobilenetV1/Conv2d_1_depthwise/BatchNorm/moving_variance/_661, FeatureExtractor/MobilenetV1/Conv2d_1_depthwise/depthwise_weights, FeatureExtractor/MobilenetV1/Conv2d_1_pointwise/BatchNorm/beta/_663, FeatureExtractor/MobilenetV1/Conv2d_1_pointwise/BatchNorm/gamma/_665, FeatureExtractor/MobilenetV1/Conv2d_1_pointwise/BatchNorm/moving_mean/_667, FeatureExtractor/MobilenetV1/Conv2d_1_pointwise/BatchNorm/moving_variance/_669, FeatureExtractor/MobilenetV1/Conv2d_1_pointwise/weights, FeatureExtractor/MobilenetV1/Conv2d_2_depthwise/BatchNorm/beta/_671, FeatureExtractor/MobilenetV1/Conv2d_2_depthwise/BatchNorm/gamma/_673, FeatureExtractor/MobilenetV1/Conv2d_2_depthwise/BatchNorm/moving_mean/_675, FeatureExtractor/MobilenetV1/Conv2d_2_depthwise/BatchNorm/moving_variance/_677, FeatureExtractor/MobilenetV1/Conv2d_2_depthwise/depthwise_weights, FeatureExtractor/MobilenetV1/Conv2d_2_pointwise/BatchNorm/beta/_679, FeatureExtractor/MobilenetV1/Conv2d_2_pointwise/BatchNorm/gamma/_681, FeatureExtractor/MobilenetV1/Conv2d_2_pointwise/BatchNorm/moving_mean/_683, FeatureExtractor/MobilenetV1/Conv2d_2_pointwise/BatchNorm/moving_variance/_685, FeatureExtractor/MobilenetV1/Conv2d_2_pointwise/weights, FeatureExtractor/MobilenetV1/Conv2d_3_depthwise/BatchNorm/beta/_687, FeatureExtractor/MobilenetV1/Conv2d_3_depthwise/BatchNorm/gamma/_689, FeatureExtractor/MobilenetV1/Conv2d_3_depthwise/BatchNorm/moving_mean/_691, FeatureExtractor/MobilenetV1/Conv2d_3_depthwise/BatchNorm/moving_variance/_693, FeatureExtractor/MobilenetV1/Conv2d_3_depthwise/depthwise_weights, FeatureExtractor/MobilenetV1/Conv2d_3_pointwise/BatchNorm/beta/_695, FeatureExtractor/MobilenetV1/Conv2d_3_pointwise/BatchNorm/gamma/_697, FeatureExtractor/MobilenetV1/Conv2d_3_pointwise/BatchNorm/moving_mean/_699, FeatureExtractor/MobilenetV1/Conv2d_3_pointwise/BatchNorm/moving_variance/_701, FeatureExtractor/MobilenetV1/Conv2d_3_pointwise/weights, FeatureExtractor/MobilenetV1/Conv2d_4_depthwise/BatchNorm/beta/_703, FeatureExtractor/MobilenetV1/Conv2d_4_depthwise/BatchNorm/gamma/_705, FeatureExtractor/MobilenetV1/Conv2d_4_depthwise/BatchNorm/moving_mean/_707, FeatureExtractor/MobilenetV1/Conv2d_4_depthwise/BatchNorm/moving_variance/_709, FeatureExtractor/MobilenetV1/Conv2d_4_depthwise/depthwise_weights, FeatureExtractor/MobilenetV1/Conv2d_4_pointwise/BatchNorm/beta/_711, FeatureExtractor/MobilenetV1/Conv2d_4_pointwise/BatchNorm/gamma/_713, FeatureExtractor/MobilenetV1/Conv2d_4_pointwise/BatchNorm/moving_mean/_715, FeatureExtractor/MobilenetV1/Conv2d_4_pointwise/BatchNorm/moving_variance/_717, FeatureExtractor/MobilenetV1/Conv2d_4_pointwise/weights, FeatureExtractor/MobilenetV1/Conv2d_5_depthwise/BatchNorm/beta/_719, FeatureExtractor/MobilenetV1/Conv2d_5_depthwise/BatchNorm/gamma/_721, FeatureExtractor/MobilenetV1/Conv2d_5_depthwise/BatchNorm/moving_mean/_723, FeatureExtractor/MobilenetV1/Conv2d_5_depthwise/BatchNorm/moving_variance/_725, FeatureExtractor/MobilenetV1/Conv2d_5_depthwise/depthwise_weights, FeatureExtractor/MobilenetV1/Conv2d_5_pointwise/BatchNorm/beta/_727, FeatureExtractor/MobilenetV1/Conv2d_5_pointwise/BatchNorm/gamma/_729, FeatureExtractor/MobilenetV1/Conv2d_5_pointwise/BatchNorm/moving_mean/_731, FeatureExtractor/MobilenetV1/Conv2d_5_pointwise/BatchNorm/moving_variance/_733, FeatureExtractor/MobilenetV1/Conv2d_5_pointwise/weights, FeatureExtractor/MobilenetV1/Conv2d_6_depthwise/BatchNorm/beta/_735, FeatureExtractor/MobilenetV1/Conv2d_6_depthwise/BatchNorm/gamma/_737, FeatureExtractor/MobilenetV1/Conv2d_6_depthwise/BatchNorm/moving_mean/_739, FeatureExtractor/MobilenetV1/Conv2d_6_depthwise/BatchNorm/moving_variance/_741, FeatureExtractor/MobilenetV1/Conv2d_6_depthwise/depthwise_weights, FeatureExtractor/MobilenetV1/Conv2d_6_pointwise/BatchNorm/beta/_743, FeatureExtractor/MobilenetV1/Conv2d_6_pointwise/BatchNorm/gamma/_745, FeatureExtractor/MobilenetV1/Conv2d_6_pointwise/BatchNorm/moving_mean/_747, FeatureExtractor/MobilenetV1/Conv2d_6_pointwise/BatchNorm/moving_variance/_749, FeatureExtractor/MobilenetV1/Conv2d_6_pointwise/weights, FeatureExtractor/MobilenetV1/Conv2d_7_depthwise/BatchNorm/beta/_751, FeatureExtractor/MobilenetV1/Conv2d_7_depthwise/BatchNorm/gamma/_753, FeatureExtractor/MobilenetV1/Conv2d_7_depthwise/BatchNorm/moving_mean/_755, FeatureExtractor/MobilenetV1/Conv2d_7_depthwise/BatchNorm/moving_variance/_757, FeatureExtractor/MobilenetV1/Conv2d_7_depthwise/depthwise_weights, FeatureExtractor/MobilenetV1/Conv2d_7_pointwise/BatchNorm/beta/_759, FeatureExtractor/MobilenetV1/Conv2d_7_pointwise/BatchNorm/gamma/_761, FeatureExtractor/MobilenetV1/Conv2d_7_pointwise/BatchNorm/moving_mean/_763, FeatureExtractor/MobilenetV1/Conv2d_7_pointwise/BatchNorm/moving_variance/_765, FeatureExtractor/MobilenetV1/Conv2d_7_pointwise/weights, FeatureExtractor/MobilenetV1/Conv2d_8_depthwise/BatchNorm/beta/_767, FeatureExtractor/MobilenetV1/Conv2d_8_depthwise/BatchNorm/gamma/_769, FeatureExtractor/MobilenetV1/Conv2d_8_depthwise/BatchNorm/moving_mean/_771, FeatureExtractor/MobilenetV1/Conv2d_8_depthwise/BatchNorm/moving_variance/_773, FeatureExtractor/MobilenetV1/Conv2d_8_depthwise/depthwise_weights, FeatureExtractor/MobilenetV1/Conv2d_8_pointwise/BatchNorm/beta/_775, FeatureExtractor/MobilenetV1/Conv2d_8_pointwise/BatchNorm/gamma/_777, FeatureExtractor/MobilenetV1/Conv2d_8_pointwise/BatchNorm/moving_mean/_779, FeatureExtractor/MobilenetV1/Conv2d_8_pointwise/BatchNorm/moving_variance/_781, FeatureExtractor/MobilenetV1/Conv2d_8_pointwise/weights, FeatureExtractor/MobilenetV1/Conv2d_9_depthwise/BatchNorm/beta/_783, FeatureExtractor/MobilenetV1/Conv2d_9_depthwise/BatchNorm/gamma/_785, FeatureExtractor/MobilenetV1/Conv2d_9_depthwise/BatchNorm/moving_mean/_787, FeatureExtractor/MobilenetV1/Conv2d_9_depthwise/BatchNorm/moving_variance/_789, FeatureExtractor/MobilenetV1/Conv2d_9_depthwise/depthwise_weights, FeatureExtractor/MobilenetV1/Conv2d_9_pointwise/BatchNorm/beta/_791, FeatureExtractor/MobilenetV1/Conv2d_9_pointwise/BatchNorm/gamma/_793, FeatureExtractor/MobilenetV1/Conv2d_9_pointwise/BatchNorm/moving_mean/_795, FeatureExtractor/MobilenetV1/Conv2d_9_pointwise/BatchNorm/moving_variance/_797, FeatureExtractor/MobilenetV1/Conv2d_9_pointwise/weights, global_step/_799)]]

Caused by op 'save/SaveV2', defined at: File "export_inference_graph.py", line 150, in tf.app.run() File "D:\work\TensorFlow\envs\tensorflow\lib\site-packages\tensorflow\python\platform\app.py", line 125, in run _sys.exit(main(argv)) File "export_inference_graph.py", line 146, in main FLAGS.write_inference_graph) File "D:\work\TensorFlow\envs\tensorflow\lib\site-packages\object_detection-0.1-py3.6.egg\object_detection\exporter.py", line 474, in export_inference_graph write_inference_graph=write_inference_graph) File "D:\work\TensorFlow\envs\tensorflow\lib\site-packages\object_detection-0.1-py3.6.egg\object_detection\exporter.py", line 409, in _export_inference_graph trained_checkpoint_prefix=checkpoint_to_use) File "D:\work\TensorFlow\envs\tensorflow\lib\site-packages\object_detection-0.1-py3.6.egg\object_detection\exporter.py", line 317, in write_graph_and_checkpoint tf.import_graph_def(inference_graph_def, name='') File "D:\work\TensorFlow\envs\tensorflow\lib\site-packages\tensorflow\python\util\deprecation.py", line 432, in new_func return func(*args, **kwargs) File "D:\work\TensorFlow\envs\tensorflow\lib\site-packages\tensorflow\python\framework\importer.py", line 442, in import_graph_def _ProcessNewOps(graph) File "D:\work\TensorFlow\envs\tensorflow\lib\site-packages\tensorflow\python\framework\importer.py", line 234, in _ProcessNewOps for new_op in graph._add_new_tf_operations(compute_devices=False): # pylint: disable=protected-access File "D:\work\TensorFlow\envs\tensorflow\lib\site-packages\tensorflow\python\framework\ops.py", line 3563, in _add_new_tf_operations for c_op in c_api_util.new_tf_operations(self) File "D:\work\TensorFlow\envs\tensorflow\lib\site-packages\tensorflow\python\framework\ops.py", line 3563, in for c_op in c_api_util.new_tf_operations(self) File "D:\work\TensorFlow\envs\tensorflow\lib\site-packages\tensorflow\python\framework\ops.py", line 3450, in _create_op_from_tf_operation ret = Operation(c_op, self) File "D:\work\TensorFlow\envs\tensorflow\lib\site-packages\tensorflow\python\framework\ops.py", line 1740, in init self._traceback = self._graph._extract_stack() # pylint: disable=protected-access

NotFoundError (see above for traceback): Failed to create a directory: ; No such file or directory [[Node: save/SaveV2 = SaveV2[dtypes=[DT_FLOAT, DT_FLOAT, DT_FLOAT, DT_FLOAT, DT_FLOAT, ..., DT_FLOAT, DT_FLOAT, DT_FLOAT, DT_FLOAT, DT_INT64], _device="/job:localhost/replica:0/task:0/device:CPU:0"](_arg_save/Const_0_0, save/SaveV2/tensor_names, save/SaveV2/shape_and_slices, BoxPredictor_0/BoxEncodingPredictor/biases/_495, BoxPredictor_0/BoxEncodingPredictor/weights, BoxPredictor_0/ClassPredictor/biases/_497, BoxPredictor_0/ClassPredictor/weights, BoxPredictor_1/BoxEncodingPredictor/biases/_499, BoxPredictor_1/BoxEncodingPredictor/weights, BoxPredictor_1/ClassPredictor/biases/_501, BoxPredictor_1/ClassPredictor/weights, BoxPredictor_2/BoxEncodingPredictor/biases/_503, BoxPredictor_2/BoxEncodingPredictor/weights, BoxPredictor_2/ClassPredictor/biases/_505, BoxPredictor_2/ClassPredictor/weights, BoxPredictor_3/BoxEncodingPredictor/biases/_507, BoxPredictor_3/BoxEncodingPredictor/weights, BoxPredictor_3/ClassPredictor/biases/_509, BoxPredictor_3/ClassPredictor/weights, BoxPredictor_4/BoxEncodingPredictor/biases/_511, BoxPredictor_4/BoxEncodingPredictor/weights, BoxPredictor_4/ClassPredictor/biases/_513, BoxPredictor_4/ClassPredictor/weights, BoxPredictor_5/BoxEncodingPredictor/biases/_515, BoxPredictor_5/BoxEncodingPredictor/weights, BoxPredictor_5/ClassPredictor/biases/_517, BoxPredictor_5/ClassPredictor/weights, FeatureExtractor/MobilenetV1/Conv2d_0/BatchNorm/beta/_519, FeatureExtractor/MobilenetV1/Conv2d_0/BatchNorm/gamma/_521, FeatureExtractor/MobilenetV1/Conv2d_0/BatchNorm/moving_mean/_523, FeatureExtractor/MobilenetV1/Conv2d_0/BatchNorm/moving_variance/_525, FeatureExtractor/MobilenetV1/Conv2d_0/weights, FeatureExtractor/MobilenetV1/Conv2d_10_depthwise/BatchNorm/beta/_527, FeatureExtractor/MobilenetV1/Conv2d_10_depthwise/BatchNorm/gamma/_529, FeatureExtractor/MobilenetV1/Conv2d_10_depthwise/BatchNorm/moving_mean/_531, FeatureExtractor/MobilenetV1/Conv2d_10_depthwise/BatchNorm/moving_variance/_533, FeatureExtractor/MobilenetV1/Conv2d_10_depthwise/depthwise_weights, FeatureExtractor/MobilenetV1/Conv2d_10_pointwise/BatchNorm/beta/_535, FeatureExtractor/MobilenetV1/Conv2d_10_pointwise/BatchNorm/gamma/_537, FeatureExtractor/MobilenetV1/Conv2d_10_pointwise/BatchNorm/moving_mean/_539, FeatureExtractor/MobilenetV1/Conv2d_10_pointwise/BatchNorm/moving_variance/_541, FeatureExtractor/MobilenetV1/Conv2d_10_pointwise/weights, FeatureExtractor/MobilenetV1/Conv2d_11_depthwise/BatchNorm/beta/_543, FeatureExtractor/MobilenetV1/Conv2d_11_depthwise/BatchNorm/gamma/_545, FeatureExtractor/MobilenetV1/Conv2d_11_depthwise/BatchNorm/moving_mean/_547, FeatureExtractor/MobilenetV1/Conv2d_11_depthwise/BatchNorm/moving_variance/_549, FeatureExtractor/MobilenetV1/Conv2d_11_depthwise/depthwise_weights, FeatureExtractor/MobilenetV1/Conv2d_11_pointwise/BatchNorm/beta/_551, FeatureExtractor/MobilenetV1/Conv2d_11_pointwise/BatchNorm/gamma/_553, FeatureExtractor/MobilenetV1/Conv2d_11_pointwise/BatchNorm/moving_mean/_555, FeatureExtractor/MobilenetV1/Conv2d_11_pointwise/BatchNorm/moving_variance/_557, FeatureExtractor/MobilenetV1/Conv2d_11_pointwise/weights, FeatureExtractor/MobilenetV1/Conv2d_12_depthwise/BatchNorm/beta/_559, FeatureExtractor/MobilenetV1/Conv2d_12_depthwise/BatchNorm/gamma/_561, FeatureExtractor/MobilenetV1/Conv2d_12_depthwise/BatchNorm/moving_mean/_563, FeatureExtractor/MobilenetV1/Conv2d_12_depthwise/BatchNorm/moving_variance/_565, FeatureExtractor/MobilenetV1/Conv2d_12_depthwise/depthwise_weights, FeatureExtractor/MobilenetV1/Conv2d_12_pointwise/BatchNorm/beta/_567, FeatureExtractor/MobilenetV1/Conv2d_12_pointwise/BatchNorm/gamma/_569, FeatureExtractor/MobilenetV1/Conv2d_12_pointwise/BatchNorm/moving_mean/_571, FeatureExtractor/MobilenetV1/Conv2d_12_pointwise/BatchNorm/moving_variance/_573, FeatureExtractor/MobilenetV1/Conv2d_12_pointwise/weights, FeatureExtractor/MobilenetV1/Conv2d_13_depthwise/BatchNorm/beta/_575, FeatureExtractor/MobilenetV1/Conv2d_13_depthwise/BatchNorm/gamma/_577, FeatureExtractor/MobilenetV1/Conv2d_13_depthwise/BatchNorm/moving_mean/_579, FeatureExtractor/MobilenetV1/Conv2d_13_depthwise/BatchNorm/moving_variance/_581, FeatureExtractor/MobilenetV1/Conv2d_13_depthwise/depthwise_weights, FeatureExtractor/MobilenetV1/Conv2d_13_pointwise/BatchNorm/beta/_583, FeatureExtractor/MobilenetV1/Conv2d_13_pointwise/BatchNorm/gamma/_585, FeatureExtractor/MobilenetV1/Conv2d_13_pointwise/BatchNorm/moving_mean/_587, FeatureExtractor/MobilenetV1/Conv2d_13_pointwise/BatchNorm/moving_variance/_589, FeatureExtractor/MobilenetV1/Conv2d_13_pointwise/weights, FeatureExtractor/MobilenetV1/Conv2d_13_pointwise_1_Conv2d_2_1x1_256/BatchNorm/beta/_591, FeatureExtractor/MobilenetV1/Conv2d_13_pointwise_1_Conv2d_2_1x1_256/BatchNorm/gamma/_593, FeatureExtractor/MobilenetV1/Conv2d_13_pointwise_1_Conv2d_2_1x1_256/BatchNorm/moving_mean/_595, FeatureExtractor/MobilenetV1/Conv2d_13_pointwise_1_Conv2d_2_1x1_256/BatchNorm/moving_variance/_597, FeatureExtractor/MobilenetV1/Conv2d_13_pointwise_1_Conv2d_2_1x1_256/weights, FeatureExtractor/MobilenetV1/Conv2d_13_pointwise_1_Conv2d_3_1x1_128/BatchNorm/beta/_599, FeatureExtractor/MobilenetV1/Conv2d_13_pointwise_1_Conv2d_3_1x1_128/BatchNorm/gamma/_601, FeatureExtractor/MobilenetV1/Conv2d_13_pointwise_1_Conv2d_3_1x1_128/BatchNorm/moving_mean/_603, FeatureExtractor/MobilenetV1/Conv2d_13_pointwise_1_Conv2d_3_1x1_128/BatchNorm/moving_variance/_605, FeatureExtractor/MobilenetV1/Conv2d_13_pointwise_1_Conv2d_3_1x1_128/weights, FeatureExtractor/MobilenetV1/Conv2d_13_pointwise_1_Conv2d_4_1x1_128/BatchNorm/beta/_607, FeatureExtractor/MobilenetV1/Conv2d_13_pointwise_1_Conv2d_4_1x1_128/BatchNorm/gamma/_609, FeatureExtractor/MobilenetV1/Conv2d_13_pointwise_1_Conv2d_4_1x1_128/BatchNorm/moving_mean/_611, FeatureExtractor/MobilenetV1/Conv2d_13_pointwise_1_Conv2d_4_1x1_128/BatchNorm/moving_variance/_613, FeatureExtractor/MobilenetV1/Conv2d_13_pointwise_1_Conv2d_4_1x1_128/weights, FeatureExtractor/MobilenetV1/Conv2d_13_pointwise_1_Conv2d_5_1x1_64/BatchNorm/beta/_615, FeatureExtractor/MobilenetV1/Conv2d_13_pointwise_1_Conv2d_5_1x1_64/BatchNorm/gamma/_617, FeatureExtractor/MobilenetV1/Conv2d_13_pointwise_1_Conv2d_5_1x1_64/BatchNorm/moving_mean/_619, FeatureExtractor/MobilenetV1/Conv2d_13_pointwise_1_Conv2d_5_1x1_64/BatchNorm/moving_variance/_621, FeatureExtractor/MobilenetV1/Conv2d_13_pointwise_1_Conv2d_5_1x1_64/weights, FeatureExtractor/MobilenetV1/Conv2d_13_pointwise_2_Conv2d_2_3x3_s2_512/BatchNorm/beta/_623, FeatureExtractor/MobilenetV1/Conv2d_13_pointwise_2_Conv2d_2_3x3_s2_512/BatchNorm/gamma/_625, FeatureExtractor/MobilenetV1/Conv2d_13_pointwise_2_Conv2d_2_3x3_s2_512/BatchNorm/moving_mean/_627, FeatureExtractor/MobilenetV1/Conv2d_13_pointwise_2_Conv2d_2_3x3_s2_512/BatchNorm/moving_variance/_629, FeatureExtractor/MobilenetV1/Conv2d_13_pointwise_2_Conv2d_2_3x3_s2_512/weights, FeatureExtractor/MobilenetV1/Conv2d_13_pointwise_2_Conv2d_3_3x3_s2_256/BatchNorm/beta/_631, FeatureExtractor/MobilenetV1/Conv2d_13_pointwise_2_Conv2d_3_3x3_s2_256/BatchNorm/gamma/_633, FeatureExtractor/MobilenetV1/Conv2d_13_pointwise_2_Conv2d_3_3x3_s2_256/BatchNorm/moving_mean/_635, FeatureExtractor/MobilenetV1/Conv2d_13_pointwise_2_Conv2d_3_3x3_s2_256/BatchNorm/moving_variance/_637, FeatureExtractor/MobilenetV1/Conv2d_13_pointwise_2_Conv2d_3_3x3_s2_256/weights, FeatureExtractor/MobilenetV1/Conv2d_13_pointwise_2_Conv2d_4_3x3_s2_256/BatchNorm/beta/_639, FeatureExtractor/MobilenetV1/Conv2d_13_pointwise_2_Conv2d_4_3x3_s2_256/BatchNorm/gamma/_641, FeatureExtractor/MobilenetV1/Conv2d_13_pointwise_2_Conv2d_4_3x3_s2_256/BatchNorm/moving_mean/_643, FeatureExtractor/MobilenetV1/Conv2d_13_pointwise_2_Conv2d_4_3x3_s2_256/BatchNorm/moving_variance/_645, FeatureExtractor/MobilenetV1/Conv2d_13_pointwise_2_Conv2d_4_3x3_s2_256/weights, FeatureExtractor/MobilenetV1/Conv2d_13_pointwise_2_Conv2d_5_3x3_s2_128/BatchNorm/beta/_647, FeatureExtractor/MobilenetV1/Conv2d_13_pointwise_2_Conv2d_5_3x3_s2_128/BatchNorm/gamma/_649, FeatureExtractor/MobilenetV1/Conv2d_13_pointwise_2_Conv2d_5_3x3_s2_128/BatchNorm/moving_mean/_651, FeatureExtractor/MobilenetV1/Conv2d_13_pointwise_2_Conv2d_5_3x3_s2_128/BatchNorm/moving_variance/_653, FeatureExtractor/MobilenetV1/Conv2d_13_pointwise_2_Conv2d_5_3x3_s2_128/weights, FeatureExtractor/MobilenetV1/Conv2d_1_depthwise/BatchNorm/beta/_655, FeatureExtractor/MobilenetV1/Conv2d_1_depthwise/BatchNorm/gamma/_657, FeatureExtractor/MobilenetV1/Conv2d_1_depthwise/BatchNorm/moving_mean/_659, FeatureExtractor/MobilenetV1/Conv2d_1_depthwise/BatchNorm/moving_variance/_661, FeatureExtractor/MobilenetV1/Conv2d_1_depthwise/depthwise_weights, FeatureExtractor/MobilenetV1/Conv2d_1_pointwise/BatchNorm/beta/_663, FeatureExtractor/MobilenetV1/Conv2d_1_pointwise/BatchNorm/gamma/_665, FeatureExtractor/MobilenetV1/Conv2d_1_pointwise/BatchNorm/moving_mean/_667, FeatureExtractor/MobilenetV1/Conv2d_1_pointwise/BatchNorm/moving_variance/_669, FeatureExtractor/MobilenetV1/Conv2d_1_pointwise/weights, FeatureExtractor/MobilenetV1/Conv2d_2_depthwise/BatchNorm/beta/_671, FeatureExtractor/MobilenetV1/Conv2d_2_depthwise/BatchNorm/gamma/_673, FeatureExtractor/MobilenetV1/Conv2d_2_depthwise/BatchNorm/moving_mean/_675, FeatureExtractor/MobilenetV1/Conv2d_2_depthwise/BatchNorm/moving_variance/_677, FeatureExtractor/MobilenetV1/Conv2d_2_depthwise/depthwise_weights, FeatureExtractor/MobilenetV1/Conv2d_2_pointwise/BatchNorm/beta/_679, FeatureExtractor/MobilenetV1/Conv2d_2_pointwise/BatchNorm/gamma/_681, FeatureExtractor/MobilenetV1/Conv2d_2_pointwise/BatchNorm/moving_mean/_683, FeatureExtractor/MobilenetV1/Conv2d_2_pointwise/BatchNorm/moving_variance/_685, FeatureExtractor/MobilenetV1/Conv2d_2_pointwise/weights, FeatureExtractor/MobilenetV1/Conv2d_3_depthwise/BatchNorm/beta/_687, FeatureExtractor/MobilenetV1/Conv2d_3_depthwise/BatchNorm/gamma/_689, FeatureExtractor/MobilenetV1/Conv2d_3_depthwise/BatchNorm/moving_mean/_691, FeatureExtractor/MobilenetV1/Conv2d_3_depthwise/BatchNorm/moving_variance/_693, FeatureExtractor/MobilenetV1/Conv2d_3_depthwise/depthwise_weights, FeatureExtractor/MobilenetV1/Conv2d_3_pointwise/BatchNorm/beta/_695, FeatureExtractor/MobilenetV1/Conv2d_3_pointwise/BatchNorm/gamma/_697, FeatureExtractor/MobilenetV1/Conv2d_3_pointwise/BatchNorm/moving_mean/_699, FeatureExtractor/MobilenetV1/Conv2d_3_pointwise/BatchNorm/moving_variance/_701, FeatureExtractor/MobilenetV1/Conv2d_3_pointwise/weights, FeatureExtractor/MobilenetV1/Conv2d_4_depthwise/BatchNorm/beta/_703, FeatureExtractor/MobilenetV1/Conv2d_4_depthwise/BatchNorm/gamma/_705, FeatureExtractor/MobilenetV1/Conv2d_4_depthwise/BatchNorm/moving_mean/_707, FeatureExtractor/MobilenetV1/Conv2d_4_depthwise/BatchNorm/moving_variance/_709, FeatureExtractor/MobilenetV1/Conv2d_4_depthwise/depthwise_weights, FeatureExtractor/MobilenetV1/Conv2d_4_pointwise/BatchNorm/beta/_711, FeatureExtractor/MobilenetV1/Conv2d_4_pointwise/BatchNorm/gamma/_713, FeatureExtractor/MobilenetV1/Conv2d_4_pointwise/BatchNorm/moving_mean/_715, FeatureExtractor/MobilenetV1/Conv2d_4_pointwise/BatchNorm/moving_variance/_717, FeatureExtractor/MobilenetV1/Conv2d_4_pointwise/weights, FeatureExtractor/MobilenetV1/Conv2d_5_depthwise/BatchNorm/beta/_719, FeatureExtractor/MobilenetV1/Conv2d_5_depthwise/BatchNorm/gamma/_721, FeatureExtractor/MobilenetV1/Conv2d_5_depthwise/BatchNorm/moving_mean/_723, FeatureExtractor/MobilenetV1/Conv2d_5_depthwise/BatchNorm/moving_variance/_725, FeatureExtractor/MobilenetV1/Conv2d_5_depthwise/depthwise_weights, FeatureExtractor/MobilenetV1/Conv2d_5_pointwise/BatchNorm/beta/_727, FeatureExtractor/MobilenetV1/Conv2d_5_pointwise/BatchNorm/gamma/_729, FeatureExtractor/MobilenetV1/Conv2d_5_pointwise/BatchNorm/moving_mean/_731, FeatureExtractor/MobilenetV1/Conv2d_5_pointwise/BatchNorm/moving_variance/_733, FeatureExtractor/MobilenetV1/Conv2d_5_pointwise/weights, FeatureExtractor/MobilenetV1/Conv2d_6_depthwise/BatchNorm/beta/_735, FeatureExtractor/MobilenetV1/Conv2d_6_depthwise/BatchNorm/gamma/_737, FeatureExtractor/MobilenetV1/Conv2d_6_depthwise/BatchNorm/moving_mean/_739, FeatureExtractor/MobilenetV1/Conv2d_6_depthwise/BatchNorm/moving_variance/_741, FeatureExtractor/MobilenetV1/Conv2d_6_depthwise/depthwise_weights, FeatureExtractor/MobilenetV1/Conv2d_6_pointwise/BatchNorm/beta/_743, FeatureExtractor/MobilenetV1/Conv2d_6_pointwise/BatchNorm/gamma/_745, FeatureExtractor/MobilenetV1/Conv2d_6_pointwise/BatchNorm/moving_mean/_747, FeatureExtractor/MobilenetV1/Conv2d_6_pointwise/BatchNorm/moving_variance/_749, FeatureExtractor/MobilenetV1/Conv2d_6_pointwise/weights, FeatureExtractor/MobilenetV1/Conv2d_7_depthwise/BatchNorm/beta/_751, FeatureExtractor/MobilenetV1/Conv2d_7_depthwise/BatchNorm/gamma/_753, FeatureExtractor/MobilenetV1/Conv2d_7_depthwise/BatchNorm/moving_mean/_755, FeatureExtractor/MobilenetV1/Conv2d_7_depthwise/BatchNorm/moving_variance/_757, FeatureExtractor/MobilenetV1/Conv2d_7_depthwise/depthwise_weights, FeatureExtractor/MobilenetV1/Conv2d_7_pointwise/BatchNorm/beta/_759, FeatureExtractor/MobilenetV1/Conv2d_7_pointwise/BatchNorm/gamma/_761, FeatureExtractor/MobilenetV1/Conv2d_7_pointwise/BatchNorm/moving_mean/_763, FeatureExtractor/MobilenetV1/Conv2d_7_pointwise/BatchNorm/moving_variance/_765, FeatureExtractor/MobilenetV1/Conv2d_7_pointwise/weights, FeatureExtractor/MobilenetV1/Conv2d_8_depthwise/BatchNorm/beta/_767, FeatureExtractor/MobilenetV1/Conv2d_8_depthwise/BatchNorm/gamma/_769, FeatureExtractor/MobilenetV1/Conv2d_8_depthwise/BatchNorm/moving_mean/_771, FeatureExtractor/MobilenetV1/Conv2d_8_depthwise/BatchNorm/moving_variance/_773, FeatureExtractor/MobilenetV1/Conv2d_8_depthwise/depthwise_weights, FeatureExtractor/MobilenetV1/Conv2d_8_pointwise/BatchNorm/beta/_775, FeatureExtractor/MobilenetV1/Conv2d_8_pointwise/BatchNorm/gamma/_777, FeatureExtractor/MobilenetV1/Conv2d_8_pointwise/BatchNorm/moving_mean/_779, FeatureExtractor/MobilenetV1/Conv2d_8_pointwise/BatchNorm/moving_variance/_781, FeatureExtractor/MobilenetV1/Conv2d_8_pointwise/weights, FeatureExtractor/MobilenetV1/Conv2d_9_depthwise/BatchNorm/beta/_783, FeatureExtractor/MobilenetV1/Conv2d_9_depthwise/BatchNorm/gamma/_785, FeatureExtractor/MobilenetV1/Conv2d_9_depthwise/BatchNorm/moving_mean/_787, FeatureExtractor/MobilenetV1/Conv2d_9_depthwise/BatchNorm/moving_variance/_789, FeatureExtractor/MobilenetV1/Conv2d_9_depthwise/depthwise_weights, FeatureExtractor/MobilenetV1/Conv2d_9_pointwise/BatchNorm/beta/_791, FeatureExtractor/MobilenetV1/Conv2d_9_pointwise/BatchNorm/gamma/_793, FeatureExtractor/MobilenetV1/Conv2d_9_pointwise/BatchNorm/moving_mean/_795, FeatureExtractor/MobilenetV1/Conv2d_9_pointwise/BatchNorm/moving_variance/_797, FeatureExtractor/MobilenetV1/Conv2d_9_pointwise/weights, global_step/_799)]]

During handling of the above exception, another exception occurred:

Traceback (most recent call last): File "export_inference_graph.py", line 150, in tf.app.run() File "D:\work\TensorFlow\envs\tensorflow\lib\site-packages\tensorflow\python\platform\app.py", line 125, in run _sys.exit(main(argv)) File "export_inference_graph.py", line 146, in main FLAGS.write_inference_graph) File "D:\work\TensorFlow\envs\tensorflow\lib\site-packages\object_detection-0.1-py3.6.egg\object_detection\exporter.py", line 474, in export_inference_graph write_inference_graph=write_inference_graph) File "D:\work\TensorFlow\envs\tensorflow\lib\site-packages\object_detection-0.1-py3.6.egg\object_detection\exporter.py", line 409, in _export_inference_graph trained_checkpoint_prefix=checkpoint_to_use) File "D:\work\TensorFlow\envs\tensorflow\lib\site-packages\object_detection-0.1-py3.6.egg\object_detection\exporter.py", line 322, in write_graph_and_checkpoint saver.save(sess, model_path) File "D:\work\TensorFlow\envs\tensorflow\lib\site-packages\tensorflow\python\training\saver.py", line 1669, in save raise exc ValueError: Parent directory of model.ckpt doesn't exist, can't save.

The models I use are ssd_mobilenet_v1_coco_2018_01_28 and ssd_mobilenet_v1_coco.config.

pkulzc commented 4 years ago

I think you may have used a wrong checkpoint path. Pleas share your command line instead of put all these long logs to the description.

hydra-vi commented 3 years ago

### I am running this code and getting error @pkulzc

import tensorflow as tf from Data_Handler import build_data_subsets

Function to measure accuracy by comparing model output to the correct answers

If the max value for the actual and expected values is in the same position then answer is correct, otherwise not

def measure_accuracy(actual, expected): num_correct = 0 for i in range(len(actual)): actual_value = actual[i] expected_value = expected[i] if actual_value[0] >= actual_value[1] and expected_value[0] >= expected_value[1]: num_correct += 1 elif actual_value[0] <= actual_value[1] and expected_value[0] <= expected_value[1]: num_correct += 1 return (num_correct / len(actual)) * 100

x_train, y_train = build_data_subsets('AAPL', '20180101', '20180205') x_test, y_test = build_data_subsets('AAPL', '20180205', '20180215')

y = Wx + b

Input into the model, any number of 5 element (factor) arrays

x_input = tf.placeholder(dtype=tf.float32, shape=[None, 5], name='x_input')

Input into the model for training purposes only, use to show model what correct answer is

y_input = tf.placeholder(dtype=tf.float32, shape=[None, 2], name='y_input')

Weights variable to be changed during training

W = tf.Variable(initial_value=tf.ones(shape=[5, 2]))

Biases variable to be changed during training

b = tf.Variable(initial_value=tf.ones(shape=[2]))

Output from the model, multiplies weight and input and adds bias

y_output = tf.add(tf.matmul(x_input, W), b, name='y_output')

Loss function measures the difference between actual and expected outputs

loss = tf.reduce_sum(tf.reduce_mean(tf.nn.softmax_cross_entropy_with_logits(labels=y_input, logits=y_output)))

Optimizer aims at minimizing loss by changing variable node values

optimizer = tf.train.AdamOptimizer(0.01).minimize(loss)

Saver variable used to save graph def

saver = tf.train.Saver()

Session variable used to evaluate nodes

session = tf.Session() session.run(tf.global_variables_initializer())

Write the graph definition to a pbtxt file (node names, shapes, etc.)

tf.train.write_graph(session.graph_def, '.', 'stock_prediction.pbtxt', False)

Train the model by running through training data 20000 times

for _ in range(20000): session.run(optimizer, feed_dict={x_input: x_train, y_input: y_train})

Save the model with all of the trained values at the nodes into a ckpt file

saver.save(session, save_path='stock_prediction.ckpt')

Measure the accuracy of training and testing sets

print(measure_accuracy(session.run(y_output, feed_dict={x_input: x_train}), y_train)) print(measure_accuracy(session.run(y_output, feed_dict={x_input: x_test}), y_test))

### I am getting this error while running the above code****

saver.save(session, save_path='stock_prediction.ckpt') Traceback (most recent call last):

File "C:\Anaconda3\envs\py36\lib\site-packages\tensorflow\python\client\session.py", line 1139, in _do_call return fn(*args)

File "C:\Anaconda3\envs\py36\lib\site-packages\tensorflow\python\client\session.py", line 1121, in _run_fn status, run_metadata)

File "C:\Anaconda3\envs\py36\lib\contextlib.py", line 88, in exit next(self.gen)

File "C:\Anaconda3\envs\py36\lib\site-packages\tensorflow\python\framework\errors_impl.py", line 466, in raise_exception_on_not_ok_status pywrap_tensorflow.TF_GetCode(status))

NotFoundError: Failed to create a directory: [[Node: save/SaveV2 = SaveV2[dtypes=[DT_FLOAT, DT_FLOAT, DT_FLOAT, DT_FLOAT, DT_FLOAT, DT_FLOAT, DT_FLOAT, DT_FLOAT], _device="/job:localhost/replica:0/task:0/cpu:0"](_arg_save/Const_0_0, save/SaveV2/tensor_names, save/SaveV2/shape_and_slices, Variable, Variable/Adam, Variable/Adam_1, Variable_1, Variable_1/Adam, Variable_1/Adam_1, beta1_power, beta2_power)]]

During handling of the above exception, another exception occurred:

Traceback (most recent call last):

File "C:\Anaconda3\envs\py36\lib\site-packages\tensorflow\python\training\saver.py", line 1472, in save {self.saver_def.filename_tensor_name: checkpoint_file})

File "C:\Anaconda3\envs\py36\lib\site-packages\tensorflow\python\client\session.py", line 789, in run run_metadata_ptr)

File "C:\Anaconda3\envs\py36\lib\site-packages\tensorflow\python\client\session.py", line 997, in _run feed_dict_string, options, run_metadata)

File "C:\Anaconda3\envs\py36\lib\site-packages\tensorflow\python\client\session.py", line 1132, in _do_run target_list, options, run_metadata)

File "C:\Anaconda3\envs\py36\lib\site-packages\tensorflow\python\client\session.py", line 1152, in _do_call raise type(e)(node_def, op, message)

NotFoundError: Failed to create a directory: [[Node: save/SaveV2 = SaveV2[dtypes=[DT_FLOAT, DT_FLOAT, DT_FLOAT, DT_FLOAT, DT_FLOAT, DT_FLOAT, DT_FLOAT, DT_FLOAT], _device="/job:localhost/replica:0/task:0/cpu:0"](_arg_save/Const_0_0, save/SaveV2/tensor_names, save/SaveV2/shape_and_slices, Variable, Variable/Adam, Variable/Adam_1, Variable_1, Variable_1/Adam, Variable_1/Adam_1, beta1_power, beta2_power)]]

Caused by op 'save/SaveV2', defined at: File "C:\Anaconda3\envs\py36\lib\runpy.py", line 193, in _run_module_as_main "main", mod_spec) File "C:\Anaconda3\envs\py36\lib\runpy.py", line 85, in _run_code exec(code, run_globals) File "C:\Anaconda3\envs\py36\lib\site-packages\spyder_kernels\console__main.py", line 23, in start.main() File "C:\Anaconda3\envs\py36\lib\site-packages\spyder_kernels\console\start.py", line 332, in main kernel.start() File "C:\Anaconda3\envs\py36\lib\site-packages\ipykernel\kernelapp.py", line 612, in start self.io_loop.start() File "C:\Anaconda3\envs\py36\lib\site-packages\tornado\platform\asyncio.py", line 149, in start self.asyncio_loop.run_forever() File "C:\Anaconda3\envs\py36\lib\asyncio\base_events.py", line 442, in run_forever self._run_once() File "C:\Anaconda3\envs\py36\lib\asyncio\base_events.py", line 1462, in _run_once handle._run() File "C:\Anaconda3\envs\py36\lib\asyncio\events.py", line 145, in _run self._callback(self._args) File "C:\Anaconda3\envs\py36\lib\site-packages\tornado\ioloop.py", line 690, in lambda f: self._run_callback(functools.partial(callback, future)) File "C:\Anaconda3\envs\py36\lib\site-packages\tornado\ioloop.py", line 743, in _run_callback ret = callback() File "C:\Anaconda3\envs\py36\lib\site-packages\tornado\gen.py", line 787, in inner self.run() File "C:\Anaconda3\envs\py36\lib\site-packages\tornado\gen.py", line 748, in run yielded = self.gen.send(value) File "C:\Anaconda3\envs\py36\lib\site-packages\ipykernel\kernelbase.py", line 365, in process_one yield gen.maybe_future(dispatch(args)) File "C:\Anaconda3\envs\py36\lib\site-packages\tornado\gen.py", line 209, in wrapper yielded = next(result) File "C:\Anaconda3\envs\py36\lib\site-packages\ipykernel\kernelbase.py", line 268, in dispatch_shell yield gen.maybe_future(handler(stream, idents, msg)) File "C:\Anaconda3\envs\py36\lib\site-packages\tornado\gen.py", line 209, in wrapper yielded = next(result) File "C:\Anaconda3\envs\py36\lib\site-packages\ipykernel\kernelbase.py", line 545, in execute_request user_expressions, allow_stdin, File "C:\Anaconda3\envs\py36\lib\site-packages\tornado\gen.py", line 209, in wrapper yielded = next(result) File "C:\Anaconda3\envs\py36\lib\site-packages\ipykernel\ipkernel.py", line 306, in do_execute res = shell.run_cell(code, store_history=store_history, silent=silent) File "C:\Anaconda3\envs\py36\lib\site-packages\ipykernel\zmqshell.py", line 536, in run_cell return super(ZMQInteractiveShell, self).run_cell(*args, **kwargs) File "C:\Anaconda3\envs\py36\lib\site-packages\IPython\core\interactiveshell.py", line 2867, in run_cell raw_cell, store_history, silent, shell_futures) File "C:\Anaconda3\envs\py36\lib\site-packages\IPython\core\interactiveshell.py", line 2895, in _run_cell return runner(coro) File "C:\Anaconda3\envs\py36\lib\site-packages\IPython\core\async_helpers.py", line 68, in _pseudo_sync_runner coro.send(None) File "C:\Anaconda3\envs\py36\lib\site-packages\IPython\core\interactiveshell.py", line 3072, in run_cell_async interactivity=interactivity, compiler=compiler, result=result) File "C:\Anaconda3\envs\py36\lib\site-packages\IPython\core\interactiveshell.py", line 3263, in run_ast_nodes if (await self.runcode(code, result, async=asy)): File "C:\Anaconda3\envs\py36\lib\site-packages\IPython\core\interactiveshell.py", line 3343, in run_code exec(code_obj, self.user_global_ns, self.user_ns) File "", line 1, in saver = tf.train.Saver() File "C:\Anaconda3\envs\py36\lib\site-packages\tensorflow\python\training\saver.py", line 1139, in init self.build() File "C:\Anaconda3\envs\py36\lib\site-packages\tensorflow\python\training\saver.py", line 1170, in build restore_sequentially=self._restore_sequentially) File "C:\Anaconda3\envs\py36\lib\site-packages\tensorflow\python\training\saver.py", line 689, in build save_tensor = self._AddSaveOps(filename_tensor, saveables) File "C:\Anaconda3\envs\py36\lib\site-packages\tensorflow\python\training\saver.py", line 276, in _AddSaveOps save = self.save_op(filename_tensor, saveables) File "C:\Anaconda3\envs\py36\lib\site-packages\tensorflow\python\training\saver.py", line 219, in save_op tensors) File "C:\Anaconda3\envs\py36\lib\site-packages\tensorflow\python\ops\gen_io_ops.py", line 745, in save_v2 tensors=tensors, name=name) File "C:\Anaconda3\envs\py36\lib\site-packages\tensorflow\python\framework\op_def_library.py", line 767, in apply_op op_def=op_def) File "C:\Anaconda3\envs\py36\lib\site-packages\tensorflow\python\framework\ops.py", line 2506, in create_op original_op=self._default_original_op, op_def=op_def) File "C:\Anaconda3\envs\py36\lib\site-packages\tensorflow\python\framework\ops.py", line 1269, in init__ self._traceback = _extract_stack()

NotFoundError (see above for traceback): Failed to create a directory: [[Node: save/SaveV2 = SaveV2[dtypes=[DT_FLOAT, DT_FLOAT, DT_FLOAT, DT_FLOAT, DT_FLOAT, DT_FLOAT, DT_FLOAT, DT_FLOAT], _device="/job:localhost/replica:0/task:0/cpu:0"](_arg_save/Const_0_0, save/SaveV2/tensor_names, save/SaveV2/shape_and_slices, Variable, Variable/Adam, Variable/Adam_1, Variable_1, Variable_1/Adam, Variable_1/Adam_1, beta1_power, beta2_power)]]

During handling of the above exception, another exception occurred:

Traceback (most recent call last):

File "", line 1, in saver.save(session, save_path='stock_prediction.ckpt')

File "C:\Anaconda3\envs\py36\lib\site-packages\tensorflow\python\training\saver.py", line 1488, in save raise exc

ValueError: Parent directory of stock_prediction.ckpt doesn't exist, can't save.

2020-09-04 12:30:40.223102: W c:\tf_jenkins\home\workspace\release-win\m\windows\py\36\tensorflow\core\platform\cpu_feature_guard.cc:45] The TensorFlow library wasn't compiled to use SSE instructions, but these are available on your machine and could speed up CPU computations. 2020-09-04 12:30:40.223386: W c:\tf_jenkins\home\workspace\release-win\m\windows\py\36\tensorflow\core\platform\cpu_feature_guard.cc:45] The TensorFlow library wasn't compiled to use SSE2 instructions, but these are available on your machine and could speed up CPU computations. 2020-09-04 12:30:40.223441: W c:\tf_jenkins\home\workspace\release-win\m\windows\py\36\tensorflow\core\platform\cpu_feature_guard.cc:45] The TensorFlow library wasn't compiled to use SSE3 instructions, but these are available on your machine and could speed up CPU computations. 2020-09-04 12:30:40.223741: W c:\tf_jenkins\home\workspace\release-win\m\windows\py\36\tensorflow\core\platform\cpu_feature_guard.cc:45] The TensorFlow library wasn't compiled to use SSE4.1 instructions, but these are available on your machine and could speed up CPU computations. 2020-09-04 12:30:40.223762: W c:\tf_jenkins\home\workspace\release-win\m\windows\py\36\tensorflow\core\platform\cpu_feature_guard.cc:45] The TensorFlow library wasn't compiled to use SSE4.2 instructions, but these are available on your machine and could speed up CPU computations. 2020-09-04 12:30:40.223778: W c:\tf_jenkins\home\workspace\release-win\m\windows\py\36\tensorflow\core\platform\cpu_feature_guard.cc:45] The TensorFlow library wasn't compiled to use AVX instructions, but these are available on your machine and could speed up CPU computations. 2020-09-04 12:30:40.223792: W c:\tf_jenkins\home\workspace\release-win\m\windows\py\36\tensorflow\core\platform\cpu_feature_guard.cc:45] The TensorFlow library wasn't compiled to use AVX2 instructions, but these are available on your machine and could speed up CPU computations. 2020-09-04 12:30:40.223805: W c:\tf_jenkins\home\workspace\release-win\m\windows\py\36\tensorflow\core\platform\cpu_feature_guard.cc:45] The TensorFlow library wasn't compiled to use FMA instructions, but these are available on your machine and could speed up CPU computations. 2020-09-04 12:55:42.855627: W c:\tf_jenkins\home\workspace\release-win\m\windows\py\36\tensorflow\core\framework\op_kernel.cc:1158] Not found: Failed to create a directory: