wchen342 / SketchyGAN

Code for paper "SketchyGAN: Towards Diverse and Realistic Sketch to Image Synthesis"
MIT License
131 stars 32 forks source link

tensor data_format #20

Closed vikyzeng closed 5 years ago

vikyzeng commented 5 years ago

Dear Dr. Chen. When I trained on two GPUs, there is always a problem about data_format.

InvalidArgumentError (see above for traceback): Conv2DCustomBackpropInputOp only supports NHWC. [[node GPU_0/gradients/GPU_0/discriminator_1/Conv_1/Conv2D_grad/Conv2DBackpropInput (defined at ./src_single/graph_single.py:26) = Conv2DBackpropInput[T=DT_FLOAT, data_format="NCHW", dilations=[1, 1, 1, 1], padding="SAME", strides=[1, 1, 1, 1], use_cudnn_on_gpu=true, _device="/job:localhost/replica:0/task:0/device:CPU:0"](GPU_0/gradients/GPU_0/discriminator_1/Conv_1/Conv2D_grad/ShapeN, GPU_0/discriminator_1/Conv_1/Reshape_1, GPU_0/gradients/GPU_0/discriminator_1/Conv_1/add_grad/tuple/control_dependency)]]

In config.py, you note that 'data_format='NCHW' should not changed. I wonder why the problem is raised? Looking forward to your apply! Thank you very much!

wchen342 commented 5 years ago

It has something to do with your tensorflow and cuda. What is your system info (system version, tf version, etc.)? Some guys reported this happens on Windows 10 but disappeared after switching to Ubuntu.

On Wed, Jan 16, 2019, 06:23 vikyzeng <notifications@github.com wrote:

Dear Dr. Chen. When I trained on two GPUs, there is always a problem about data_format.

InvalidArgumentError (see above for traceback): Conv2DCustomBackpropInputOp only supports NHWC. [[node GPU_0/gradients/GPU_0/discriminator_1/Conv_1/Conv2D_grad/Conv2DBackpropInput (defined at ./src_single/graph_single.py:26) = Conv2DBackpropInputT=DT_FLOAT, data_format="NCHW", dilations=[1, 1, 1, 1], padding="SAME", strides=[1, 1, 1, 1], use_cudnn_on_gpu=true, _device="/job:localhost/replica:0/task:0/device:CPU:0"]]

In config.py, you note that 'data_format='NCHW' should not changed. I wonder why the problem is raised? Looking forward to your apply! Thank you very much!

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/wchen342/SketchyGAN/issues/20, or mute the thread https://github.com/notifications/unsubscribe-auth/AGHCV3wQjRRQ0YH_Hrh0AbYOTr2Qk1ffks5vDwuZgaJpZM4aC2lq .

vikyzeng commented 5 years ago

Thank you for apply! It worked on Ubuntu. Is it feasible to change the data_format to NHWC and delete those assert in code to fit my environment?

wchen342 commented 5 years ago

If you know how to change the code since there are a bunch of places need to be changed, like transposes.

On Wed, Jan 16, 2019, 09:38 vikyzeng <notifications@github.com wrote:

Thank you for apply! It worked on Ubuntu. Is it feasible to change the data_format to NHWC and delete those assert in code to fit my environment?

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/wchen342/SketchyGAN/issues/20#issuecomment-454802120, or mute the thread https://github.com/notifications/unsubscribe-auth/AGHCVywmV1jDF1n0Ma3560z9maxE_PEgks5vDzlxgaJpZM4aC2lq .

vikyzeng commented 5 years ago

I will give it a try! By the way, I have sent my sftp info to your school email to get the augmented dataset. Have you received it? Thank you very much in advance!

wchen342 commented 5 years ago

Yeah, I will upload later.

Edit: Can you use another service provider? I seem to have problem with connection speed.

vikyzeng commented 5 years ago

Yeah, I will upload later. Edit: Can you use another service provider? I seem to have problem with connection speed.

The server in china may have some problem when connecting to extranet. Is it possible to upload the dataset to Google Driver or other Cloud Driver temporarily? Sorry for bringing you inconvenience! And can I know the size of the dataset?

wchen342 commented 5 years ago

The whole dataset is 170+G and Google Drive has only 10-15G. I will suggest you setup a vps like GCP or DO temporarily. It's not free but it should work better.

vikyzeng commented 5 years ago

I have 2T free space in Baidu Cloud Disk. Is it convenient to use Baidu Cloud Disk in your country? I can offer my account and password to you to upload the dataset. If it is convenient to install the Baidu Cloud Disk and the upload speed is fine, it would be the easiest way. If it has some problems by this way, I will try to set up a vps.

Sorry for bothering you! Looking forward to your reply.

----- 原始邮件 ----- 发件人: "wchen342" notifications@github.com 收件人: "wchen342/SketchyGAN" SketchyGAN@noreply.github.com 抄送: "vikyzeng" zengyihan@sjtu.edu.cn, "Author" author@noreply.github.com 发送时间: 星期四, 2019年 1 月 17日 下午 3:07:43 主题: Re: [wchen342/SketchyGAN] tensor data_format (#20)

The whole dataset is 170+G and Google Drive has only 10-15G. I will suggest you setup a vps like GCP or DO temporarily. It's not free but it should work better.

-- You are receiving this because you authored the thread. Reply to this email directly or view it on GitHub: https://github.com/wchen342/SketchyGAN/issues/20#issuecomment-455065046

wchen342 commented 5 years ago

I can try that, it will probably be better.

vikyzeng commented 5 years ago

I can try that, it will probably be better.

Dear Dr.Chen. I have sent my Baidu Cloud Disk account to your email. Have you received it? Thank you for your kind cooperation! By the way, I try to make tfrecord file for my own edge images. I extract edge images through batch_hed.py - PostprocessHED.m. But the dist_map turn to be whole black. Is this because the edge line is too thin? Have you encountered such a problem? Looking forward to your reply!

15702435639 commented 5 years ago

Dear vikyzeng,Like you, I am also making my own dataset.But I don't’ know how to convert image format to TFRecord format.Could you tell me the specific detail or code?Thanks very much.

wchen342 commented 5 years ago

The scripts are uploaded to data_processing.