Skip to content

Conversation

@zhumanyu
Copy link
Contributor

add pix2pix to models

@@ -0,0 +1,35 @@
repos:
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

这个文件可以不要

if args.crop_type == 'Centor':
img1 = CentorCrop(img1, args.crop_size, args.crop_size)
img2 = CentorCrop(img2, args.crop_size, args.crop_size)
elif args.crop_type == 'Random':
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

上面的get_preprocess_param 去掉crop_pos,这里可以直接调用RandomCrop

img2 = (np.array(img2).astype('float32') / 255.0 - 0.5) / 0.5
img2 = img2.transpose([2, 0, 1])
if return_name:
#batch_out_1.append(
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

需要去掉注释

batch_out_2.append(img2)
batch_out_3.append(os.path.basename(files[0]))
else:
#batch_out_1.append(
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

同上

if len(batch_out_1) == self.batch_size:
if return_name:
yield batch_out_1, batch_out_2, batch_out_3
#yield batch_out_1
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

同上,下面的注释也去掉

#export FLAGS_reader_queue_speed_test_mode=True
export FLAGS_eager_delete_tensor_gb=0.0
export FLAGS_fast_eager_deletion_mode=1
export FLAGS_fraction_of_gpu_memory_to_use=0.01
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

上面这些配置需要删掉

loss_name=dis_trainer.d_loss.name,
build_strategy=build_strategy)

#losses = [[], []]
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

去掉注释

0], d_loss_real[0], d_loss_fake[0], batch_time))

#losses[0].append(g_A_loss[0])
#losses[1].append(d_A_loss[0])
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

去掉上面的注释

add_arg('model_net', str, "cgan", "The model used.")
add_arg('dataset', str, "mnist", "The dataset used.")
add_arg('model_net', str, "Pix2pix", "The model used.")
add_arg('dataset', str, "cityscapes", "The dataset used.")
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

不需要修改上面的默认值

add_arg('norm_type', str, "batch_norm", "Which normalization to used")
add_arg('learning_rate', int, 0.0002, "the initialize learning rate")
add_arg('learning_rate', float, 0.0002, "the initialize learning rate")
add_arg('lambda_L1', float, 100.0, "the initialize learning rate")
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

这个可以放在pix2pix特有的参数里?

CrossLee1 added 4 commits May 27, 2019 12:10
…2pix

Conflicts:
	PaddleCV/gan/data_reader.py
	PaddleCV/gan/scripts/run_pix2pix.sh
	PaddleCV/gan/trainer/Pix2pix.py
	PaddleCV/gan/util/config.py
…2pix

Conflicts:
	PaddleCV/gan/data_reader.py
	PaddleCV/gan/scripts/run_pix2pix.sh
	PaddleCV/gan/trainer/Pix2pix.py
	PaddleCV/gan/util/config.py
Copy link
Contributor

@ceci3 ceci3 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@ceci3 ceci3 merged commit 2a9bd0d into PaddlePaddle:develop May 29, 2019
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

Successfully merging this pull request may close these issues.

3 participants