From 10f1dd3447daad8a7482b48b42a2f8d52bcbcc23 Mon Sep 17 00:00:00 2001 From: Yan Chunwei Date: Wed, 17 Jan 2018 13:27:47 +0800 Subject: [PATCH] Feature/add pytorch complex demo (#171) --- .gitmodules | 3 +++ demo/README.md | 27 +++++++++++++++++++++++++++ demo/pytorch-CycleGAN-and-pix2pix | 1 + tests.sh | 4 ++-- 4 files changed, 33 insertions(+), 2 deletions(-) create mode 100644 .gitmodules create mode 100644 demo/README.md create mode 160000 demo/pytorch-CycleGAN-and-pix2pix diff --git a/.gitmodules b/.gitmodules new file mode 100644 index 00000000..513581d3 --- /dev/null +++ b/.gitmodules @@ -0,0 +1,3 @@ +[submodule "demo/pytorch-CycleGAN-and-pix2pix"] + path = demo/pytorch-CycleGAN-and-pix2pix + url = https://github.com/Superjomn/pytorch-CycleGAN-and-pix2pix.git diff --git a/demo/README.md b/demo/README.md new file mode 100644 index 00000000..08ca00aa --- /dev/null +++ b/demo/README.md @@ -0,0 +1,27 @@ +# VisualDL demos + +VisualDL supports Python and C++ based DL frameworks, +there are several demos for different platforms. + +## PaddlePaddle +Locates in `./paddle`. + +This is a visualization for `resnet` on `cifar10` dataset, we visualize the CONV parameters, +and there are some interesting patterns. + +## PyTorch GAN +Locates in `./pytorch-CycleGAN-and-pix2pix`. + +This submodule is forked from [pytorch-CycleGAN-and-pix2pix]( +https://github.com/junyanz/pytorch-CycleGAN-and-pix2pix), +great model and the generated fake images are really funny. + +This demo only works with CycleGAN mode, read [CycleGAN train doc](https://github.com/Superjomn/pytorch-CycleGAN-and-pix2pix#cyclegan-traintest) and [changes to the original code](https://github.com/junyanz/pytorch-CycleGAN-and-pix2pix/compare/master...Superjomn:master) for more information. + +## MxNet Mnist +Locates in `./mxnet_demo`. + +By adding VisualDL as callbacks to `model.fit`, +we can use the Python SDK in MxNet, +but it seems that only the outside program can only retrieve parameters in epoch callbacks, +that limits the number of steps for visualization. diff --git a/demo/pytorch-CycleGAN-and-pix2pix b/demo/pytorch-CycleGAN-and-pix2pix new file mode 160000 index 00000000..1f8ed876 --- /dev/null +++ b/demo/pytorch-CycleGAN-and-pix2pix @@ -0,0 +1 @@ +Subproject commit 1f8ed8767802e1aea667c4a760a77be7146b916f diff --git a/tests.sh b/tests.sh index c468f003..8f9d7807 100644 --- a/tests.sh +++ b/tests.sh @@ -79,8 +79,8 @@ bigfile_reject() { cd $TOP_DIR # it failed to exclude .git, remove it first. rm -rf .git - local largest_file="$(find . -path .git -prune -o -printf '%s %p\n' | sort -nr | head -n1)" - local size=$(echo $largest_file | awk '{print $1}') + local largest_file=$(find . -path .git -prune -o -printf '%s %p\n' | sort -nr | grep -v "CycleGAN"| head -n1) + local size=$(echo "$largest_file" | awk '{print $1}') if [ "$size" -ge "$max_file_size" ]; then echo $largest_file echo "file size exceed $max_file_size" -- GitLab