TypeError: split() got an unexpected keyword argument 'split_dim'
See original GitHub issueWhen trying to run inference.py , I get the following error:
ubuntu@ip-Address:~/tensorflow-deeplab-resnet$ python inference.py --save_dir ./output/ 2718714.jpg deeplab_resnet.ckpt
I tensorflow/stream_executor/dso_loader.cc:125] successfully opened CUDA library libcublas.so.8.0 locally
I tensorflow/stream_executor/dso_loader.cc:125] successfully opened CUDA library libcudnn.so.5 locally
I tensorflow/stream_executor/dso_loader.cc:125] successfully opened CUDA library libcufft.so.8.0 locally
I tensorflow/stream_executor/dso_loader.cc:125] successfully opened CUDA library libcuda.so.1 locally
I tensorflow/stream_executor/dso_loader.cc:125] successfully opened CUDA library libcurand.so.8.0 locally
Traceback (most recent call last):
File "inference.py", line 102, in <module>
main()
File "inference.py", line 60, in main
img_r, img_g, img_b = tf.split(split_dim=2, num_split=3, value=img)
TypeError: split() got an unexpected keyword argument 'split_dim'
ubuntu@ip-Address:~/tensorflow-deeplab-resnet$
I am unsure of how to resolve it.
Issue Analytics
- State:
- Created 7 years ago
- Comments:5 (2 by maintainers)
Top Results From Across the Web
TypeError: split() got an unexpected keyword argument 'expand'
Hi, I'm trying to split a column by space as follows: df.CUSTOMER.str.split(expand=True) here is the error I get: ...
Read more >split() got an unexpected keyword argument 'expand'
New in version 0.16.1. Based on the old docs it looks like you can do the same thing by specifying the return_type='frame' parameter....
Read more >Issue 1106694: split() takes no keyword arguments
msg24018 ‑ (view) Author: Vinz (boukthor) Date: 2005‑01‑21 13:30
msg24019 ‑ (view) Author: Bastian Kleineidam (calvin) Date: 2005‑01‑24 12:34
msg24020 ‑ (view) Author: Raymond Hettinger...
Read more >Error init got an unexpected keyword argument user - Edureka
I am using Django to create a user and an object when the user is created. But there is ... .objects.create(user=instance). How to...
Read more >load_state_dict() got an unexpected keyword argument 'strict ...
When I try to finetune a model, I set the 'strict' argument to load the state_dict, however, an error appears: “TypeError: load_state_dict() ...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Chainging this line:
img = tf.cast(tf.concat(2, [img_b, img_g, img_r]), dtype=tf.float32)
To:
img = tf.cast(tf.concat_v2(2, [img_b, img_g, img_r]), dtype=tf.float32)
Results in:
It seems like you are using the most recent version of TF from github (not yet the released one). According to this list of changes:
So to make it work, you would need to change the order from
tf.split(split_dim=2, num_split=3, value=img)
totf.split(value=img. num_or_size=3, axis=2 )
. Note that it would need to change the provided image reader accordingly (image_reader.py
) once you want to usetrain.py
orinference.py