Closed RoboEvangelist closed 4 years ago
@RoboEvangelist Will try tf2 when I have enough spare time. No time for that recently:)
I see. If I get any progress on that myself, I'll let you know. Thanks
@RoboEvangelist Welcome:)
I'm trying to convert the code to tensorflow 2 with the help of the migration tool of Google. I do this because I would like to train the lanenet on RTX 3070, which always has problem with tensorflow 1.x since the cuda version can only be higher than 11.1. However, there was one problem I couldn't solve. The error message is in the following:
Traceback (most recent call last):
File "E:/Work/02_IntellCar/LaneDetection/fromGithub/lanenet-lane-detection/train_lanenet_tusimple.py", line 40, in
I didn't have this problem with tensorflow 1.14.0. And I haven't seen anywhere this usage with make_one_shot_iterator.get_next(). Mostly, there is no argument inside the get_next().
Can anyone help me with this problem? Many thanks in advance!
@Holzpferd Must be tf version problem. You may adjust the code according to your local tf's api:)
I'm trying to convert the code to tensorflow 2 with the help of the migration tool of Google. I do this because I would like to train the lanenet on RTX 3070, which always has problem with tensorflow 1.x since the cuda version can only be higher than 11.1. However, there was one problem I couldn't solve. The error message is in the following:
Traceback (most recent call last): File "E:/Work/02_IntellCar/LaneDetection/fromGithub/lanenet-lane-detection/train_lanenet_tusimple.py", line 40, in train_model() File "E:/Work/02_IntellCar/LaneDetection/fromGithub/lanenet-lane-detection/train_lanenet_tusimple.py", line 30, in train_model worker = single_gpu_trainner.LaneNetTusimpleTrainer() File "E:\Work\02_IntellCar\LaneDetection\fromGithub\lanenet-lane-detection\trainner\tusimple_lanenet_single_gpu_trainner.py", line 81, in init self._train_dataset.next_batch(batch_size=self._batch_size) File "E:\Work\02_IntellCar\LaneDetection\fromGithub\lanenet-lane-detection\data_provider\lanenet_data_feed_pipline.py", line 312, in next_batch return iterator.get_next(name='{:s}_IteratorGetNext'.format(self._dataset_flags)) TypeError: get_next() got an unexpected keyword argument 'name'
I didn't have this problem with tensorflow 1.14.0. And I haven't seen anywhere this usage with make_one_shot_iterator.get_next(). Mostly, there is no argument inside the get_next().
Can anyone help me with this problem? Many thanks in advance!
It is OK to ignore the name
parameter in the function. And for those who wish to use TensorFlow 2 to train the model, you can simply disable the TensorFlow 2 behavior by:
import tensorflow.compat.v1 as tf
tf.disable_v2_behavior()
Then it is compatible for you to run the training code directly under TensorFlow2-GPU
Folks,
Will there be any work to make this code Tensorflow 2 compatible?
Thanks,