Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Buffer Size Error #10

Open
TobiGee opened this issue Dec 21, 2020 · 15 comments
Open

Buffer Size Error #10

TobiGee opened this issue Dec 21, 2020 · 15 comments

Comments

@TobiGee
Copy link

TobiGee commented Dec 21, 2020

Hello together!

When trying to train (only using the Files that were provided, no own data (yet)).
I encounter the following error:
tensorflow.python.framework.errors_impl.InvalidArgumentError: buffer_size must be greater than zero. [Op:ShuffleDatasetV2]

Full Error Stack:
Traceback (most recent call last):
File "main.py", line 117, in
main()
File "main.py", line 103, in main
gan.build_model()
File "C:\Users\TOGERLA\Desktop\stargan-v2-tensorflow-master\StarGAN_v2.py", line 138, in build_model
img_and_domain = img_and_domain.shuffle(buffer_size=dataset_num, reshuffle_each_iteration=True).repeat()
File "C:\Users\TOGERLA\Desktop\stargan-v2-tensorflow-master\venv\lib\site-packages\tensorflow_core\python\data\ops\dataset_ops.py", line 1193, in shuffle
return ShuffleDataset(self, buffer_size, seed, reshuffle_each_iteration)
File "C:\Users\TOGERLA\Desktop\stargan-v2-tensorflow-master\venv\lib\site-packages\tensorflow_core\python\data\ops\dataset_ops.py", line 3535, in init
**self._flat_structure)
File "C:\Users\TOGERLA\Desktop\stargan-v2-tensorflow-master\venv\lib\site-packages\tensorflow_core\python\ops\gen_dataset_ops.py", line 5221, in shuffle_dataset_v2
_ops.raise_from_not_ok_status(e, name)
File "C:\Users\TOGERLA\Desktop\stargan-v2-tensorflow-master\venv\lib\site-packages\tensorflow_core\python\framework\ops.py", line 6606, in raise_from_not_ok_status
six.raise_from(core._status_to_exception(e.code, message), None)
File "", line 3, in raise_from
tensorflow.python.framework.errors_impl.InvalidArgumentError: buffer_size must be greater than zero. [Op:ShuffleDatasetV2]

I might be able to fix the issue myself, but I'll still try to document it here for other people to reproduce :)

Have a nice Christmas!
Tobias

@TobiGee
Copy link
Author

TobiGee commented Dec 21, 2020

Edit:
The issue is that it gets no images because:

  • In the utils.py File in when the method preprocess of the class Image_data is executed, it tries to enumerate over self.domain_list
  • Domain list is an empty list and should be given to the constructor as second last element
  • If I watch main.py line 100 -> the contructor is called with a list of args
  • If i print these args, I find they're empty, so lets take a look at the parse_args method
  • This method uses argparse to parse the arguments given by the command prompt
  • Big Issue: The args list was empty, althow defaults were defined within the method....
  • I'll try to find out more tomorrow...

@TobiGee
Copy link
Author

TobiGee commented Dec 22, 2020

i found that when i start the main.py file without any args, it works with the default values. I could also easily reproduce the error with a second Computer.
Win 10
GTX 1070 / Quadro P6000

Im pretty confident im missing out something. I'm not experienced with argparse, i guess the issue lies there...
can someone help please :)

@KangLeeShaw
Copy link

i found that when i start the main.py file without any args, it works with the default values. I could also easily reproduce the error with a second Computer.
Win 10
GTX 1070 / Quadro P6000

Im pretty confident im missing out something. I'm not experienced with argparse, i guess the issue lies there...
can someone help please :)

Have U solved it?Cuz I have the same problem as you and I have no any solutioon.Could you tell me how to fix it?please.

@Zhenggen-deng
Copy link

I have the same problem sa you,Have you solved it in the end?

@KangLeeShaw
Copy link

KangLeeShaw commented Apr 12, 2021 via email

@Zhenggen-deng
Copy link

你是中国人对吗?对不起,我不能帮到你什么。因为我放弃了用starGAN v2做我的研究

------------------ 原始邮件 ------------------ 发件人: @.>; 发送时间: 2021年4月12日(星期一) 上午10:58 收件人: @.>; 抄送: @.>; @.>; 主题: Re: [clovaai/stargan-v2-tensorflow] Buffer Size Error (#10) I have the same problem sa you,Have you solved it in the end? — You are receiving this because you commented. Reply to this email directly, view it on GitHub, or unsubscribe.

是的,我也打算用stargan做研究,你有联系方式吗?QQ /wechat?我们可以一起探讨一下

@KangLeeShaw
Copy link

KangLeeShaw commented Apr 13, 2021 via email

@Zhenggen-deng
Copy link

可以 我的QQ是3489330389 hhh 这就是我的QQ邮箱鸭。

------------------ 原始邮件 ------------------ 发件人: "clovaai/stargan-v2-tensorflow" @.>; 发送时间: 2021年4月13日(星期二) 晚上10:16 @.>; @.@.>; 主题: Re: [clovaai/stargan-v2-tensorflow] Buffer Size Error (#10) 你是中国人对吗?对不起,我不能帮到你什么。因为我放弃了用starGAN v2做我的研究 … ------------------ 原始邮件 ------------------ 发件人: @.>; 发送时间: 2021年4月12日(星期一) 上午10:58 收件人: @.>; 抄送: @.>; @.>; 主题: Re: [clovaai/stargan-v2-tensorflow] Buffer Size Error (#10) I have the same problem sa you,Have you solved it in the end? — You are receiving this because you commented. Reply to this email directly, view it on GitHub, or unsubscribe. 是的,我也打算用stargan做研究,你有联系方式吗?QQ /wechat?我们可以一起探讨一下 — You are receiving this because you commented. Reply to this email directly, view it on GitHub, or unsubscribe.

为什么加好友还要填你的名字,要不你加我微信把;18273894594

@tranzmatt
Copy link

Edit: The issue is that it gets no images because:

  • In the utils.py File in when the method preprocess of the class Image_data is executed, it tries to enumerate over self.domain_list
  • Domain list is an empty list and should be given to the constructor as second last element
  • If I watch main.py line 100 -> the contructor is called with a list of args
  • If i print these args, I find they're empty, so lets take a look at the parse_args method
  • This method uses argparse to parse the arguments given by the command prompt
  • Big Issue: The args list was empty, althow defaults were defined within the method....
  • I'll try to find out more tomorrow...

Were you able to solve this issue?

@mhdabbasi
Copy link

Hi. I got the same problem and I realized that I inputted my dataset name incorrectly.
Mabey you're doing that too.

@KangLeeShaw
Copy link

KangLeeShaw commented Oct 30, 2021 via email

@xiaochuangshu
Copy link

Hello, I have the same problem, if it is solved, can you give me some help

@Yike-98
Copy link

Yike-98 commented Dec 6, 2021

你好,请问是怎么解决的呢?可以帮助我吗?

@KangLeeShaw
Copy link

KangLeeShaw commented Dec 6, 2021 via email

@sr1dh4r
Copy link

sr1dh4r commented Aug 1, 2023

For those seeing the errors, use the following .. "celeba_hq_gender" is being shown incorrectly in github
python main.py --dataset celeba_hq_gender --phase train ..

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

8 participants