progressive_growing_of_gans_tensorflow icon indicating copy to clipboard operation
progressive_growing_of_gans_tensorflow copied to clipboard

tf version is 1.8, why has so many errors? Is tf version a bit higher?

Open 302775293 opened this issue 6 years ago • 15 comments

E:\anacond\python.exe C:/Users/admin/Desktop/progressive_growing_of_gans_tensorflow/main.py Traceback (most recent call last): File "E:\anacond\lib\site-packages\absl\flags_flag.py", line 166, in _parse return self.parser.parse(argument) File "E:\anacond\lib\site-packages\absl\flags_argument_parser.py", line 152, in parse val = self.convert(argument) File "E:\anacond\lib\site-packages\absl\flags_argument_parser.py", line 268, in convert type(argument))) TypeError: Expect argument to be a string or int, found <class 'float'>

During handling of the above exception, another exception occurred:

Traceback (most recent call last): File "C:/Users/admin/Desktop/progressive_growing_of_gans_tensorflow/main.py", line 19, in flags.DEFINE_integer("lam_eps", 0.001, "Weight for the epsilon term") File "E:\anacond\lib\site-packages\tensorflow\python\platform\flags.py", line 58, in wrapper return original_function(*args, **kwargs) File "E:\anacond\lib\site-packages\absl\flags_defines.py", line 315, in DEFINE_integer DEFINE(parser, name, default, help, flag_values, serializer, **args) File "E:\anacond\lib\site-packages\absl\flags_defines.py", line 81, in DEFINE DEFINE_flag(_flag.Flag(parser, serializer, name, default, help, **args), File "E:\anacond\lib\site-packages\absl\flags_flag.py", line 107, in init self._set_default(default) File "E:\anacond\lib\site-packages\absl\flags_flag.py", line 196, in _set_default self.default = self._parse(value) File "E:\anacond\lib\site-packages\absl\flags_flag.py", line 169, in _parse 'flag --%s=%s: %s' % (self.name, argument, e)) absl.flags._exceptions.IllegalFlagValueError: flag --lam_eps=0.001: Expect argument to be a string or int, found <class 'float'>

Process finished with exit code 1

302775293 avatar Jun 23 '18 03:06 302775293

What's your running command?

"python main.py"

zhangqianhui avatar Jun 23 '18 08:06 zhangqianhui

python main.py --mypath

302775293 avatar Jun 23 '18 08:06 302775293

Is this the problem that my tensorflow is not GPU version. My TF is CPU version.

302775293 avatar Jun 23 '18 08:06 302775293

(1)can you write your path into main.py file? and "python main.py"? (2) if you use cpu verison of tensorflow , place set os.environ['CUDA_VISIBLE_DEVICES']='' not '0'

zhangqianhui avatar Jun 23 '18 08:06 zhangqianhui

How to write my path into main.py file? and is "not'0' grammar right? :):)

302775293 avatar Jun 23 '18 08:06 302775293

https://github.com/zhangqianhui/progressive_growing_of_gans_tensorflow/blob/7444eff174c3e60ad4ebcbe7efd3ae0dc5f1255d/main.py#L13

zhangqianhui avatar Jun 23 '18 08:06 zhangqianhui

It still didn't work, and the error is the same above。

