Я хочу использовать мою специально обученную модель на Unity. Я обучил модель, используя Tensorflow v1.13.1, и я изменил .pb на байты, но я не мог использовать свою модель. Я думаю, Unity работает Tensorflow 1.7.1. Что бы я ни пытался обучить модели с Tensorflow 1.7.1, но я получил это сообщение.
TypeError: resize_images() got an unexpected keyword argument 'preserve_aspect_ratio'
После этого сообщения об ошибке я просто удалил переменную preserve_aspect_ratio, но она у меня не сработала. Я получил это сообщение об ошибке.
(tensorflow1) C:\tensorflow\models\research\object_detection>python train.py --logtostderr --train_dir=training/ --pipeline_config_path=training/faster_rcnn_inception_v2_pets.config
WARNING:tensorflow:From C:\Users\asus\Anaconda3\envs\tensorflow1\lib\site-packages\tensorflow\python\platform\app.py:126: main (from __main__) is deprecated and will be removed in a future version.
Instructions for updating:
Use object_detection/model_main.py.
WARNING:tensorflow:From C:\tensorflow\models\research\object_detection\legacy\trainer.py:266: 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.create_global_step
WARNING:tensorflow:num_readers has been reduced to 1 to match input file shards.
INFO:tensorflow:Scale of 0 disables regularizer.
INFO:tensorflow:Scale of 0 disables regularizer.
INFO:tensorflow:depth of additional conv before box predictor: 0
Traceback (most recent call last):
File "train.py", line 184, in <module>
tf.app.run()
File "C:\Users\asus\Anaconda3\envs\tensorflow1\lib\site-packages\tensorflow\python\platform\app.py", line 126, in run
_sys.exit(main(argv))
File "C:\Users\asus\Anaconda3\envs\tensorflow1\lib\site-packages\tensorflow\python\util\deprecation.py", line 250, in new_func
return func(*args, **kwargs)
File "train.py", line 180, in main
graph_hook_fn=graph_rewriter_fn)
File "C:\tensorflow\models\research\object_detection\legacy\trainer.py", line 291, in train
clones = model_deploy.create_clones(deploy_config, model_fn, [input_queue])
File "C:\tensorflow\models\research\slim\deployment\model_deploy.py", line 193, in create_clones
outputs = model_fn(*args, **kwargs)
File "C:\tensorflow\models\research\object_detection\legacy\trainer.py", line 204, in _create_losses
prediction_dict = detection_model.predict(images, true_image_shapes)
File "C:\tensorflow\models\research\object_detection\meta_architectures\faster_rcnn_meta_arch.py", line 688, in predict
self._anchors.get(), image_shape, true_image_shapes))
File "C:\tensorflow\models\research\object_detection\meta_architectures\faster_rcnn_meta_arch.py", line 775, in _predict_second_stage
anchors, image_shape_2d, true_image_shapes)
File "C:\tensorflow\models\research\object_detection\meta_architectures\faster_rcnn_meta_arch.py", line 1295, in _postprocess_rpn
clip_window=clip_window)
File "C:\tensorflow\models\research\object_detection\core\post_processing.py", line 478, in batch_multiclass_non_max_suppression
parallel_iterations=parallel_iterations)
File "C:\tensorflow\models\research\object_detection\utils\shape_utils.py", line 228, in static_or_dynamic_map_fn
return tf.map_fn(fn, elems, dtype, parallel_iterations, back_prop)
File "C:\Users\asus\Anaconda3\envs\tensorflow1\lib\site-packages\tensorflow\python\ops\functional_ops.py", line 413, in map_fn
swap_memory=swap_memory)
File "C:\Users\asus\Anaconda3\envs\tensorflow1\lib\site-packages\tensorflow\python\ops\control_flow_ops.py", line 3202, in while_loop
result = loop_context.BuildLoop(cond, body, loop_vars, shape_invariants)
File "C:\Users\asus\Anaconda3\envs\tensorflow1\lib\site-packages\tensorflow\python\ops\control_flow_ops.py", line 2940, in BuildLoop
pred, body, original_loop_vars, loop_vars, shape_invariants)
File "C:\Users\asus\Anaconda3\envs\tensorflow1\lib\site-packages\tensorflow\python\ops\control_flow_ops.py", line 2877, in _BuildLoop
body_result = body(*packed_vars_for_body)
File "C:\Users\asus\Anaconda3\envs\tensorflow1\lib\site-packages\tensorflow\python\ops\functional_ops.py", line 403, in compute
packed_fn_values = fn(packed_values)
File "C:\tensorflow\models\research\object_detection\core\post_processing.py", line 452, in _single_image_nms_fn
additional_fields=per_image_additional_fields)
File "C:\tensorflow\models\research\object_detection\core\post_processing.py", line 170, in multiclass_non_max_suppression
score_threshold=score_thresh)
TypeError: non_max_suppression() got an unexpected keyword argument 'score_threshold'
Что мне делать?