Open shenrsc opened 1 year ago
The error is caused because num_data is zero. Please check here https://github.com/tccoin/image-based-indoor-localization/blob/160a81b6d4f5e0ad7efc5c4a53da287f242199b5/image_based_localization/siamese_network/train.py#L270
When I am on the fourth step:Train the model and run python image_based_localization/siamese_network/train.py The program met a breakdown. errors are shown as below: The full errors can be seen in the picture
WARNING:tensorflow:AutoGraph could not transform <function parse_function at 0x7f80c8fc8a60> and will run it as-is. Please report this to the TensorFlow team. When filing the bug, set the verbosity to 10 (on Linux,
train.train()
File "/home/shen/UM-MS-study/ROB530/image-based-indoor-localization/image_based_localization/siamese_network/train.py", line 273, in train
te_pairs, te_y = self.valid_pairs_generator(
File "/home/shen/UM-MS-study/ROB530/image-based-indoor-localization/image_based_localization/siamese_network/train.py", line 152, in valid_pairs_generator
i = random.randrange(0, num_data - 1)
File "/home/shen/anaconda3/envs/tf/lib/python3.9/random.py", line 316, in randrange
raise ValueError("empty range for randrange() (%d, %d, %d)" % (istart, istop, width))
ValueError: empty range for randrange() (0, -1, -1)
export AUTOGRAPH_VERBOSITY=10
) and attach the full output. Cause: module 'gast' has no attribute 'Index' To silence this warning, decorate the function with @tf.autograph.experimental.do_not_convert 2023-03-16 19:38:42.859210: I tensorflow/compiler/mlir/mlir_graph_optimization_pass.cc:116] None of the MLIR optimization passes are enabled (registered 2) 2023-03-16 19:38:42.880150: I tensorflow/core/platform/profile_utils/cpu_utils.cc:112] CPU Frequency: 2599990000 Hz Traceback (most recent call last): File "/home/shen/UM-MS-study/ROB530/image-based-indoor-localization/image_based_localization/siamese_network/train.py", line 387, in