------------------ 原始邮件 ------------------ 发件人: "JiChao Zhang"[email protected]; 发送时间: 2018年6月23日(星期六) 下午4:46 收件人: "zhangqianhui/progressive_growing_of_gans_tensorflow"[email protected]; 抄送: "宠辱不惊"[email protected]; "Author"[email protected]; 主题: Re: [zhangqianhui/progressive_growing_of_gans_tensorflow] tf versionis 1.8, why has so many errors? Is tf version a bit higher? (#12)

https://github.com/zhangqianhui/progressive_growing_of_gans_tensorflow/blob/7444eff174c3e60ad4ebcbe7efd3ae0dc5f1255d/main.py#L13

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub, or mute the thread.

302775293 avatar Jun 23 '18 09:06 302775293

https://github.com/zhangqianhui/progressive_growing_of_gans_tensorflow/blob/7444eff174c3e60ad4ebcbe7efd3ae0dc5f1255d/main.py#L19

Place change DEFINE_integer to DEFINE_float

zhangqianhui avatar Jun 23 '18 09:06 zhangqianhui

list file list file ending! the num of dataset 0 Traceback (most recent call last): File "C:/Users/admin/Desktop/progressive_growing_of_gans_tensorflow/main.py", line 41, in for i in range(FLAGS.flag): TypeError: 'float' object cannot be interpreted as an integer

------------------ 原始邮件 ------------------ 发件人: "JiChao Zhang"[email protected]; 发送时间: 2018年6月23日(星期六) 下午5:03 收件人: "zhangqianhui/progressive_growing_of_gans_tensorflow"[email protected]; 抄送: "宠辱不惊"[email protected]; "Author"[email protected]; 主题: Re: [zhangqianhui/progressive_growing_of_gans_tensorflow] tf versionis 1.8, why has so many errors? Is tf version a bit higher? (#12)

https://github.com/zhangqianhui/progressive_growing_of_gans_tensorflow/blob/7444eff174c3e60ad4ebcbe7efd3ae0dc5f1255d/main.py#L19

Place change DEFINE_integer to DEFINE_float

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub, or mute the thread.

302775293 avatar Jun 23 '18 09:06 302775293

change DEFINE_float to DEFINE_integer for FLAGS.flag.

zhangqianhui avatar Jun 23 '18 09:06 zhangqianhui

E:\anacond\python.exe C:/Users/admin/Desktop/progressive_growing_of_gans_tensorflow/main.py list file list file ending! the num of dataset 0 WARNING:tensorflow:From C:\Users\admin\Desktop\progressive_growing_of_gans_tensorflow\ops.py:103: calling reduce_mean (from tensorflow.python.ops.math_ops) with keep_dims is deprecated and will be removed in a future version. Instructions for updating: keep_dims is deprecated, use keepdims instead current [4, 4, 512] 8192 current [3, 3, 512] 4608 current [1, 1, 512] 512 current [1, 1, 3] 3 current [3, 3, 513] 4617 current [4, 4, 512] 8192 current [512] 512 current [1, 1, 3] 3 current [3, 3, 513] 4617 current [4, 4, 512] 8192 current [512] 512 current [1, 1, 3] 3 current [3, 3, 513] 4617 current [4, 4, 512] 8192 current [512] 512 discriminator/dis_y_rgb_conv_4/weight:0 (1, 1, 3, 512) discriminator/dis_y_rgb_conv_4/biases:0 (512,) discriminator/dis_n_conv_1_4/weight:0 (3, 3, 513, 512) discriminator/dis_n_conv_1_4/biases:0 (512,) discriminator/dis_n_conv_2_4/weight:0 (4, 4, 512, 512) discriminator/dis_n_conv_2_4/biases:0 (512,) discriminator/dis_n_fully/weight:0 (512, 1) discriminator/dis_n_fully/bias:0 (1,) The total para of D 6561793 generator/gen_n_1_conv/weight:0 (4, 4, 512, 512) generator/gen_n_1_conv/biases:0 (512,) generator/gen_n_2_conv/weight:0 (3, 3, 512, 512) generator/gen_n_2_conv/biases:0 (512,) generator/gen_y_rgb_conv_4/weight:0 (1, 1, 512, 3) generator/gen_y_rgb_conv_4/biases:0 (3,) The total para of G 6556163 d_vars 8 g_vars 6 self.d_vars_n_read 2 self.g_vars_n_read 4 d_vars_n_2_rgb 0 g_vars_n_2_rgb 0 self.g_d_w 7 2018-06-23 17:30:19.248758: I T:\src\github\tensorflow\tensorflow\core\platform\cpu_feature_guard.cc:140] Your CPU supports instructions that this TensorFlow binary was not compiled to use: AVX2 images shuffle Traceback (most recent call last): File "C:/Users/admin/Desktop/progressive_growing_of_gans_tensorflow/main.py", line 57, in pggan.train() File "C:\Users\admin\Desktop\progressive_growing_of_gans_tensorflow\PGGAN.py", line 170, in train train_list = self.data_In.getNextBatch(batch_num, self.batch_size) File "C:\Users\admin\Desktop\progressive_growing_of_gans_tensorflow\utils.py", line 54, in getNextBatch return self.image_list[(batch_num % ro_num) * batch_size: (batch_num % ro_num + 1) * batch_size] TypeError: slice indices must be integers or None or have an index method Process finished with exit code 1 感觉这错误是一个接着一个,大佬,麻烦您了,如果还不行,就算了

------------------ 原始邮件 ------------------ 发件人: "JiChao Zhang"[email protected]; 发送时间: 2018年6月23日(星期六) 下午5:27 收件人: "zhangqianhui/progressive_growing_of_gans_tensorflow"[email protected]; 抄送: "宠辱不惊"[email protected]; "Author"[email protected]; 主题: Re: [zhangqianhui/progressive_growing_of_gans_tensorflow] tf versionis 1.8, why has so many errors? Is tf version a bit higher? (#12)

change DEFINE_float to DEFINE_integer for FLAGS.flag.

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub, or mute the thread.

302775293 avatar Jun 23 '18 09:06 302775293

your dataset is None. Place check your data_path

zhangqianhui avatar Jun 23 '18 09:06 zhangqianhui

it works, thanks a lot for you. xiexie! ------------------ 原始邮件 ------------------ 发件人: "JiChao Zhang"[email protected]; 发送时间: 2018年6月23日(星期六) 下午5:35 收件人: "zhangqianhui/progressive_growing_of_gans_tensorflow"[email protected]; 抄送: "宠辱不惊"[email protected]; "Author"[email protected]; 主题: Re: [zhangqianhui/progressive_growing_of_gans_tensorflow] tf versionis 1.8, why has so many errors? Is tf version a bit higher? (#12)

your dataset is None. Place check your data_path

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub, or mute the thread.

302775293 avatar Jun 23 '18 09:06 302775293

congratulations

zhangqianhui avatar Jun 23 '18 09:06 zhangqianhui

Hello author, the code won't run anymore, do you know what's going on? list file list file ending! the num of dataset 202598 WARNING:tensorflow:From D:\python\lib\site-packages\tensorflow\python\ops\resource_variable_ops.py:1659: calling BaseResourceVariable.init (from tensorflow.python.ops.resource_variable_ops) with constraint is deprecated and will be removed in a future version. Instructions for updating: If using Keras pass *_constraint arguments to layers. 512

ZPWangZP avatar Mar 29 '22 03:03 ZPWangZP