├── .gitignore ├── README.md ├── White_box_Cartoonization.ipynb ├── assets ├── delhi.jpg ├── demo.jpg ├── fedal.jpg ├── flow.jpg ├── food.jpg ├── gates.jpg ├── jobs.jpg ├── merkel.jpg ├── messi-ronaldo.jpg ├── newyorkts.jpg ├── pratap.jpg ├── subway.jpg ├── trump-clinton.jpg └── wave.svg ├── index.html ├── models └── CartoonGAN │ ├── saved_model │ ├── saved_model.pb │ └── variables │ │ ├── variables.data-00000-of-00001 │ │ └── variables.index │ ├── web-float16 │ ├── group1-shard1of1.bin │ └── model.json │ ├── web-uint8 │ ├── group1-shard1of1.bin │ └── model.json │ └── web │ ├── group1-shard1of2.bin │ ├── group1-shard2of2.bin │ └── model.json ├── script.js └── style.css /.gitignore: -------------------------------------------------------------------------------- 1 | todo.md 2 | *.zip 3 | *.mp4 -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # Cartoonizer with TensorFlow.js 2 | 3 | [Try application][liveapp] 4 | 5 | We used Generative Adversarial Network (GAN) model proposed in 6 | [Learning to Cartoonize Using White-box Cartoon Representations][cvpr2020] (CVPR 2020) by Xinrui Wang and Jinze Yu. 7 | 8 | Our idea was to test if it is reasonably possible to perform model inferences in 9 | the browser clients with CPUs only. Without needing to send any of user's data (images) to servers. 10 | 11 | **[App preview][liveapp]**: Upload an image or try examples 12 | 13 | [![demo](./assets/demo.jpg)][liveapp] 14 | 15 | Here's the application flow and architecture: 16 | 17 |

18 | 19 |

20 | 21 | TensorFlow's Saved models are converted to TensorFlow.js models. 22 | Images are padded and scaled to 256px before they are fed to the model. 23 | This rescaling is done to speed up the processing and might reduce the quality too. 24 | 25 | Model footprint is ~1.5MB. These models in the browsers without GPU acceleration could manage to cartoonize, 26 | but takes anywhere between 5-10 seconds for processing. 27 | This is much slower than tflite models performance in mobile devices. 28 | However, web browsers benefit from users not needing to install anything or transmitting data outside of their systems. 29 | 30 | ## Credits 31 | 32 | This work was possible due to 33 | - [Margaret Maynard-Reid](https://twitter.com/margaretmz) and [Sayak Paul](https://twitter.com/RisingSayak)'s work on [How to Create a Cartoonizer with TensorFlow Lite](https://blog.tensorflow.org/2020/09/how-to-create-cartoonizer-with-tf-lite.html) 34 | - [Xinrui Wang](https://github.com/SystemErrorWang/) and Jinze Yu's original work on [White-box CartoonGAN][cvpr2020] 35 | 36 | ## Citation 37 | Xinrui Wang and Jinze Yu are the original authors of [White-box CartoonGAN][cvpr2020]. 38 | ``` 39 | @InProceedings{Wang_2020_CVPR, 40 | author = {Wang, Xinrui and Yu, Jinze, 41 | title = {Learning to Cartoonize Using White-Box Cartoon Representations, 42 | booktitle = {IEEE/CVF Conference on Computer Vision and Pattern Recognition (CVPR)}, 43 | month = {June}, year = {2020} } 44 | ``` 45 | 46 | ### Links 47 | 48 | - Original [White-box Cartoonization Repo](https://github.com/SystemErrorWang/White-box-Cartoonization) 49 | - Cartoonizer with [TensorFlow Lite Repo](https://github.com/margaretmz/Cartoonizer-with-TFLite) 50 | - [Live application][liveapp] 51 | - [Repo](https://github.com/pratapvardhan/cartoonizer-with-tfjs/), [Notebook](https://github.com/pratapvardhan/cartoonizer-with-tfjs/blob/master/White_box_Cartoonization.ipynb), [Colab](https://colab.research.google.com/github/pratapvardhan/cartoonizer-with-tfjs/blob/master/White_box_Cartoonization.ipynb) 52 | 53 | [cvpr2020]: https://openaccess.thecvf.com/content_CVPR_2020/papers/Wang_Learning_to_Cartoonize_Using_White-Box_Cartoon_Representations_CVPR_2020_paper.pdf 54 | [liveapp]: https://gramener.com/cartoonizer/ 55 | [repo]: https://github.com/pratapvardhan/cartoonizer-with-tfjs/ -------------------------------------------------------------------------------- /assets/delhi.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pratapvardhan/cartoonizer-with-tfjs/0a1c1964e44721d73853bc24f7005332ed398021/assets/delhi.jpg -------------------------------------------------------------------------------- /assets/demo.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pratapvardhan/cartoonizer-with-tfjs/0a1c1964e44721d73853bc24f7005332ed398021/assets/demo.jpg -------------------------------------------------------------------------------- /assets/fedal.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pratapvardhan/cartoonizer-with-tfjs/0a1c1964e44721d73853bc24f7005332ed398021/assets/fedal.jpg -------------------------------------------------------------------------------- /assets/flow.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pratapvardhan/cartoonizer-with-tfjs/0a1c1964e44721d73853bc24f7005332ed398021/assets/flow.jpg -------------------------------------------------------------------------------- /assets/food.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pratapvardhan/cartoonizer-with-tfjs/0a1c1964e44721d73853bc24f7005332ed398021/assets/food.jpg -------------------------------------------------------------------------------- /assets/gates.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pratapvardhan/cartoonizer-with-tfjs/0a1c1964e44721d73853bc24f7005332ed398021/assets/gates.jpg -------------------------------------------------------------------------------- /assets/jobs.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pratapvardhan/cartoonizer-with-tfjs/0a1c1964e44721d73853bc24f7005332ed398021/assets/jobs.jpg -------------------------------------------------------------------------------- /assets/merkel.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pratapvardhan/cartoonizer-with-tfjs/0a1c1964e44721d73853bc24f7005332ed398021/assets/merkel.jpg -------------------------------------------------------------------------------- /assets/messi-ronaldo.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pratapvardhan/cartoonizer-with-tfjs/0a1c1964e44721d73853bc24f7005332ed398021/assets/messi-ronaldo.jpg -------------------------------------------------------------------------------- /assets/newyorkts.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pratapvardhan/cartoonizer-with-tfjs/0a1c1964e44721d73853bc24f7005332ed398021/assets/newyorkts.jpg -------------------------------------------------------------------------------- /assets/pratap.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pratapvardhan/cartoonizer-with-tfjs/0a1c1964e44721d73853bc24f7005332ed398021/assets/pratap.jpg -------------------------------------------------------------------------------- /assets/subway.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pratapvardhan/cartoonizer-with-tfjs/0a1c1964e44721d73853bc24f7005332ed398021/assets/subway.jpg -------------------------------------------------------------------------------- /assets/trump-clinton.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pratapvardhan/cartoonizer-with-tfjs/0a1c1964e44721d73853bc24f7005332ed398021/assets/trump-clinton.jpg -------------------------------------------------------------------------------- /assets/wave.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | -------------------------------------------------------------------------------- /index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | Cartoonize your pictures 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 32 | 33 | 34 | 35 | 47 |
48 |

Cartoonize your pictures

49 |

All of your data stays within your browser.

50 |

Upload an image or try below examples

51 |
52 |
53 |
54 |
55 |
56 | 59 | or Try below examples 60 |
61 | 62 |
63 | Click on the images to try 64 |
65 | 66 | 67 | 68 | 69 |
70 |
71 |
72 |
73 |
74 |
75 |
76 |
Cartoonized Image
77 | Download 78 |
79 | 80 |
81 | Please wait. Running CartoonGAN in your browser .. 82 |
83 |
84 |
85 |
86 | 87 |
88 |

How it works

89 |
90 |

91 | We used Generative Adversarial Network (GAN) model proposed in 92 | 93 | Learning to Cartoonize Using White-box Cartoon Representations (CVPR 2020) by 94 | Xinrui Wang and Jinze Yu. 95 | Our idea was to test if it is reasonably possible to perform model inferences in 96 | the browser clients with CPUs only. Without needing to send any of user's data (images) to servers. 97 |

98 |

Here's the application flow and architecture:

99 | 100 |

101 | TensorFlow Saved models are converted to 102 | TensorFlow.js models. 103 | Images are padded and scaled to 256px before they are fed to the model. 104 | This rescaling is done to speed up the processing and might reduce the quality too.

105 |

106 | Model footprint is ~1.5MB. These models in the browsers without GPU acceleration could manage to cartoonize, 107 | but takes anywhere between 5-10 seconds for processing. 108 | This is much slower than tflite models performance in mobile devices. 109 | However, web browsers benefit from users not needing to install anything or transmitting data outside of their systems. 110 |

111 |

Credits

112 | 127 | 128 |
129 |
130 | 131 | 132 | 133 | 134 | 135 | 136 | -------------------------------------------------------------------------------- /models/CartoonGAN/saved_model/saved_model.pb: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pratapvardhan/cartoonizer-with-tfjs/0a1c1964e44721d73853bc24f7005332ed398021/models/CartoonGAN/saved_model/saved_model.pb -------------------------------------------------------------------------------- /models/CartoonGAN/saved_model/variables/variables.data-00000-of-00001: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pratapvardhan/cartoonizer-with-tfjs/0a1c1964e44721d73853bc24f7005332ed398021/models/CartoonGAN/saved_model/variables/variables.data-00000-of-00001 -------------------------------------------------------------------------------- /models/CartoonGAN/saved_model/variables/variables.index: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pratapvardhan/cartoonizer-with-tfjs/0a1c1964e44721d73853bc24f7005332ed398021/models/CartoonGAN/saved_model/variables/variables.index -------------------------------------------------------------------------------- /models/CartoonGAN/web-float16/group1-shard1of1.bin: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pratapvardhan/cartoonizer-with-tfjs/0a1c1964e44721d73853bc24f7005332ed398021/models/CartoonGAN/web-float16/group1-shard1of1.bin -------------------------------------------------------------------------------- /models/CartoonGAN/web-float16/model.json: -------------------------------------------------------------------------------- 1 | {"format": "graph-model", "generatedBy": "2.3.0", "convertedBy": "TensorFlow.js Converter v2.3.0", "userDefinedMetadata": {"signature": {"inputs": {"input_photo:0": {"name": "input_photo:0", "dtype": "DT_FLOAT", "tensorShape": {"dim": [{"size": "1"}, {"size": "-1"}, {"size": "-1"}, {"size": "3"}]}}}, "outputs": {"final_output:0": {"name": "final_output:0", "dtype": "DT_FLOAT", "tensorShape": {"dim": [{"size": "1"}, {"size": "-1"}, {"size": "-1"}, {"size": "3"}]}}}}}, "modelTopology": {"node": [{"name": "depthwise_5/filter_in", "op": "Const", "attr": {"dtype": {"type": "DT_FLOAT"}, "value": {"tensor": {"dtype": "DT_FLOAT", "tensorShape": {"dim": [{"size": "3"}, {"size": "3"}, {"size": "3"}, {"size": "1"}]}}}}}, {"name": "depthwise_3/filter_in", "op": "Const", "attr": {"value": {"tensor": {"dtype": "DT_FLOAT", "tensorShape": {"dim": [{"size": "3"}, {"size": "3"}, {"size": "3"}, {"size": "1"}]}}}, "dtype": {"type": "DT_FLOAT"}}}, {"name": "generator/strided_slice_2/stack", "op": "Const", "attr": {"value": {"tensor": {"dtype": "DT_INT32", "tensorShape": {"dim": [{"size": "1"}]}}}, "dtype": {"type": "DT_INT32"}}}, {"name": "generator/strided_slice_2/stack_1", "op": "Const", "attr": {"dtype": {"type": "DT_INT32"}, "value": {"tensor": {"dtype": "DT_INT32", "tensorShape": {"dim": [{"size": "1"}]}}}}}, {"name": "generator/strided_slice_2/stack_2", "op": "Const", "attr": {"dtype": {"type": "DT_INT32"}, "value": {"tensor": {"dtype": "DT_INT32", "tensorShape": {"dim": [{"size": "1"}]}}}}}, {"name": "generator/mul_2/y", "op": "Const", "attr": {"value": {"tensor": {"dtype": "DT_INT32", "tensorShape": {}}}, "dtype": {"type": "DT_INT32"}}}, {"name": "generator/strided_slice/stack", "op": "Const", "attr": {"value": {"tensor": {"dtype": "DT_INT32", "tensorShape": {"dim": [{"size": "1"}]}}}, "dtype": {"type": "DT_INT32"}}}, {"name": "generator/strided_slice/stack_1", "op": "Const", "attr": {"dtype": {"type": "DT_INT32"}, "value": {"tensor": {"dtype": "DT_INT32", "tensorShape": {"dim": [{"size": "1"}]}}}}}, {"name": "generator/strided_slice/stack_2", "op": "Const", "attr": {"value": {"tensor": {"dtype": "DT_INT32", "tensorShape": {"dim": [{"size": "1"}]}}}, "dtype": {"type": "DT_INT32"}}}, {"name": "generator/mul/y", "op": "Const", "attr": {"value": {"tensor": {"dtype": "DT_INT32", "tensorShape": {}}}, "dtype": {"type": "DT_INT32"}}}, {"name": "generator/block_3/conv1/weights", "op": "Const", "attr": {"value": {"tensor": {"dtype": "DT_FLOAT", "tensorShape": {"dim": [{"size": "3"}, {"size": "3"}, {"size": "128"}, {"size": "128"}]}}}, "dtype": {"type": "DT_FLOAT"}}}, {"name": "generator/block_3/conv1/biases", "op": "Const", "attr": {"dtype": {"type": "DT_FLOAT"}, "value": {"tensor": {"dtype": "DT_FLOAT", "tensorShape": {"dim": [{"size": "128"}]}}}}}, {"name": "generator/block_3/conv2/weights", "op": "Const", "attr": {"dtype": {"type": "DT_FLOAT"}, "value": {"tensor": {"dtype": "DT_FLOAT", "tensorShape": {"dim": [{"size": "3"}, {"size": "3"}, {"size": "128"}, {"size": "128"}]}}}}}, {"name": "generator/block_3/conv2/biases", "op": "Const", "attr": {"dtype": {"type": "DT_FLOAT"}, "value": {"tensor": {"dtype": "DT_FLOAT", "tensorShape": {"dim": [{"size": "128"}]}}}}}, {"name": "generator/block_2/conv1/weights", "op": "Const", "attr": {"value": {"tensor": {"dtype": "DT_FLOAT", "tensorShape": {"dim": [{"size": "3"}, {"size": "3"}, {"size": "128"}, {"size": "128"}]}}}, "dtype": {"type": "DT_FLOAT"}}}, {"name": "generator/block_2/conv1/biases", "op": "Const", "attr": {"value": {"tensor": {"dtype": "DT_FLOAT", "tensorShape": {"dim": [{"size": "128"}]}}}, "dtype": {"type": "DT_FLOAT"}}}, {"name": "generator/block_2/conv2/weights", "op": "Const", "attr": {"dtype": {"type": "DT_FLOAT"}, "value": {"tensor": {"dtype": "DT_FLOAT", "tensorShape": {"dim": [{"size": "3"}, {"size": "3"}, {"size": "128"}, {"size": "128"}]}}}}}, {"name": "generator/block_2/conv2/biases", "op": "Const", "attr": {"value": {"tensor": {"dtype": "DT_FLOAT", "tensorShape": {"dim": [{"size": "128"}]}}}, "dtype": {"type": "DT_FLOAT"}}}, {"name": "generator/block_1/conv1/weights", "op": "Const", "attr": {"value": {"tensor": {"dtype": "DT_FLOAT", "tensorShape": {"dim": [{"size": "3"}, {"size": "3"}, {"size": "128"}, {"size": "128"}]}}}, "dtype": {"type": "DT_FLOAT"}}}, {"name": "generator/block_1/conv1/biases", "op": "Const", "attr": {"value": {"tensor": {"dtype": "DT_FLOAT", "tensorShape": {"dim": [{"size": "128"}]}}}, "dtype": {"type": "DT_FLOAT"}}}, {"name": "generator/block_1/conv2/weights", "op": "Const", "attr": {"dtype": {"type": "DT_FLOAT"}, "value": {"tensor": {"dtype": "DT_FLOAT", "tensorShape": {"dim": [{"size": "3"}, {"size": "3"}, {"size": "128"}, {"size": "128"}]}}}}}, {"name": "generator/block_1/conv2/biases", "op": "Const", "attr": {"value": {"tensor": {"dtype": "DT_FLOAT", "tensorShape": {"dim": [{"size": "128"}]}}}, "dtype": {"type": "DT_FLOAT"}}}, {"name": "generator/block_0/conv1/weights", "op": "Const", "attr": {"value": {"tensor": {"dtype": "DT_FLOAT", "tensorShape": {"dim": [{"size": "3"}, {"size": "3"}, {"size": "128"}, {"size": "128"}]}}}, "dtype": {"type": "DT_FLOAT"}}}, {"name": "generator/block_0/conv1/biases", "op": "Const", "attr": {"value": {"tensor": {"dtype": "DT_FLOAT", "tensorShape": {"dim": [{"size": "128"}]}}}, "dtype": {"type": "DT_FLOAT"}}}, {"name": "generator/block_0/conv2/weights", "op": "Const", "attr": {"dtype": {"type": "DT_FLOAT"}, "value": {"tensor": {"dtype": "DT_FLOAT", "tensorShape": {"dim": [{"size": "3"}, {"size": "3"}, {"size": "128"}, {"size": "128"}]}}}}}, {"name": "generator/block_0/conv2/biases", "op": "Const", "attr": {"value": {"tensor": {"dtype": "DT_FLOAT", "tensorShape": {"dim": [{"size": "128"}]}}}, "dtype": {"type": "DT_FLOAT"}}}, {"name": "generator/Conv_3/weights", "op": "Const", "attr": {"dtype": {"type": "DT_FLOAT"}, "value": {"tensor": {"dtype": "DT_FLOAT", "tensorShape": {"dim": [{"size": "3"}, {"size": "3"}, {"size": "64"}, {"size": "64"}]}}}}}, {"name": "generator/Conv_3/biases", "op": "Const", "attr": {"dtype": {"type": "DT_FLOAT"}, "value": {"tensor": {"dtype": "DT_FLOAT", "tensorShape": {"dim": [{"size": "64"}]}}}}}, {"name": "generator/Conv_4/weights", "op": "Const", "attr": {"dtype": {"type": "DT_FLOAT"}, "value": {"tensor": {"dtype": "DT_FLOAT", "tensorShape": {"dim": [{"size": "3"}, {"size": "3"}, {"size": "64"}, {"size": "128"}]}}}}}, {"name": "generator/Conv_4/biases", "op": "Const", "attr": {"dtype": {"type": "DT_FLOAT"}, "value": {"tensor": {"dtype": "DT_FLOAT", "tensorShape": {"dim": [{"size": "128"}]}}}}}, {"name": "generator/Conv_5/weights", "op": "Const", "attr": {"value": {"tensor": {"dtype": "DT_FLOAT", "tensorShape": {"dim": [{"size": "3"}, {"size": "3"}, {"size": "128"}, {"size": "64"}]}}}, "dtype": {"type": "DT_FLOAT"}}}, {"name": "generator/Conv_5/biases", "op": "Const", "attr": {"value": {"tensor": {"dtype": "DT_FLOAT", "tensorShape": {"dim": [{"size": "64"}]}}}, "dtype": {"type": "DT_FLOAT"}}}, {"name": "generator/strided_slice_1/stack", "op": "Const", "attr": {"value": {"tensor": {"dtype": "DT_INT32", "tensorShape": {"dim": [{"size": "1"}]}}}, "dtype": {"type": "DT_INT32"}}}, {"name": "generator/strided_slice_1/stack_1", "op": "Const", "attr": {"value": {"tensor": {"dtype": "DT_INT32", "tensorShape": {"dim": [{"size": "1"}]}}}, "dtype": {"type": "DT_INT32"}}}, {"name": "generator/strided_slice_1/stack_2", "op": "Const", "attr": {"value": {"tensor": {"dtype": "DT_INT32", "tensorShape": {"dim": [{"size": "1"}]}}}, "dtype": {"type": "DT_INT32"}}}, {"name": "generator/mul_1/y", "op": "Const", "attr": {"value": {"tensor": {"dtype": "DT_INT32", "tensorShape": {}}}, "dtype": {"type": "DT_INT32"}}}, {"name": "generator/Conv_1/weights", "op": "Const", "attr": {"value": {"tensor": {"dtype": "DT_FLOAT", "tensorShape": {"dim": [{"size": "3"}, {"size": "3"}, {"size": "32"}, {"size": "32"}]}}}, "dtype": {"type": "DT_FLOAT"}}}, {"name": "generator/Conv_1/biases", "op": "Const", "attr": {"dtype": {"type": "DT_FLOAT"}, "value": {"tensor": {"dtype": "DT_FLOAT", "tensorShape": {"dim": [{"size": "32"}]}}}}}, {"name": "generator/Conv_2/weights", "op": "Const", "attr": {"value": {"tensor": {"dtype": "DT_FLOAT", "tensorShape": {"dim": [{"size": "3"}, {"size": "3"}, {"size": "32"}, {"size": "64"}]}}}, "dtype": {"type": "DT_FLOAT"}}}, {"name": "generator/Conv_2/biases", "op": "Const", "attr": {"value": {"tensor": {"dtype": "DT_FLOAT", "tensorShape": {"dim": [{"size": "64"}]}}}, "dtype": {"type": "DT_FLOAT"}}}, {"name": "generator/Conv_6/weights", "op": "Const", "attr": {"value": {"tensor": {"dtype": "DT_FLOAT", "tensorShape": {"dim": [{"size": "3"}, {"size": "3"}, {"size": "64"}, {"size": "64"}]}}}, "dtype": {"type": "DT_FLOAT"}}}, {"name": "generator/Conv_6/biases", "op": "Const", "attr": {"value": {"tensor": {"dtype": "DT_FLOAT", "tensorShape": {"dim": [{"size": "64"}]}}}, "dtype": {"type": "DT_FLOAT"}}}, {"name": "generator/Conv_7/weights", "op": "Const", "attr": {"value": {"tensor": {"dtype": "DT_FLOAT", "tensorShape": {"dim": [{"size": "3"}, {"size": "3"}, {"size": "64"}, {"size": "32"}]}}}, "dtype": {"type": "DT_FLOAT"}}}, {"name": "generator/Conv_7/biases", "op": "Const", "attr": {"dtype": {"type": "DT_FLOAT"}, "value": {"tensor": {"dtype": "DT_FLOAT", "tensorShape": {"dim": [{"size": "32"}]}}}}}, {"name": "generator/strided_slice_3/stack", "op": "Const", "attr": {"value": {"tensor": {"dtype": "DT_INT32", "tensorShape": {"dim": [{"size": "1"}]}}}, "dtype": {"type": "DT_INT32"}}}, {"name": "generator/strided_slice_3/stack_1", "op": "Const", "attr": {"value": {"tensor": {"dtype": "DT_INT32", "tensorShape": {"dim": [{"size": "1"}]}}}, "dtype": {"type": "DT_INT32"}}}, {"name": "generator/strided_slice_3/stack_2", "op": "Const", "attr": {"value": {"tensor": {"dtype": "DT_INT32", "tensorShape": {"dim": [{"size": "1"}]}}}, "dtype": {"type": "DT_INT32"}}}, {"name": "generator/mul_3/y", "op": "Const", "attr": {"dtype": {"type": "DT_INT32"}, "value": {"tensor": {"dtype": "DT_INT32", "tensorShape": {}}}}}, {"name": "generator/Conv/weights", "op": "Const", "attr": {"value": {"tensor": {"dtype": "DT_FLOAT", "tensorShape": {"dim": [{"size": "7"}, {"size": "7"}, {"size": "3"}, {"size": "32"}]}}}, "dtype": {"type": "DT_FLOAT"}}}, {"name": "generator/Conv/biases", "op": "Const", "attr": {"dtype": {"type": "DT_FLOAT"}, "value": {"tensor": {"dtype": "DT_FLOAT", "tensorShape": {"dim": [{"size": "32"}]}}}}}, {"name": "generator/Conv_8/weights", "op": "Const", "attr": {"value": {"tensor": {"dtype": "DT_FLOAT", "tensorShape": {"dim": [{"size": "3"}, {"size": "3"}, {"size": "32"}, {"size": "32"}]}}}, "dtype": {"type": "DT_FLOAT"}}}, {"name": "generator/Conv_8/biases", "op": "Const", "attr": {"value": {"tensor": {"dtype": "DT_FLOAT", "tensorShape": {"dim": [{"size": "32"}]}}}, "dtype": {"type": "DT_FLOAT"}}}, {"name": "generator/Conv_9/weights", "op": "Const", "attr": {"value": {"tensor": {"dtype": "DT_FLOAT", "tensorShape": {"dim": [{"size": "7"}, {"size": "7"}, {"size": "32"}, {"size": "3"}]}}}, "dtype": {"type": "DT_FLOAT"}}}, {"name": "generator/Conv_9/biases", "op": "Const", "attr": {"value": {"tensor": {"dtype": "DT_FLOAT", "tensorShape": {"dim": [{"size": "3"}]}}}, "dtype": {"type": "DT_FLOAT"}}}, {"name": "depthwise_2/filter_in", "op": "Const", "attr": {"value": {"tensor": {"dtype": "DT_FLOAT", "tensorShape": {"dim": [{"size": "3"}, {"size": "3"}, {"size": "3"}, {"size": "1"}]}}}, "dtype": {"type": "DT_FLOAT"}}}, {"name": "depthwise_4/filter_in", "op": "Const", "attr": {"value": {"tensor": {"dtype": "DT_FLOAT", "tensorShape": {"dim": [{"size": "3"}, {"size": "3"}, {"size": "3"}, {"size": "1"}]}}}, "dtype": {"type": "DT_FLOAT"}}}, {"name": "add/y", "op": "Const", "attr": {"value": {"tensor": {"dtype": "DT_FLOAT", "tensorShape": {}}}, "dtype": {"type": "DT_FLOAT"}}}, {"name": "depthwise_1/filter_in", "op": "Const", "attr": {"value": {"tensor": {"dtype": "DT_FLOAT", "tensorShape": {"dim": [{"size": "3"}, {"size": "3"}, {"size": "3"}, {"size": "1"}]}}}, "dtype": {"type": "DT_FLOAT"}}}, {"name": "depthwise_6/filter_in", "op": "Const", "attr": {"value": {"tensor": {"dtype": "DT_FLOAT", "tensorShape": {"dim": [{"size": "3"}, {"size": "3"}, {"size": "3"}, {"size": "1"}]}}}, "dtype": {"type": "DT_FLOAT"}}}, {"name": "ones/packed/0", "op": "Const", "attr": {"value": {"tensor": {"dtype": "DT_INT32", "tensorShape": {}}}, "dtype": {"type": "DT_INT32"}}}, {"name": "strided_slice/stack", "op": "Const", "attr": {"dtype": {"type": "DT_INT32"}, "value": {"tensor": {"dtype": "DT_INT32", "tensorShape": {"dim": [{"size": "1"}]}}}}}, {"name": "strided_slice/stack_1", "op": "Const", "attr": {"value": {"tensor": {"dtype": "DT_INT32", "tensorShape": {"dim": [{"size": "1"}]}}}, "dtype": {"type": "DT_INT32"}}}, {"name": "strided_slice/stack_2", "op": "Const", "attr": {"value": {"tensor": {"dtype": "DT_INT32", "tensorShape": {"dim": [{"size": "1"}]}}}, "dtype": {"type": "DT_INT32"}}}, {"name": "strided_slice_1/stack", "op": "Const", "attr": {"value": {"tensor": {"dtype": "DT_INT32", "tensorShape": {"dim": [{"size": "1"}]}}}, "dtype": {"type": "DT_INT32"}}}, {"name": "strided_slice_1/stack_1", "op": "Const", "attr": {"value": {"tensor": {"dtype": "DT_INT32", "tensorShape": {"dim": [{"size": "1"}]}}}, "dtype": {"type": "DT_INT32"}}}, {"name": "strided_slice_1/stack_2", "op": "Const", "attr": {"value": {"tensor": {"dtype": "DT_INT32", "tensorShape": {"dim": [{"size": "1"}]}}}, "dtype": {"type": "DT_INT32"}}}, {"name": "ones/packed/3", "op": "Const", "attr": {"value": {"tensor": {"dtype": "DT_INT32", "tensorShape": {}}}, "dtype": {"type": "DT_INT32"}}}, {"name": "ones/Const", "op": "Const", "attr": {"value": {"tensor": {"dtype": "DT_FLOAT", "tensorShape": {}}}, "dtype": {"type": "DT_FLOAT"}}}, {"name": "depthwise/filter_in", "op": "Const", "attr": {"value": {"tensor": {"dtype": "DT_FLOAT", "tensorShape": {"dim": [{"size": "3"}, {"size": "3"}, {"size": "1"}, {"size": "1"}]}}}, "dtype": {"type": "DT_FLOAT"}}}, {"name": "input_photo", "op": "Placeholder", "attr": {"shape": {"shape": {"dim": [{"size": "1"}, {"size": "-1"}, {"size": "-1"}, {"size": "3"}]}}, "dtype": {"type": "DT_FLOAT"}}}, {"name": "generator/Conv/BiasAdd", "op": "_FusedConv2D", "input": ["input_photo", "generator/Conv/weights", "generator/Conv/biases"], "device": "/device:CPU:0", "attr": {"data_format": {"s": "TkhXQw=="}, "strides": {"list": {"i": ["1", "1", "1", "1"]}}, "explicit_paddings": {"list": {}}, "use_cudnn_on_gpu": {"b": true}, "num_args": {"i": "1"}, "epsilon": {"f": 0.0}, "padding": {"s": "U0FNRQ=="}, "fused_ops": {"list": {"s": ["Qmlhc0FkZA=="]}}, "dilations": {"list": {"i": ["1", "1", "1", "1"]}}, "T": {"type": "DT_FLOAT"}}}, {"name": "ArithmeticOptimizer/ReplaceMulWithSquare_mul_2", "op": "Square", "input": ["input_photo"], "attr": {"T": {"type": "DT_FLOAT"}}}, {"name": "depthwise_1", "op": "DepthwiseConv2dNative", "input": ["input_photo", "depthwise_1/filter_in"], "attr": {"dilations": {"list": {"i": ["1", "1", "1", "1"]}}, "T": {"type": "DT_FLOAT"}, "data_format": {"s": "TkhXQw=="}, "strides": {"list": {"i": ["1", "1", "1", "1"]}}, "explicit_paddings": {"list": {}}, "padding": {"s": "U0FNRQ=="}}}, {"name": "Shape", "op": "Shape", "input": ["input_photo"], "attr": {"T": {"type": "DT_FLOAT"}, "out_type": {"type": "DT_INT32"}}}, {"name": "generator/LeakyRelu", "op": "LeakyRelu", "input": ["generator/Conv/BiasAdd"], "attr": {"T": {"type": "DT_FLOAT"}, "alpha": {"f": 0.2}}}, {"name": "depthwise_4", "op": "DepthwiseConv2dNative", "input": ["ArithmeticOptimizer/ReplaceMulWithSquare_mul_2", "depthwise_4/filter_in"], "attr": {"dilations": {"list": {"i": ["1", "1", "1", "1"]}}, "T": {"type": "DT_FLOAT"}, "strides": {"list": {"i": ["1", "1", "1", "1"]}}, "data_format": {"s": "TkhXQw=="}, "explicit_paddings": {"list": {}}, "padding": {"s": "U0FNRQ=="}}}, {"name": "strided_slice", "op": "StridedSlice", "input": ["Shape", "strided_slice/stack", "strided_slice/stack_1", "strided_slice/stack_2"], "attr": {"shrink_axis_mask": {"i": "1"}, "ellipsis_mask": {"i": "0"}, "begin_mask": {"i": "0"}, "new_axis_mask": {"i": "0"}, "end_mask": {"i": "0"}, "T": {"type": "DT_INT32"}, "Index": {"type": "DT_INT32"}}}, {"name": "strided_slice_1", "op": "StridedSlice", "input": ["Shape", "strided_slice_1/stack", "strided_slice_1/stack_1", "strided_slice_1/stack_2"], "attr": {"T": {"type": "DT_INT32"}, "Index": {"type": "DT_INT32"}, "shrink_axis_mask": {"i": "1"}, "begin_mask": {"i": "0"}, "ellipsis_mask": {"i": "0"}, "new_axis_mask": {"i": "0"}, "end_mask": {"i": "0"}}}, {"name": "generator/Conv_1/BiasAdd", "op": "_FusedConv2D", "input": ["generator/LeakyRelu", "generator/Conv_1/weights", "generator/Conv_1/biases"], "device": "/device:CPU:0", "attr": {"dilations": {"list": {"i": ["1", "1", "1", "1"]}}, "T": {"type": "DT_FLOAT"}, "data_format": {"s": "TkhXQw=="}, "strides": {"list": {"i": ["1", "2", "2", "1"]}}, "use_cudnn_on_gpu": {"b": true}, "explicit_paddings": {"list": {}}, "num_args": {"i": "1"}, "epsilon": {"f": 0.0}, "padding": {"s": "U0FNRQ=="}, "fused_ops": {"list": {"s": ["Qmlhc0FkZA=="]}}}}, {"name": "ones/packed", "op": "Pack", "input": ["ones/packed/0", "strided_slice", "strided_slice_1", "ones/packed/3"], "attr": {"T": {"type": "DT_INT32"}, "axis": {"i": "0"}, "N": {"i": "4"}}}, {"name": "generator/LeakyRelu_1", "op": "LeakyRelu", "input": ["generator/Conv_1/BiasAdd"], "attr": {"T": {"type": "DT_FLOAT"}, "alpha": {"f": 0.2}}}, {"name": "ones", "op": "Fill", "input": ["ones/packed", "ones/Const"], "attr": {"T": {"type": "DT_FLOAT"}, "index_type": {"type": "DT_INT32"}}}, {"name": "generator/Conv_2/BiasAdd", "op": "_FusedConv2D", "input": ["generator/LeakyRelu_1", "generator/Conv_2/weights", "generator/Conv_2/biases"], "device": "/device:CPU:0", "attr": {"T": {"type": "DT_FLOAT"}, "data_format": {"s": "TkhXQw=="}, "strides": {"list": {"i": ["1", "1", "1", "1"]}}, "use_cudnn_on_gpu": {"b": true}, "explicit_paddings": {"list": {}}, "num_args": {"i": "1"}, "epsilon": {"f": 0.0}, "padding": {"s": "U0FNRQ=="}, "fused_ops": {"list": {"s": ["Qmlhc0FkZA=="]}}, "dilations": {"list": {"i": ["1", "1", "1", "1"]}}}}, {"name": "depthwise", "op": "DepthwiseConv2dNative", "input": ["ones", "depthwise/filter_in"], "attr": {"data_format": {"s": "TkhXQw=="}, "strides": {"list": {"i": ["1", "1", "1", "1"]}}, "explicit_paddings": {"list": {}}, "padding": {"s": "U0FNRQ=="}, "dilations": {"list": {"i": ["1", "1", "1", "1"]}}, "T": {"type": "DT_FLOAT"}}}, {"name": "generator/LeakyRelu_2", "op": "LeakyRelu", "input": ["generator/Conv_2/BiasAdd"], "attr": {"T": {"type": "DT_FLOAT"}, "alpha": {"f": 0.2}}}, {"name": "truediv_3", "op": "RealDiv", "input": ["depthwise_4", "depthwise"], "attr": {"T": {"type": "DT_FLOAT"}}}, {"name": "truediv", "op": "RealDiv", "input": ["depthwise_1", "depthwise"], "attr": {"T": {"type": "DT_FLOAT"}}}, {"name": "generator/Conv_3/BiasAdd", "op": "_FusedConv2D", "input": ["generator/LeakyRelu_2", "generator/Conv_3/weights", "generator/Conv_3/biases"], "device": "/device:CPU:0", "attr": {"dilations": {"list": {"i": ["1", "1", "1", "1"]}}, "T": {"type": "DT_FLOAT"}, "data_format": {"s": "TkhXQw=="}, "strides": {"list": {"i": ["1", "2", "2", "1"]}}, "explicit_paddings": {"list": {}}, "use_cudnn_on_gpu": {"b": true}, "num_args": {"i": "1"}, "epsilon": {"f": 0.0}, "padding": {"s": "U0FNRQ=="}, "fused_ops": {"list": {"s": ["Qmlhc0FkZA=="]}}}}, {"name": "ArithmeticOptimizer/ReplaceMulWithSquare_mul_3", "op": "Square", "input": ["truediv"], "attr": {"T": {"type": "DT_FLOAT"}}}, {"name": "generator/LeakyRelu_3", "op": "LeakyRelu", "input": ["generator/Conv_3/BiasAdd"], "attr": {"T": {"type": "DT_FLOAT"}, "alpha": {"f": 0.2}}}, {"name": "sub_1", "op": "Sub", "input": ["add/y", "ArithmeticOptimizer/ReplaceMulWithSquare_mul_3"], "attr": {"T": {"type": "DT_FLOAT"}}}, {"name": "generator/Conv_4/BiasAdd", "op": "_FusedConv2D", "input": ["generator/LeakyRelu_3", "generator/Conv_4/weights", "generator/Conv_4/biases"], "device": "/device:CPU:0", "attr": {"dilations": {"list": {"i": ["1", "1", "1", "1"]}}, "T": {"type": "DT_FLOAT"}, "strides": {"list": {"i": ["1", "1", "1", "1"]}}, "data_format": {"s": "TkhXQw=="}, "explicit_paddings": {"list": {}}, "use_cudnn_on_gpu": {"b": true}, "num_args": {"i": "1"}, "epsilon": {"f": 0.0}, "padding": {"s": "U0FNRQ=="}, "fused_ops": {"list": {"s": ["Qmlhc0FkZA=="]}}}}, {"name": "add", "op": "Add", "input": ["truediv_3", "sub_1"], "attr": {"T": {"type": "DT_FLOAT"}}}, {"name": "generator/LeakyRelu_4", "op": "LeakyRelu", "input": ["generator/Conv_4/BiasAdd"], "attr": {"T": {"type": "DT_FLOAT"}, "alpha": {"f": 0.2}}}, {"name": "generator/block_0/conv1/BiasAdd", "op": "_FusedConv2D", "input": ["generator/LeakyRelu_4", "generator/block_0/conv1/weights", "generator/block_0/conv1/biases"], "device": "/device:CPU:0", "attr": {"data_format": {"s": "TkhXQw=="}, "strides": {"list": {"i": ["1", "1", "1", "1"]}}, "explicit_paddings": {"list": {}}, "use_cudnn_on_gpu": {"b": true}, "num_args": {"i": "1"}, "epsilon": {"f": 0.0}, "padding": {"s": "U0FNRQ=="}, "fused_ops": {"list": {"s": ["Qmlhc0FkZA=="]}}, "dilations": {"list": {"i": ["1", "1", "1", "1"]}}, "T": {"type": "DT_FLOAT"}}}, {"name": "generator/block_0/LeakyRelu", "op": "LeakyRelu", "input": ["generator/block_0/conv1/BiasAdd"], "attr": {"T": {"type": "DT_FLOAT"}, "alpha": {"f": 0.2}}}, {"name": "generator/block_0/conv2/BiasAdd", "op": "_FusedConv2D", "input": ["generator/block_0/LeakyRelu", "generator/block_0/conv2/weights", "generator/block_0/conv2/biases"], "device": "/device:CPU:0", "attr": {"T": {"type": "DT_FLOAT"}, "data_format": {"s": "TkhXQw=="}, "strides": {"list": {"i": ["1", "1", "1", "1"]}}, "use_cudnn_on_gpu": {"b": true}, "explicit_paddings": {"list": {}}, "num_args": {"i": "1"}, "epsilon": {"f": 0.0}, "padding": {"s": "U0FNRQ=="}, "fused_ops": {"list": {"s": ["Qmlhc0FkZA=="]}}, "dilations": {"list": {"i": ["1", "1", "1", "1"]}}}}, {"name": "generator/block_0/add", "op": "AddV2", "input": ["generator/block_0/conv2/BiasAdd", "generator/LeakyRelu_4"], "attr": {"T": {"type": "DT_FLOAT"}}}, {"name": "generator/block_1/conv1/BiasAdd", "op": "_FusedConv2D", "input": ["generator/block_0/add", "generator/block_1/conv1/weights", "generator/block_1/conv1/biases"], "device": "/device:CPU:0", "attr": {"dilations": {"list": {"i": ["1", "1", "1", "1"]}}, "T": {"type": "DT_FLOAT"}, "data_format": {"s": "TkhXQw=="}, "strides": {"list": {"i": ["1", "1", "1", "1"]}}, "use_cudnn_on_gpu": {"b": true}, "explicit_paddings": {"list": {}}, "num_args": {"i": "1"}, "epsilon": {"f": 0.0}, "padding": {"s": "U0FNRQ=="}, "fused_ops": {"list": {"s": ["Qmlhc0FkZA=="]}}}}, {"name": "generator/block_1/LeakyRelu", "op": "LeakyRelu", "input": ["generator/block_1/conv1/BiasAdd"], "attr": {"T": {"type": "DT_FLOAT"}, "alpha": {"f": 0.2}}}, {"name": "generator/block_1/conv2/BiasAdd", "op": "_FusedConv2D", "input": ["generator/block_1/LeakyRelu", "generator/block_1/conv2/weights", "generator/block_1/conv2/biases"], "device": "/device:CPU:0", "attr": {"dilations": {"list": {"i": ["1", "1", "1", "1"]}}, "T": {"type": "DT_FLOAT"}, "strides": {"list": {"i": ["1", "1", "1", "1"]}}, "data_format": {"s": "TkhXQw=="}, "use_cudnn_on_gpu": {"b": true}, "explicit_paddings": {"list": {}}, "num_args": {"i": "1"}, "epsilon": {"f": 0.0}, "padding": {"s": "U0FNRQ=="}, "fused_ops": {"list": {"s": ["Qmlhc0FkZA=="]}}}}, {"name": "generator/block_1/add", "op": "AddV2", "input": ["generator/block_1/conv2/BiasAdd", "generator/block_0/add"], "attr": {"T": {"type": "DT_FLOAT"}}}, {"name": "generator/block_2/conv1/BiasAdd", "op": "_FusedConv2D", "input": ["generator/block_1/add", "generator/block_2/conv1/weights", "generator/block_2/conv1/biases"], "device": "/device:CPU:0", "attr": {"num_args": {"i": "1"}, "epsilon": {"f": 0.0}, "padding": {"s": "U0FNRQ=="}, "fused_ops": {"list": {"s": ["Qmlhc0FkZA=="]}}, "dilations": {"list": {"i": ["1", "1", "1", "1"]}}, "T": {"type": "DT_FLOAT"}, "data_format": {"s": "TkhXQw=="}, "strides": {"list": {"i": ["1", "1", "1", "1"]}}, "explicit_paddings": {"list": {}}, "use_cudnn_on_gpu": {"b": true}}}, {"name": "generator/block_2/LeakyRelu", "op": "LeakyRelu", "input": ["generator/block_2/conv1/BiasAdd"], "attr": {"T": {"type": "DT_FLOAT"}, "alpha": {"f": 0.2}}}, {"name": "generator/block_2/conv2/BiasAdd", "op": "_FusedConv2D", "input": ["generator/block_2/LeakyRelu", "generator/block_2/conv2/weights", "generator/block_2/conv2/biases"], "device": "/device:CPU:0", "attr": {"data_format": {"s": "TkhXQw=="}, "strides": {"list": {"i": ["1", "1", "1", "1"]}}, "use_cudnn_on_gpu": {"b": true}, "explicit_paddings": {"list": {}}, "num_args": {"i": "1"}, "epsilon": {"f": 0.0}, "padding": {"s": "U0FNRQ=="}, "fused_ops": {"list": {"s": ["Qmlhc0FkZA=="]}}, "dilations": {"list": {"i": ["1", "1", "1", "1"]}}, "T": {"type": "DT_FLOAT"}}}, {"name": "generator/block_2/add", "op": "AddV2", "input": ["generator/block_2/conv2/BiasAdd", "generator/block_1/add"], "attr": {"T": {"type": "DT_FLOAT"}}}, {"name": "generator/block_3/conv1/BiasAdd", "op": "_FusedConv2D", "input": ["generator/block_2/add", "generator/block_3/conv1/weights", "generator/block_3/conv1/biases"], "device": "/device:CPU:0", "attr": {"dilations": {"list": {"i": ["1", "1", "1", "1"]}}, "T": {"type": "DT_FLOAT"}, "strides": {"list": {"i": ["1", "1", "1", "1"]}}, "data_format": {"s": "TkhXQw=="}, "explicit_paddings": {"list": {}}, "use_cudnn_on_gpu": {"b": true}, "num_args": {"i": "1"}, "epsilon": {"f": 0.0}, "padding": {"s": "U0FNRQ=="}, "fused_ops": {"list": {"s": ["Qmlhc0FkZA=="]}}}}, {"name": "generator/block_3/LeakyRelu", "op": "LeakyRelu", "input": ["generator/block_3/conv1/BiasAdd"], "attr": {"alpha": {"f": 0.2}, "T": {"type": "DT_FLOAT"}}}, {"name": "generator/block_3/conv2/BiasAdd", "op": "_FusedConv2D", "input": ["generator/block_3/LeakyRelu", "generator/block_3/conv2/weights", "generator/block_3/conv2/biases"], "device": "/device:CPU:0", "attr": {"epsilon": {"f": 0.0}, "padding": {"s": "U0FNRQ=="}, "fused_ops": {"list": {"s": ["Qmlhc0FkZA=="]}}, "dilations": {"list": {"i": ["1", "1", "1", "1"]}}, "T": {"type": "DT_FLOAT"}, "data_format": {"s": "TkhXQw=="}, "strides": {"list": {"i": ["1", "1", "1", "1"]}}, "use_cudnn_on_gpu": {"b": true}, "explicit_paddings": {"list": {}}, "num_args": {"i": "1"}}}, {"name": "generator/block_3/add", "op": "AddV2", "input": ["generator/block_3/conv2/BiasAdd", "generator/block_2/add"], "attr": {"T": {"type": "DT_FLOAT"}}}, {"name": "generator/Conv_5/BiasAdd", "op": "_FusedConv2D", "input": ["generator/block_3/add", "generator/Conv_5/weights", "generator/Conv_5/biases"], "device": "/device:CPU:0", "attr": {"num_args": {"i": "1"}, "epsilon": {"f": 0.0}, "padding": {"s": "U0FNRQ=="}, "fused_ops": {"list": {"s": ["Qmlhc0FkZA=="]}}, "dilations": {"list": {"i": ["1", "1", "1", "1"]}}, "T": {"type": "DT_FLOAT"}, "data_format": {"s": "TkhXQw=="}, "strides": {"list": {"i": ["1", "1", "1", "1"]}}, "explicit_paddings": {"list": {}}, "use_cudnn_on_gpu": {"b": true}}}, {"name": "generator/LeakyRelu_5", "op": "LeakyRelu", "input": ["generator/Conv_5/BiasAdd"], "attr": {"T": {"type": "DT_FLOAT"}, "alpha": {"f": 0.2}}}, {"name": "generator/Shape", "op": "Shape", "input": ["generator/LeakyRelu_5"], "attr": {"T": {"type": "DT_FLOAT"}, "out_type": {"type": "DT_INT32"}}}, {"name": "generator/Shape_1", "op": "Shape", "input": ["generator/LeakyRelu_5"], "attr": {"T": {"type": "DT_FLOAT"}, "out_type": {"type": "DT_INT32"}}}, {"name": "generator/strided_slice", "op": "StridedSlice", "input": ["generator/Shape", "generator/strided_slice/stack", "generator/strided_slice/stack_1", "generator/strided_slice/stack_2"], "attr": {"T": {"type": "DT_INT32"}, "Index": {"type": "DT_INT32"}, "shrink_axis_mask": {"i": "1"}, "ellipsis_mask": {"i": "0"}, "begin_mask": {"i": "0"}, "new_axis_mask": {"i": "0"}, "end_mask": {"i": "0"}}}, {"name": "generator/strided_slice_1", "op": "StridedSlice", "input": ["generator/Shape_1", "generator/strided_slice_1/stack", "generator/strided_slice_1/stack_1", "generator/strided_slice_1/stack_2"], "attr": {"ellipsis_mask": {"i": "0"}, "begin_mask": {"i": "0"}, "new_axis_mask": {"i": "0"}, "end_mask": {"i": "0"}, "T": {"type": "DT_INT32"}, "Index": {"type": "DT_INT32"}, "shrink_axis_mask": {"i": "1"}}}, {"name": "generator/mul", "op": "Mul", "input": ["generator/strided_slice", "generator/mul/y"], "attr": {"T": {"type": "DT_INT32"}}}, {"name": "generator/mul_1", "op": "Mul", "input": ["generator/strided_slice_1", "generator/mul_1/y"], "attr": {"T": {"type": "DT_INT32"}}}, {"name": "generator/ResizeBilinear/size", "op": "Pack", "input": ["generator/mul", "generator/mul_1"], "attr": {"N": {"i": "2"}, "T": {"type": "DT_INT32"}, "axis": {"i": "0"}}}, {"name": "generator/ResizeBilinear", "op": "ResizeBilinear", "input": ["generator/LeakyRelu_5", "generator/ResizeBilinear/size"], "attr": {"align_corners": {"b": false}, "half_pixel_centers": {"b": false}, "T": {"type": "DT_FLOAT"}}}, {"name": "generator/add", "op": "AddV2", "input": ["generator/ResizeBilinear", "generator/LeakyRelu_2"], "attr": {"T": {"type": "DT_FLOAT"}}}, {"name": "generator/Conv_6/BiasAdd", "op": "_FusedConv2D", "input": ["generator/add", "generator/Conv_6/weights", "generator/Conv_6/biases"], "device": "/device:CPU:0", "attr": {"num_args": {"i": "1"}, "epsilon": {"f": 0.0}, "padding": {"s": "U0FNRQ=="}, "fused_ops": {"list": {"s": ["Qmlhc0FkZA=="]}}, "dilations": {"list": {"i": ["1", "1", "1", "1"]}}, "T": {"type": "DT_FLOAT"}, "strides": {"list": {"i": ["1", "1", "1", "1"]}}, "data_format": {"s": "TkhXQw=="}, "use_cudnn_on_gpu": {"b": true}, "explicit_paddings": {"list": {}}}}, {"name": "generator/LeakyRelu_6", "op": "LeakyRelu", "input": ["generator/Conv_6/BiasAdd"], "attr": {"T": {"type": "DT_FLOAT"}, "alpha": {"f": 0.2}}}, {"name": "generator/Conv_7/BiasAdd", "op": "_FusedConv2D", "input": ["generator/LeakyRelu_6", "generator/Conv_7/weights", "generator/Conv_7/biases"], "device": "/device:CPU:0", "attr": {"T": {"type": "DT_FLOAT"}, "data_format": {"s": "TkhXQw=="}, "strides": {"list": {"i": ["1", "1", "1", "1"]}}, "use_cudnn_on_gpu": {"b": true}, "explicit_paddings": {"list": {}}, "num_args": {"i": "1"}, "epsilon": {"f": 0.0}, "padding": {"s": "U0FNRQ=="}, "fused_ops": {"list": {"s": ["Qmlhc0FkZA=="]}}, "dilations": {"list": {"i": ["1", "1", "1", "1"]}}}}, {"name": "generator/LeakyRelu_7", "op": "LeakyRelu", "input": ["generator/Conv_7/BiasAdd"], "attr": {"T": {"type": "DT_FLOAT"}, "alpha": {"f": 0.2}}}, {"name": "generator/Shape_2", "op": "Shape", "input": ["generator/LeakyRelu_7"], "attr": {"T": {"type": "DT_FLOAT"}, "out_type": {"type": "DT_INT32"}}}, {"name": "generator/Shape_3", "op": "Shape", "input": ["generator/LeakyRelu_7"], "attr": {"T": {"type": "DT_FLOAT"}, "out_type": {"type": "DT_INT32"}}}, {"name": "generator/strided_slice_2", "op": "StridedSlice", "input": ["generator/Shape_2", "generator/strided_slice_2/stack", "generator/strided_slice_2/stack_1", "generator/strided_slice_2/stack_2"], "attr": {"shrink_axis_mask": {"i": "1"}, "begin_mask": {"i": "0"}, "ellipsis_mask": {"i": "0"}, "new_axis_mask": {"i": "0"}, "end_mask": {"i": "0"}, "Index": {"type": "DT_INT32"}, "T": {"type": "DT_INT32"}}}, {"name": "generator/strided_slice_3", "op": "StridedSlice", "input": ["generator/Shape_3", "generator/strided_slice_3/stack", "generator/strided_slice_3/stack_1", "generator/strided_slice_3/stack_2"], "attr": {"T": {"type": "DT_INT32"}, "Index": {"type": "DT_INT32"}, "shrink_axis_mask": {"i": "1"}, "ellipsis_mask": {"i": "0"}, "begin_mask": {"i": "0"}, "new_axis_mask": {"i": "0"}, "end_mask": {"i": "0"}}}, {"name": "generator/mul_2", "op": "Mul", "input": ["generator/strided_slice_2", "generator/mul_2/y"], "attr": {"T": {"type": "DT_INT32"}}}, {"name": "generator/mul_3", "op": "Mul", "input": ["generator/strided_slice_3", "generator/mul_3/y"], "attr": {"T": {"type": "DT_INT32"}}}, {"name": "generator/ResizeBilinear_1/size", "op": "Pack", "input": ["generator/mul_2", "generator/mul_3"], "attr": {"T": {"type": "DT_INT32"}, "axis": {"i": "0"}, "N": {"i": "2"}}}, {"name": "generator/ResizeBilinear_1", "op": "ResizeBilinear", "input": ["generator/LeakyRelu_7", "generator/ResizeBilinear_1/size"], "attr": {"T": {"type": "DT_FLOAT"}, "align_corners": {"b": false}, "half_pixel_centers": {"b": false}}}, {"name": "generator/add_1", "op": "AddV2", "input": ["generator/ResizeBilinear_1", "generator/LeakyRelu"], "attr": {"T": {"type": "DT_FLOAT"}}}, {"name": "generator/Conv_8/BiasAdd", "op": "_FusedConv2D", "input": ["generator/add_1", "generator/Conv_8/weights", "generator/Conv_8/biases"], "device": "/device:CPU:0", "attr": {"dilations": {"list": {"i": ["1", "1", "1", "1"]}}, "T": {"type": "DT_FLOAT"}, "data_format": {"s": "TkhXQw=="}, "strides": {"list": {"i": ["1", "1", "1", "1"]}}, "use_cudnn_on_gpu": {"b": true}, "explicit_paddings": {"list": {}}, "num_args": {"i": "1"}, "epsilon": {"f": 0.0}, "padding": {"s": "U0FNRQ=="}, "fused_ops": {"list": {"s": ["Qmlhc0FkZA=="]}}}}, {"name": "generator/LeakyRelu_8", "op": "LeakyRelu", "input": ["generator/Conv_8/BiasAdd"], "attr": {"T": {"type": "DT_FLOAT"}, "alpha": {"f": 0.2}}}, {"name": "generator/Conv_9/BiasAdd", "op": "_FusedConv2D", "input": ["generator/LeakyRelu_8", "generator/Conv_9/weights", "generator/Conv_9/biases"], "device": "/device:CPU:0", "attr": {"dilations": {"list": {"i": ["1", "1", "1", "1"]}}, "T": {"type": "DT_FLOAT"}, "data_format": {"s": "TkhXQw=="}, "strides": {"list": {"i": ["1", "1", "1", "1"]}}, "explicit_paddings": {"list": {}}, "use_cudnn_on_gpu": {"b": true}, "num_args": {"i": "1"}, "epsilon": {"f": 0.0}, "padding": {"s": "U0FNRQ=="}, "fused_ops": {"list": {"s": ["Qmlhc0FkZA=="]}}}}, {"name": "depthwise_2", "op": "DepthwiseConv2dNative", "input": ["generator/Conv_9/BiasAdd", "depthwise_2/filter_in"], "attr": {"dilations": {"list": {"i": ["1", "1", "1", "1"]}}, "T": {"type": "DT_FLOAT"}, "strides": {"list": {"i": ["1", "1", "1", "1"]}}, "data_format": {"s": "TkhXQw=="}, "explicit_paddings": {"list": {}}, "padding": {"s": "U0FNRQ=="}}}, {"name": "mul", "op": "Mul", "input": ["input_photo", "generator/Conv_9/BiasAdd"], "attr": {"T": {"type": "DT_FLOAT"}}}, {"name": "truediv_1", "op": "RealDiv", "input": ["depthwise_2", "depthwise"], "attr": {"T": {"type": "DT_FLOAT"}}}, {"name": "depthwise_3", "op": "DepthwiseConv2dNative", "input": ["mul", "depthwise_3/filter_in"], "attr": {"strides": {"list": {"i": ["1", "1", "1", "1"]}}, "data_format": {"s": "TkhXQw=="}, "explicit_paddings": {"list": {}}, "padding": {"s": "U0FNRQ=="}, "dilations": {"list": {"i": ["1", "1", "1", "1"]}}, "T": {"type": "DT_FLOAT"}}}, {"name": "mul_1", "op": "Mul", "input": ["truediv", "truediv_1"], "attr": {"T": {"type": "DT_FLOAT"}}}, {"name": "truediv_2", "op": "RealDiv", "input": ["depthwise_3", "depthwise"], "attr": {"T": {"type": "DT_FLOAT"}}}, {"name": "sub", "op": "Sub", "input": ["truediv_2", "mul_1"], "attr": {"T": {"type": "DT_FLOAT"}}}, {"name": "truediv_4", "op": "RealDiv", "input": ["sub", "add"], "attr": {"T": {"type": "DT_FLOAT"}}}, {"name": "depthwise_5", "op": "DepthwiseConv2dNative", "input": ["truediv_4", "depthwise_5/filter_in"], "attr": {"padding": {"s": "U0FNRQ=="}, "dilations": {"list": {"i": ["1", "1", "1", "1"]}}, "T": {"type": "DT_FLOAT"}, "data_format": {"s": "TkhXQw=="}, "strides": {"list": {"i": ["1", "1", "1", "1"]}}, "explicit_paddings": {"list": {}}}}, {"name": "mul_4", "op": "Mul", "input": ["truediv_4", "truediv"], "attr": {"T": {"type": "DT_FLOAT"}}}, {"name": "truediv_5", "op": "RealDiv", "input": ["depthwise_5", "depthwise"], "attr": {"T": {"type": "DT_FLOAT"}}}, {"name": "sub_2", "op": "Sub", "input": ["truediv_1", "mul_4"], "attr": {"T": {"type": "DT_FLOAT"}}}, {"name": "mul_5", "op": "Mul", "input": ["truediv_5", "input_photo"], "attr": {"T": {"type": "DT_FLOAT"}}}, {"name": "depthwise_6", "op": "DepthwiseConv2dNative", "input": ["sub_2", "depthwise_6/filter_in"], "attr": {"strides": {"list": {"i": ["1", "1", "1", "1"]}}, "data_format": {"s": "TkhXQw=="}, "explicit_paddings": {"list": {}}, "padding": {"s": "U0FNRQ=="}, "dilations": {"list": {"i": ["1", "1", "1", "1"]}}, "T": {"type": "DT_FLOAT"}}}, {"name": "truediv_6", "op": "RealDiv", "input": ["depthwise_6", "depthwise"], "attr": {"T": {"type": "DT_FLOAT"}}}, {"name": "add_1", "op": "AddV2", "input": ["mul_5", "truediv_6"], "attr": {"T": {"type": "DT_FLOAT"}}}, {"name": "final_output", "op": "Identity", "input": ["add_1"], "attr": {"T": {"type": "DT_FLOAT"}}}], "library": {}, "versions": {"producer": 440}}, "weightsManifest": [{"paths": ["group1-shard1of1.bin"], "weights": [{"name": "depthwise_5/filter_in", "shape": [3, 3, 3, 1], "dtype": "float32", "quantization": {"dtype": "float16", "original_dtype": "float32"}}, {"name": "depthwise_3/filter_in", "shape": [3, 3, 3, 1], "dtype": "float32", "quantization": {"dtype": "float16", "original_dtype": "float32"}}, {"name": "generator/strided_slice_2/stack", "shape": [1], "dtype": "int32"}, {"name": "generator/strided_slice_2/stack_1", "shape": [1], "dtype": "int32"}, {"name": "generator/strided_slice_2/stack_2", "shape": [1], "dtype": "int32"}, {"name": "generator/mul_2/y", "shape": [], "dtype": "int32"}, {"name": "generator/strided_slice/stack", "shape": [1], "dtype": "int32"}, {"name": "generator/strided_slice/stack_1", "shape": [1], "dtype": "int32"}, {"name": "generator/strided_slice/stack_2", "shape": [1], "dtype": "int32"}, {"name": "generator/mul/y", "shape": [], "dtype": "int32"}, {"name": "generator/block_3/conv1/weights", "shape": [3, 3, 128, 128], "dtype": "float32", "quantization": {"dtype": "float16", "original_dtype": "float32"}}, {"name": "generator/block_3/conv1/biases", "shape": [128], "dtype": "float32", "quantization": {"dtype": "float16", "original_dtype": "float32"}}, {"name": "generator/block_3/conv2/weights", "shape": [3, 3, 128, 128], "dtype": "float32", "quantization": {"dtype": "float16", "original_dtype": "float32"}}, {"name": "generator/block_3/conv2/biases", "shape": [128], "dtype": "float32", "quantization": {"dtype": "float16", "original_dtype": "float32"}}, {"name": "generator/block_2/conv1/weights", "shape": [3, 3, 128, 128], "dtype": "float32", "quantization": {"dtype": "float16", "original_dtype": "float32"}}, {"name": "generator/block_2/conv1/biases", "shape": [128], "dtype": "float32", "quantization": {"dtype": "float16", "original_dtype": "float32"}}, {"name": "generator/block_2/conv2/weights", "shape": [3, 3, 128, 128], "dtype": "float32", "quantization": {"dtype": "float16", "original_dtype": "float32"}}, {"name": "generator/block_2/conv2/biases", "shape": [128], "dtype": "float32", "quantization": {"dtype": "float16", "original_dtype": "float32"}}, {"name": "generator/block_1/conv1/weights", "shape": [3, 3, 128, 128], "dtype": "float32", "quantization": {"dtype": "float16", "original_dtype": "float32"}}, {"name": "generator/block_1/conv1/biases", "shape": [128], "dtype": "float32", "quantization": {"dtype": "float16", "original_dtype": "float32"}}, {"name": "generator/block_1/conv2/weights", "shape": [3, 3, 128, 128], "dtype": "float32", "quantization": {"dtype": "float16", "original_dtype": "float32"}}, {"name": "generator/block_1/conv2/biases", "shape": [128], "dtype": "float32", "quantization": {"dtype": "float16", "original_dtype": "float32"}}, {"name": "generator/block_0/conv1/weights", "shape": [3, 3, 128, 128], "dtype": "float32", "quantization": {"dtype": "float16", "original_dtype": "float32"}}, {"name": "generator/block_0/conv1/biases", "shape": [128], "dtype": "float32", "quantization": {"dtype": "float16", "original_dtype": "float32"}}, {"name": "generator/block_0/conv2/weights", "shape": [3, 3, 128, 128], "dtype": "float32", "quantization": {"dtype": "float16", "original_dtype": "float32"}}, {"name": "generator/block_0/conv2/biases", "shape": [128], "dtype": "float32", "quantization": {"dtype": "float16", "original_dtype": "float32"}}, {"name": "generator/Conv_3/weights", "shape": [3, 3, 64, 64], "dtype": "float32", "quantization": {"dtype": "float16", "original_dtype": "float32"}}, {"name": "generator/Conv_3/biases", "shape": [64], "dtype": "float32", "quantization": {"dtype": "float16", "original_dtype": "float32"}}, {"name": "generator/Conv_4/weights", "shape": [3, 3, 64, 128], "dtype": "float32", "quantization": {"dtype": "float16", "original_dtype": "float32"}}, {"name": "generator/Conv_4/biases", "shape": [128], "dtype": "float32", "quantization": {"dtype": "float16", "original_dtype": "float32"}}, {"name": "generator/Conv_5/weights", "shape": [3, 3, 128, 64], "dtype": "float32", "quantization": {"dtype": "float16", "original_dtype": "float32"}}, {"name": "generator/Conv_5/biases", "shape": [64], "dtype": "float32", "quantization": {"dtype": "float16", "original_dtype": "float32"}}, {"name": "generator/strided_slice_1/stack", "shape": [1], "dtype": "int32"}, {"name": "generator/strided_slice_1/stack_1", "shape": [1], "dtype": "int32"}, {"name": "generator/strided_slice_1/stack_2", "shape": [1], "dtype": "int32"}, {"name": "generator/mul_1/y", "shape": [], "dtype": "int32"}, {"name": "generator/Conv_1/weights", "shape": [3, 3, 32, 32], "dtype": "float32", "quantization": {"dtype": "float16", "original_dtype": "float32"}}, {"name": "generator/Conv_1/biases", "shape": [32], "dtype": "float32", "quantization": {"dtype": "float16", "original_dtype": "float32"}}, {"name": "generator/Conv_2/weights", "shape": [3, 3, 32, 64], "dtype": "float32", "quantization": {"dtype": "float16", "original_dtype": "float32"}}, {"name": "generator/Conv_2/biases", "shape": [64], "dtype": "float32", "quantization": {"dtype": "float16", "original_dtype": "float32"}}, {"name": "generator/Conv_6/weights", "shape": [3, 3, 64, 64], "dtype": "float32", "quantization": {"dtype": "float16", "original_dtype": "float32"}}, {"name": "generator/Conv_6/biases", "shape": [64], "dtype": "float32", "quantization": {"dtype": "float16", "original_dtype": "float32"}}, {"name": "generator/Conv_7/weights", "shape": [3, 3, 64, 32], "dtype": "float32", "quantization": {"dtype": "float16", "original_dtype": "float32"}}, {"name": "generator/Conv_7/biases", "shape": [32], "dtype": "float32", "quantization": {"dtype": "float16", "original_dtype": "float32"}}, {"name": "generator/strided_slice_3/stack", "shape": [1], "dtype": "int32"}, {"name": "generator/strided_slice_3/stack_1", "shape": [1], "dtype": "int32"}, {"name": "generator/strided_slice_3/stack_2", "shape": [1], "dtype": "int32"}, {"name": "generator/mul_3/y", "shape": [], "dtype": "int32"}, {"name": "generator/Conv/weights", "shape": [7, 7, 3, 32], "dtype": "float32", "quantization": {"dtype": "float16", "original_dtype": "float32"}}, {"name": "generator/Conv/biases", "shape": [32], "dtype": "float32", "quantization": {"dtype": "float16", "original_dtype": "float32"}}, {"name": "generator/Conv_8/weights", "shape": [3, 3, 32, 32], "dtype": "float32", "quantization": {"dtype": "float16", "original_dtype": "float32"}}, {"name": "generator/Conv_8/biases", "shape": [32], "dtype": "float32", "quantization": {"dtype": "float16", "original_dtype": "float32"}}, {"name": "generator/Conv_9/weights", "shape": [7, 7, 32, 3], "dtype": "float32", "quantization": {"dtype": "float16", "original_dtype": "float32"}}, {"name": "generator/Conv_9/biases", "shape": [3], "dtype": "float32", "quantization": {"dtype": "float16", "original_dtype": "float32"}}, {"name": "depthwise_2/filter_in", "shape": [3, 3, 3, 1], "dtype": "float32", "quantization": {"dtype": "float16", "original_dtype": "float32"}}, {"name": "depthwise_4/filter_in", "shape": [3, 3, 3, 1], "dtype": "float32", "quantization": {"dtype": "float16", "original_dtype": "float32"}}, {"name": "add/y", "shape": [], "dtype": "float32", "quantization": {"dtype": "float16", "original_dtype": "float32"}}, {"name": "depthwise_1/filter_in", "shape": [3, 3, 3, 1], "dtype": "float32", "quantization": {"dtype": "float16", "original_dtype": "float32"}}, {"name": "depthwise_6/filter_in", "shape": [3, 3, 3, 1], "dtype": "float32", "quantization": {"dtype": "float16", "original_dtype": "float32"}}, {"name": "ones/packed/0", "shape": [], "dtype": "int32"}, {"name": "strided_slice/stack", "shape": [1], "dtype": "int32"}, {"name": "strided_slice/stack_1", "shape": [1], "dtype": "int32"}, {"name": "strided_slice/stack_2", "shape": [1], "dtype": "int32"}, {"name": "strided_slice_1/stack", "shape": [1], "dtype": "int32"}, {"name": "strided_slice_1/stack_1", "shape": [1], "dtype": "int32"}, {"name": "strided_slice_1/stack_2", "shape": [1], "dtype": "int32"}, {"name": "ones/packed/3", "shape": [], "dtype": "int32"}, {"name": "ones/Const", "shape": [], "dtype": "float32", "quantization": {"dtype": "float16", "original_dtype": "float32"}}, {"name": "depthwise/filter_in", "shape": [3, 3, 1, 1], "dtype": "float32", "quantization": {"dtype": "float16", "original_dtype": "float32"}}]}]} -------------------------------------------------------------------------------- /models/CartoonGAN/web-uint8/group1-shard1of1.bin: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pratapvardhan/cartoonizer-with-tfjs/0a1c1964e44721d73853bc24f7005332ed398021/models/CartoonGAN/web-uint8/group1-shard1of1.bin -------------------------------------------------------------------------------- /models/CartoonGAN/web-uint8/model.json: -------------------------------------------------------------------------------- 1 | {"format": "graph-model", "generatedBy": "2.3.0", "convertedBy": "TensorFlow.js Converter v2.3.0", "userDefinedMetadata": {"signature": {"inputs": {"input_photo:0": {"name": "input_photo:0", "dtype": "DT_FLOAT", "tensorShape": {"dim": [{"size": "1"}, {"size": "-1"}, {"size": "-1"}, {"size": "3"}]}}}, "outputs": {"final_output:0": {"name": "final_output:0", "dtype": "DT_FLOAT", "tensorShape": {"dim": [{"size": "1"}, {"size": "-1"}, {"size": "-1"}, {"size": "3"}]}}}}}, "modelTopology": {"node": [{"name": "depthwise_5/filter_in", "op": "Const", "attr": {"value": {"tensor": {"dtype": "DT_FLOAT", "tensorShape": {"dim": [{"size": "3"}, {"size": "3"}, {"size": "3"}, {"size": "1"}]}}}, "dtype": {"type": "DT_FLOAT"}}}, {"name": "depthwise_3/filter_in", "op": "Const", "attr": {"dtype": {"type": "DT_FLOAT"}, "value": {"tensor": {"dtype": "DT_FLOAT", "tensorShape": {"dim": [{"size": "3"}, {"size": "3"}, {"size": "3"}, {"size": "1"}]}}}}}, {"name": "generator/strided_slice_2/stack", "op": "Const", "attr": {"dtype": {"type": "DT_INT32"}, "value": {"tensor": {"dtype": "DT_INT32", "tensorShape": {"dim": [{"size": "1"}]}}}}}, {"name": "generator/strided_slice_2/stack_1", "op": "Const", "attr": {"value": {"tensor": {"dtype": "DT_INT32", "tensorShape": {"dim": [{"size": "1"}]}}}, "dtype": {"type": "DT_INT32"}}}, {"name": "generator/strided_slice_2/stack_2", "op": "Const", "attr": {"value": {"tensor": {"dtype": "DT_INT32", "tensorShape": {"dim": [{"size": "1"}]}}}, "dtype": {"type": "DT_INT32"}}}, {"name": "generator/mul_2/y", "op": "Const", "attr": {"dtype": {"type": "DT_INT32"}, "value": {"tensor": {"dtype": "DT_INT32", "tensorShape": {}}}}}, {"name": "generator/strided_slice/stack", "op": "Const", "attr": {"value": {"tensor": {"dtype": "DT_INT32", "tensorShape": {"dim": [{"size": "1"}]}}}, "dtype": {"type": "DT_INT32"}}}, {"name": "generator/strided_slice/stack_1", "op": "Const", "attr": {"value": {"tensor": {"dtype": "DT_INT32", "tensorShape": {"dim": [{"size": "1"}]}}}, "dtype": {"type": "DT_INT32"}}}, {"name": "generator/strided_slice/stack_2", "op": "Const", "attr": {"value": {"tensor": {"dtype": "DT_INT32", "tensorShape": {"dim": [{"size": "1"}]}}}, "dtype": {"type": "DT_INT32"}}}, {"name": "generator/mul/y", "op": "Const", "attr": {"value": {"tensor": {"dtype": "DT_INT32", "tensorShape": {}}}, "dtype": {"type": "DT_INT32"}}}, {"name": "generator/block_3/conv1/weights", "op": "Const", "attr": {"value": {"tensor": {"dtype": "DT_FLOAT", "tensorShape": {"dim": [{"size": "3"}, {"size": "3"}, {"size": "128"}, {"size": "128"}]}}}, "dtype": {"type": "DT_FLOAT"}}}, {"name": "generator/block_3/conv1/biases", "op": "Const", "attr": {"value": {"tensor": {"dtype": "DT_FLOAT", "tensorShape": {"dim": [{"size": "128"}]}}}, "dtype": {"type": "DT_FLOAT"}}}, {"name": "generator/block_3/conv2/weights", "op": "Const", "attr": {"value": {"tensor": {"dtype": "DT_FLOAT", "tensorShape": {"dim": [{"size": "3"}, {"size": "3"}, {"size": "128"}, {"size": "128"}]}}}, "dtype": {"type": "DT_FLOAT"}}}, {"name": "generator/block_3/conv2/biases", "op": "Const", "attr": {"value": {"tensor": {"dtype": "DT_FLOAT", "tensorShape": {"dim": [{"size": "128"}]}}}, "dtype": {"type": "DT_FLOAT"}}}, {"name": "generator/block_2/conv1/weights", "op": "Const", "attr": {"value": {"tensor": {"dtype": "DT_FLOAT", "tensorShape": {"dim": [{"size": "3"}, {"size": "3"}, {"size": "128"}, {"size": "128"}]}}}, "dtype": {"type": "DT_FLOAT"}}}, {"name": "generator/block_2/conv1/biases", "op": "Const", "attr": {"value": {"tensor": {"dtype": "DT_FLOAT", "tensorShape": {"dim": [{"size": "128"}]}}}, "dtype": {"type": "DT_FLOAT"}}}, {"name": "generator/block_2/conv2/weights", "op": "Const", "attr": {"value": {"tensor": {"dtype": "DT_FLOAT", "tensorShape": {"dim": [{"size": "3"}, {"size": "3"}, {"size": "128"}, {"size": "128"}]}}}, "dtype": {"type": "DT_FLOAT"}}}, {"name": "generator/block_2/conv2/biases", "op": "Const", "attr": {"dtype": {"type": "DT_FLOAT"}, "value": {"tensor": {"dtype": "DT_FLOAT", "tensorShape": {"dim": [{"size": "128"}]}}}}}, {"name": "generator/block_1/conv1/weights", "op": "Const", "attr": {"value": {"tensor": {"dtype": "DT_FLOAT", "tensorShape": {"dim": [{"size": "3"}, {"size": "3"}, {"size": "128"}, {"size": "128"}]}}}, "dtype": {"type": "DT_FLOAT"}}}, {"name": "generator/block_1/conv1/biases", "op": "Const", "attr": {"dtype": {"type": "DT_FLOAT"}, "value": {"tensor": {"dtype": "DT_FLOAT", "tensorShape": {"dim": [{"size": "128"}]}}}}}, {"name": "generator/block_1/conv2/weights", "op": "Const", "attr": {"value": {"tensor": {"dtype": "DT_FLOAT", "tensorShape": {"dim": [{"size": "3"}, {"size": "3"}, {"size": "128"}, {"size": "128"}]}}}, "dtype": {"type": "DT_FLOAT"}}}, {"name": "generator/block_1/conv2/biases", "op": "Const", "attr": {"value": {"tensor": {"dtype": "DT_FLOAT", "tensorShape": {"dim": [{"size": "128"}]}}}, "dtype": {"type": "DT_FLOAT"}}}, {"name": "generator/block_0/conv1/weights", "op": "Const", "attr": {"value": {"tensor": {"dtype": "DT_FLOAT", "tensorShape": {"dim": [{"size": "3"}, {"size": "3"}, {"size": "128"}, {"size": "128"}]}}}, "dtype": {"type": "DT_FLOAT"}}}, {"name": "generator/block_0/conv1/biases", "op": "Const", "attr": {"dtype": {"type": "DT_FLOAT"}, "value": {"tensor": {"dtype": "DT_FLOAT", "tensorShape": {"dim": [{"size": "128"}]}}}}}, {"name": "generator/block_0/conv2/weights", "op": "Const", "attr": {"value": {"tensor": {"dtype": "DT_FLOAT", "tensorShape": {"dim": [{"size": "3"}, {"size": "3"}, {"size": "128"}, {"size": "128"}]}}}, "dtype": {"type": "DT_FLOAT"}}}, {"name": "generator/block_0/conv2/biases", "op": "Const", "attr": {"value": {"tensor": {"dtype": "DT_FLOAT", "tensorShape": {"dim": [{"size": "128"}]}}}, "dtype": {"type": "DT_FLOAT"}}}, {"name": "generator/Conv_3/weights", "op": "Const", "attr": {"value": {"tensor": {"dtype": "DT_FLOAT", "tensorShape": {"dim": [{"size": "3"}, {"size": "3"}, {"size": "64"}, {"size": "64"}]}}}, "dtype": {"type": "DT_FLOAT"}}}, {"name": "generator/Conv_3/biases", "op": "Const", "attr": {"dtype": {"type": "DT_FLOAT"}, "value": {"tensor": {"dtype": "DT_FLOAT", "tensorShape": {"dim": [{"size": "64"}]}}}}}, {"name": "generator/Conv_4/weights", "op": "Const", "attr": {"value": {"tensor": {"dtype": "DT_FLOAT", "tensorShape": {"dim": [{"size": "3"}, {"size": "3"}, {"size": "64"}, {"size": "128"}]}}}, "dtype": {"type": "DT_FLOAT"}}}, {"name": "generator/Conv_4/biases", "op": "Const", "attr": {"value": {"tensor": {"dtype": "DT_FLOAT", "tensorShape": {"dim": [{"size": "128"}]}}}, "dtype": {"type": "DT_FLOAT"}}}, {"name": "generator/Conv_5/weights", "op": "Const", "attr": {"value": {"tensor": {"dtype": "DT_FLOAT", "tensorShape": {"dim": [{"size": "3"}, {"size": "3"}, {"size": "128"}, {"size": "64"}]}}}, "dtype": {"type": "DT_FLOAT"}}}, {"name": "generator/Conv_5/biases", "op": "Const", "attr": {"dtype": {"type": "DT_FLOAT"}, "value": {"tensor": {"dtype": "DT_FLOAT", "tensorShape": {"dim": [{"size": "64"}]}}}}}, {"name": "generator/strided_slice_1/stack", "op": "Const", "attr": {"value": {"tensor": {"dtype": "DT_INT32", "tensorShape": {"dim": [{"size": "1"}]}}}, "dtype": {"type": "DT_INT32"}}}, {"name": "generator/strided_slice_1/stack_1", "op": "Const", "attr": {"dtype": {"type": "DT_INT32"}, "value": {"tensor": {"dtype": "DT_INT32", "tensorShape": {"dim": [{"size": "1"}]}}}}}, {"name": "generator/strided_slice_1/stack_2", "op": "Const", "attr": {"dtype": {"type": "DT_INT32"}, "value": {"tensor": {"dtype": "DT_INT32", "tensorShape": {"dim": [{"size": "1"}]}}}}}, {"name": "generator/mul_1/y", "op": "Const", "attr": {"value": {"tensor": {"dtype": "DT_INT32", "tensorShape": {}}}, "dtype": {"type": "DT_INT32"}}}, {"name": "generator/Conv_1/weights", "op": "Const", "attr": {"value": {"tensor": {"dtype": "DT_FLOAT", "tensorShape": {"dim": [{"size": "3"}, {"size": "3"}, {"size": "32"}, {"size": "32"}]}}}, "dtype": {"type": "DT_FLOAT"}}}, {"name": "generator/Conv_1/biases", "op": "Const", "attr": {"value": {"tensor": {"dtype": "DT_FLOAT", "tensorShape": {"dim": [{"size": "32"}]}}}, "dtype": {"type": "DT_FLOAT"}}}, {"name": "generator/Conv_2/weights", "op": "Const", "attr": {"value": {"tensor": {"dtype": "DT_FLOAT", "tensorShape": {"dim": [{"size": "3"}, {"size": "3"}, {"size": "32"}, {"size": "64"}]}}}, "dtype": {"type": "DT_FLOAT"}}}, {"name": "generator/Conv_2/biases", "op": "Const", "attr": {"dtype": {"type": "DT_FLOAT"}, "value": {"tensor": {"dtype": "DT_FLOAT", "tensorShape": {"dim": [{"size": "64"}]}}}}}, {"name": "generator/Conv_6/weights", "op": "Const", "attr": {"value": {"tensor": {"dtype": "DT_FLOAT", "tensorShape": {"dim": [{"size": "3"}, {"size": "3"}, {"size": "64"}, {"size": "64"}]}}}, "dtype": {"type": "DT_FLOAT"}}}, {"name": "generator/Conv_6/biases", "op": "Const", "attr": {"value": {"tensor": {"dtype": "DT_FLOAT", "tensorShape": {"dim": [{"size": "64"}]}}}, "dtype": {"type": "DT_FLOAT"}}}, {"name": "generator/Conv_7/weights", "op": "Const", "attr": {"value": {"tensor": {"dtype": "DT_FLOAT", "tensorShape": {"dim": [{"size": "3"}, {"size": "3"}, {"size": "64"}, {"size": "32"}]}}}, "dtype": {"type": "DT_FLOAT"}}}, {"name": "generator/Conv_7/biases", "op": "Const", "attr": {"value": {"tensor": {"dtype": "DT_FLOAT", "tensorShape": {"dim": [{"size": "32"}]}}}, "dtype": {"type": "DT_FLOAT"}}}, {"name": "generator/strided_slice_3/stack", "op": "Const", "attr": {"value": {"tensor": {"dtype": "DT_INT32", "tensorShape": {"dim": [{"size": "1"}]}}}, "dtype": {"type": "DT_INT32"}}}, {"name": "generator/strided_slice_3/stack_1", "op": "Const", "attr": {"value": {"tensor": {"dtype": "DT_INT32", "tensorShape": {"dim": [{"size": "1"}]}}}, "dtype": {"type": "DT_INT32"}}}, {"name": "generator/strided_slice_3/stack_2", "op": "Const", "attr": {"value": {"tensor": {"dtype": "DT_INT32", "tensorShape": {"dim": [{"size": "1"}]}}}, "dtype": {"type": "DT_INT32"}}}, {"name": "generator/mul_3/y", "op": "Const", "attr": {"dtype": {"type": "DT_INT32"}, "value": {"tensor": {"dtype": "DT_INT32", "tensorShape": {}}}}}, {"name": "generator/Conv/weights", "op": "Const", "attr": {"value": {"tensor": {"dtype": "DT_FLOAT", "tensorShape": {"dim": [{"size": "7"}, {"size": "7"}, {"size": "3"}, {"size": "32"}]}}}, "dtype": {"type": "DT_FLOAT"}}}, {"name": "generator/Conv/biases", "op": "Const", "attr": {"dtype": {"type": "DT_FLOAT"}, "value": {"tensor": {"dtype": "DT_FLOAT", "tensorShape": {"dim": [{"size": "32"}]}}}}}, {"name": "generator/Conv_8/weights", "op": "Const", "attr": {"value": {"tensor": {"dtype": "DT_FLOAT", "tensorShape": {"dim": [{"size": "3"}, {"size": "3"}, {"size": "32"}, {"size": "32"}]}}}, "dtype": {"type": "DT_FLOAT"}}}, {"name": "generator/Conv_8/biases", "op": "Const", "attr": {"value": {"tensor": {"dtype": "DT_FLOAT", "tensorShape": {"dim": [{"size": "32"}]}}}, "dtype": {"type": "DT_FLOAT"}}}, {"name": "generator/Conv_9/weights", "op": "Const", "attr": {"value": {"tensor": {"dtype": "DT_FLOAT", "tensorShape": {"dim": [{"size": "7"}, {"size": "7"}, {"size": "32"}, {"size": "3"}]}}}, "dtype": {"type": "DT_FLOAT"}}}, {"name": "generator/Conv_9/biases", "op": "Const", "attr": {"value": {"tensor": {"dtype": "DT_FLOAT", "tensorShape": {"dim": [{"size": "3"}]}}}, "dtype": {"type": "DT_FLOAT"}}}, {"name": "depthwise_2/filter_in", "op": "Const", "attr": {"dtype": {"type": "DT_FLOAT"}, "value": {"tensor": {"dtype": "DT_FLOAT", "tensorShape": {"dim": [{"size": "3"}, {"size": "3"}, {"size": "3"}, {"size": "1"}]}}}}}, {"name": "depthwise_4/filter_in", "op": "Const", "attr": {"dtype": {"type": "DT_FLOAT"}, "value": {"tensor": {"dtype": "DT_FLOAT", "tensorShape": {"dim": [{"size": "3"}, {"size": "3"}, {"size": "3"}, {"size": "1"}]}}}}}, {"name": "add/y", "op": "Const", "attr": {"value": {"tensor": {"dtype": "DT_FLOAT", "tensorShape": {}}}, "dtype": {"type": "DT_FLOAT"}}}, {"name": "depthwise_1/filter_in", "op": "Const", "attr": {"value": {"tensor": {"dtype": "DT_FLOAT", "tensorShape": {"dim": [{"size": "3"}, {"size": "3"}, {"size": "3"}, {"size": "1"}]}}}, "dtype": {"type": "DT_FLOAT"}}}, {"name": "depthwise_6/filter_in", "op": "Const", "attr": {"value": {"tensor": {"dtype": "DT_FLOAT", "tensorShape": {"dim": [{"size": "3"}, {"size": "3"}, {"size": "3"}, {"size": "1"}]}}}, "dtype": {"type": "DT_FLOAT"}}}, {"name": "ones/packed/0", "op": "Const", "attr": {"dtype": {"type": "DT_INT32"}, "value": {"tensor": {"dtype": "DT_INT32", "tensorShape": {}}}}}, {"name": "strided_slice/stack", "op": "Const", "attr": {"value": {"tensor": {"dtype": "DT_INT32", "tensorShape": {"dim": [{"size": "1"}]}}}, "dtype": {"type": "DT_INT32"}}}, {"name": "strided_slice/stack_1", "op": "Const", "attr": {"value": {"tensor": {"dtype": "DT_INT32", "tensorShape": {"dim": [{"size": "1"}]}}}, "dtype": {"type": "DT_INT32"}}}, {"name": "strided_slice/stack_2", "op": "Const", "attr": {"value": {"tensor": {"dtype": "DT_INT32", "tensorShape": {"dim": [{"size": "1"}]}}}, "dtype": {"type": "DT_INT32"}}}, {"name": "strided_slice_1/stack", "op": "Const", "attr": {"value": {"tensor": {"dtype": "DT_INT32", "tensorShape": {"dim": [{"size": "1"}]}}}, "dtype": {"type": "DT_INT32"}}}, {"name": "strided_slice_1/stack_1", "op": "Const", "attr": {"value": {"tensor": {"dtype": "DT_INT32", "tensorShape": {"dim": [{"size": "1"}]}}}, "dtype": {"type": "DT_INT32"}}}, {"name": "strided_slice_1/stack_2", "op": "Const", "attr": {"value": {"tensor": {"dtype": "DT_INT32", "tensorShape": {"dim": [{"size": "1"}]}}}, "dtype": {"type": "DT_INT32"}}}, {"name": "ones/packed/3", "op": "Const", "attr": {"value": {"tensor": {"dtype": "DT_INT32", "tensorShape": {}}}, "dtype": {"type": "DT_INT32"}}}, {"name": "ones/Const", "op": "Const", "attr": {"value": {"tensor": {"dtype": "DT_FLOAT", "tensorShape": {}}}, "dtype": {"type": "DT_FLOAT"}}}, {"name": "depthwise/filter_in", "op": "Const", "attr": {"dtype": {"type": "DT_FLOAT"}, "value": {"tensor": {"dtype": "DT_FLOAT", "tensorShape": {"dim": [{"size": "3"}, {"size": "3"}, {"size": "1"}, {"size": "1"}]}}}}}, {"name": "input_photo", "op": "Placeholder", "attr": {"shape": {"shape": {"dim": [{"size": "1"}, {"size": "-1"}, {"size": "-1"}, {"size": "3"}]}}, "dtype": {"type": "DT_FLOAT"}}}, {"name": "generator/Conv/BiasAdd", "op": "_FusedConv2D", "input": ["input_photo", "generator/Conv/weights", "generator/Conv/biases"], "device": "/device:CPU:0", "attr": {"num_args": {"i": "1"}, "epsilon": {"f": 0.0}, "padding": {"s": "U0FNRQ=="}, "fused_ops": {"list": {"s": ["Qmlhc0FkZA=="]}}, "dilations": {"list": {"i": ["1", "1", "1", "1"]}}, "T": {"type": "DT_FLOAT"}, "strides": {"list": {"i": ["1", "1", "1", "1"]}}, "data_format": {"s": "TkhXQw=="}, "use_cudnn_on_gpu": {"b": true}, "explicit_paddings": {"list": {}}}}, {"name": "ArithmeticOptimizer/ReplaceMulWithSquare_mul_2", "op": "Square", "input": ["input_photo"], "attr": {"T": {"type": "DT_FLOAT"}}}, {"name": "depthwise_1", "op": "DepthwiseConv2dNative", "input": ["input_photo", "depthwise_1/filter_in"], "attr": {"strides": {"list": {"i": ["1", "1", "1", "1"]}}, "data_format": {"s": "TkhXQw=="}, "explicit_paddings": {"list": {}}, "padding": {"s": "U0FNRQ=="}, "dilations": {"list": {"i": ["1", "1", "1", "1"]}}, "T": {"type": "DT_FLOAT"}}}, {"name": "Shape", "op": "Shape", "input": ["input_photo"], "attr": {"T": {"type": "DT_FLOAT"}, "out_type": {"type": "DT_INT32"}}}, {"name": "generator/LeakyRelu", "op": "LeakyRelu", "input": ["generator/Conv/BiasAdd"], "attr": {"T": {"type": "DT_FLOAT"}, "alpha": {"f": 0.2}}}, {"name": "depthwise_4", "op": "DepthwiseConv2dNative", "input": ["ArithmeticOptimizer/ReplaceMulWithSquare_mul_2", "depthwise_4/filter_in"], "attr": {"padding": {"s": "U0FNRQ=="}, "dilations": {"list": {"i": ["1", "1", "1", "1"]}}, "T": {"type": "DT_FLOAT"}, "strides": {"list": {"i": ["1", "1", "1", "1"]}}, "data_format": {"s": "TkhXQw=="}, "explicit_paddings": {"list": {}}}}, {"name": "strided_slice", "op": "StridedSlice", "input": ["Shape", "strided_slice/stack", "strided_slice/stack_1", "strided_slice/stack_2"], "attr": {"T": {"type": "DT_INT32"}, "Index": {"type": "DT_INT32"}, "shrink_axis_mask": {"i": "1"}, "begin_mask": {"i": "0"}, "ellipsis_mask": {"i": "0"}, "new_axis_mask": {"i": "0"}, "end_mask": {"i": "0"}}}, {"name": "strided_slice_1", "op": "StridedSlice", "input": ["Shape", "strided_slice_1/stack", "strided_slice_1/stack_1", "strided_slice_1/stack_2"], "attr": {"end_mask": {"i": "0"}, "T": {"type": "DT_INT32"}, "Index": {"type": "DT_INT32"}, "shrink_axis_mask": {"i": "1"}, "ellipsis_mask": {"i": "0"}, "begin_mask": {"i": "0"}, "new_axis_mask": {"i": "0"}}}, {"name": "generator/Conv_1/BiasAdd", "op": "_FusedConv2D", "input": ["generator/LeakyRelu", "generator/Conv_1/weights", "generator/Conv_1/biases"], "device": "/device:CPU:0", "attr": {"strides": {"list": {"i": ["1", "2", "2", "1"]}}, "data_format": {"s": "TkhXQw=="}, "use_cudnn_on_gpu": {"b": true}, "explicit_paddings": {"list": {}}, "num_args": {"i": "1"}, "epsilon": {"f": 0.0}, "padding": {"s": "U0FNRQ=="}, "fused_ops": {"list": {"s": ["Qmlhc0FkZA=="]}}, "dilations": {"list": {"i": ["1", "1", "1", "1"]}}, "T": {"type": "DT_FLOAT"}}}, {"name": "ones/packed", "op": "Pack", "input": ["ones/packed/0", "strided_slice", "strided_slice_1", "ones/packed/3"], "attr": {"N": {"i": "4"}, "T": {"type": "DT_INT32"}, "axis": {"i": "0"}}}, {"name": "generator/LeakyRelu_1", "op": "LeakyRelu", "input": ["generator/Conv_1/BiasAdd"], "attr": {"T": {"type": "DT_FLOAT"}, "alpha": {"f": 0.2}}}, {"name": "ones", "op": "Fill", "input": ["ones/packed", "ones/Const"], "attr": {"T": {"type": "DT_FLOAT"}, "index_type": {"type": "DT_INT32"}}}, {"name": "generator/Conv_2/BiasAdd", "op": "_FusedConv2D", "input": ["generator/LeakyRelu_1", "generator/Conv_2/weights", "generator/Conv_2/biases"], "device": "/device:CPU:0", "attr": {"epsilon": {"f": 0.0}, "padding": {"s": "U0FNRQ=="}, "fused_ops": {"list": {"s": ["Qmlhc0FkZA=="]}}, "dilations": {"list": {"i": ["1", "1", "1", "1"]}}, "T": {"type": "DT_FLOAT"}, "data_format": {"s": "TkhXQw=="}, "strides": {"list": {"i": ["1", "1", "1", "1"]}}, "explicit_paddings": {"list": {}}, "use_cudnn_on_gpu": {"b": true}, "num_args": {"i": "1"}}}, {"name": "depthwise", "op": "DepthwiseConv2dNative", "input": ["ones", "depthwise/filter_in"], "attr": {"T": {"type": "DT_FLOAT"}, "data_format": {"s": "TkhXQw=="}, "strides": {"list": {"i": ["1", "1", "1", "1"]}}, "explicit_paddings": {"list": {}}, "padding": {"s": "U0FNRQ=="}, "dilations": {"list": {"i": ["1", "1", "1", "1"]}}}}, {"name": "generator/LeakyRelu_2", "op": "LeakyRelu", "input": ["generator/Conv_2/BiasAdd"], "attr": {"alpha": {"f": 0.2}, "T": {"type": "DT_FLOAT"}}}, {"name": "truediv_3", "op": "RealDiv", "input": ["depthwise_4", "depthwise"], "attr": {"T": {"type": "DT_FLOAT"}}}, {"name": "truediv", "op": "RealDiv", "input": ["depthwise_1", "depthwise"], "attr": {"T": {"type": "DT_FLOAT"}}}, {"name": "generator/Conv_3/BiasAdd", "op": "_FusedConv2D", "input": ["generator/LeakyRelu_2", "generator/Conv_3/weights", "generator/Conv_3/biases"], "device": "/device:CPU:0", "attr": {"epsilon": {"f": 0.0}, "padding": {"s": "U0FNRQ=="}, "fused_ops": {"list": {"s": ["Qmlhc0FkZA=="]}}, "dilations": {"list": {"i": ["1", "1", "1", "1"]}}, "T": {"type": "DT_FLOAT"}, "strides": {"list": {"i": ["1", "2", "2", "1"]}}, "data_format": {"s": "TkhXQw=="}, "explicit_paddings": {"list": {}}, "use_cudnn_on_gpu": {"b": true}, "num_args": {"i": "1"}}}, {"name": "ArithmeticOptimizer/ReplaceMulWithSquare_mul_3", "op": "Square", "input": ["truediv"], "attr": {"T": {"type": "DT_FLOAT"}}}, {"name": "generator/LeakyRelu_3", "op": "LeakyRelu", "input": ["generator/Conv_3/BiasAdd"], "attr": {"T": {"type": "DT_FLOAT"}, "alpha": {"f": 0.2}}}, {"name": "sub_1", "op": "Sub", "input": ["add/y", "ArithmeticOptimizer/ReplaceMulWithSquare_mul_3"], "attr": {"T": {"type": "DT_FLOAT"}}}, {"name": "generator/Conv_4/BiasAdd", "op": "_FusedConv2D", "input": ["generator/LeakyRelu_3", "generator/Conv_4/weights", "generator/Conv_4/biases"], "device": "/device:CPU:0", "attr": {"fused_ops": {"list": {"s": ["Qmlhc0FkZA=="]}}, "dilations": {"list": {"i": ["1", "1", "1", "1"]}}, "T": {"type": "DT_FLOAT"}, "strides": {"list": {"i": ["1", "1", "1", "1"]}}, "data_format": {"s": "TkhXQw=="}, "use_cudnn_on_gpu": {"b": true}, "explicit_paddings": {"list": {}}, "num_args": {"i": "1"}, "epsilon": {"f": 0.0}, "padding": {"s": "U0FNRQ=="}}}, {"name": "add", "op": "Add", "input": ["truediv_3", "sub_1"], "attr": {"T": {"type": "DT_FLOAT"}}}, {"name": "generator/LeakyRelu_4", "op": "LeakyRelu", "input": ["generator/Conv_4/BiasAdd"], "attr": {"T": {"type": "DT_FLOAT"}, "alpha": {"f": 0.2}}}, {"name": "generator/block_0/conv1/BiasAdd", "op": "_FusedConv2D", "input": ["generator/LeakyRelu_4", "generator/block_0/conv1/weights", "generator/block_0/conv1/biases"], "device": "/device:CPU:0", "attr": {"fused_ops": {"list": {"s": ["Qmlhc0FkZA=="]}}, "dilations": {"list": {"i": ["1", "1", "1", "1"]}}, "T": {"type": "DT_FLOAT"}, "data_format": {"s": "TkhXQw=="}, "strides": {"list": {"i": ["1", "1", "1", "1"]}}, "use_cudnn_on_gpu": {"b": true}, "explicit_paddings": {"list": {}}, "num_args": {"i": "1"}, "epsilon": {"f": 0.0}, "padding": {"s": "U0FNRQ=="}}}, {"name": "generator/block_0/LeakyRelu", "op": "LeakyRelu", "input": ["generator/block_0/conv1/BiasAdd"], "attr": {"T": {"type": "DT_FLOAT"}, "alpha": {"f": 0.2}}}, {"name": "generator/block_0/conv2/BiasAdd", "op": "_FusedConv2D", "input": ["generator/block_0/LeakyRelu", "generator/block_0/conv2/weights", "generator/block_0/conv2/biases"], "device": "/device:CPU:0", "attr": {"data_format": {"s": "TkhXQw=="}, "strides": {"list": {"i": ["1", "1", "1", "1"]}}, "explicit_paddings": {"list": {}}, "use_cudnn_on_gpu": {"b": true}, "num_args": {"i": "1"}, "epsilon": {"f": 0.0}, "padding": {"s": "U0FNRQ=="}, "fused_ops": {"list": {"s": ["Qmlhc0FkZA=="]}}, "dilations": {"list": {"i": ["1", "1", "1", "1"]}}, "T": {"type": "DT_FLOAT"}}}, {"name": "generator/block_0/add", "op": "AddV2", "input": ["generator/block_0/conv2/BiasAdd", "generator/LeakyRelu_4"], "attr": {"T": {"type": "DT_FLOAT"}}}, {"name": "generator/block_1/conv1/BiasAdd", "op": "_FusedConv2D", "input": ["generator/block_0/add", "generator/block_1/conv1/weights", "generator/block_1/conv1/biases"], "device": "/device:CPU:0", "attr": {"dilations": {"list": {"i": ["1", "1", "1", "1"]}}, "T": {"type": "DT_FLOAT"}, "strides": {"list": {"i": ["1", "1", "1", "1"]}}, "data_format": {"s": "TkhXQw=="}, "explicit_paddings": {"list": {}}, "use_cudnn_on_gpu": {"b": true}, "num_args": {"i": "1"}, "epsilon": {"f": 0.0}, "padding": {"s": "U0FNRQ=="}, "fused_ops": {"list": {"s": ["Qmlhc0FkZA=="]}}}}, {"name": "generator/block_1/LeakyRelu", "op": "LeakyRelu", "input": ["generator/block_1/conv1/BiasAdd"], "attr": {"T": {"type": "DT_FLOAT"}, "alpha": {"f": 0.2}}}, {"name": "generator/block_1/conv2/BiasAdd", "op": "_FusedConv2D", "input": ["generator/block_1/LeakyRelu", "generator/block_1/conv2/weights", "generator/block_1/conv2/biases"], "device": "/device:CPU:0", "attr": {"num_args": {"i": "1"}, "epsilon": {"f": 0.0}, "padding": {"s": "U0FNRQ=="}, "fused_ops": {"list": {"s": ["Qmlhc0FkZA=="]}}, "dilations": {"list": {"i": ["1", "1", "1", "1"]}}, "T": {"type": "DT_FLOAT"}, "data_format": {"s": "TkhXQw=="}, "strides": {"list": {"i": ["1", "1", "1", "1"]}}, "use_cudnn_on_gpu": {"b": true}, "explicit_paddings": {"list": {}}}}, {"name": "generator/block_1/add", "op": "AddV2", "input": ["generator/block_1/conv2/BiasAdd", "generator/block_0/add"], "attr": {"T": {"type": "DT_FLOAT"}}}, {"name": "generator/block_2/conv1/BiasAdd", "op": "_FusedConv2D", "input": ["generator/block_1/add", "generator/block_2/conv1/weights", "generator/block_2/conv1/biases"], "device": "/device:CPU:0", "attr": {"num_args": {"i": "1"}, "epsilon": {"f": 0.0}, "padding": {"s": "U0FNRQ=="}, "fused_ops": {"list": {"s": ["Qmlhc0FkZA=="]}}, "dilations": {"list": {"i": ["1", "1", "1", "1"]}}, "T": {"type": "DT_FLOAT"}, "strides": {"list": {"i": ["1", "1", "1", "1"]}}, "data_format": {"s": "TkhXQw=="}, "explicit_paddings": {"list": {}}, "use_cudnn_on_gpu": {"b": true}}}, {"name": "generator/block_2/LeakyRelu", "op": "LeakyRelu", "input": ["generator/block_2/conv1/BiasAdd"], "attr": {"alpha": {"f": 0.2}, "T": {"type": "DT_FLOAT"}}}, {"name": "generator/block_2/conv2/BiasAdd", "op": "_FusedConv2D", "input": ["generator/block_2/LeakyRelu", "generator/block_2/conv2/weights", "generator/block_2/conv2/biases"], "device": "/device:CPU:0", "attr": {"dilations": {"list": {"i": ["1", "1", "1", "1"]}}, "T": {"type": "DT_FLOAT"}, "strides": {"list": {"i": ["1", "1", "1", "1"]}}, "data_format": {"s": "TkhXQw=="}, "explicit_paddings": {"list": {}}, "use_cudnn_on_gpu": {"b": true}, "num_args": {"i": "1"}, "epsilon": {"f": 0.0}, "padding": {"s": "U0FNRQ=="}, "fused_ops": {"list": {"s": ["Qmlhc0FkZA=="]}}}}, {"name": "generator/block_2/add", "op": "AddV2", "input": ["generator/block_2/conv2/BiasAdd", "generator/block_1/add"], "attr": {"T": {"type": "DT_FLOAT"}}}, {"name": "generator/block_3/conv1/BiasAdd", "op": "_FusedConv2D", "input": ["generator/block_2/add", "generator/block_3/conv1/weights", "generator/block_3/conv1/biases"], "device": "/device:CPU:0", "attr": {"fused_ops": {"list": {"s": ["Qmlhc0FkZA=="]}}, "dilations": {"list": {"i": ["1", "1", "1", "1"]}}, "T": {"type": "DT_FLOAT"}, "data_format": {"s": "TkhXQw=="}, "strides": {"list": {"i": ["1", "1", "1", "1"]}}, "explicit_paddings": {"list": {}}, "use_cudnn_on_gpu": {"b": true}, "num_args": {"i": "1"}, "epsilon": {"f": 0.0}, "padding": {"s": "U0FNRQ=="}}}, {"name": "generator/block_3/LeakyRelu", "op": "LeakyRelu", "input": ["generator/block_3/conv1/BiasAdd"], "attr": {"T": {"type": "DT_FLOAT"}, "alpha": {"f": 0.2}}}, {"name": "generator/block_3/conv2/BiasAdd", "op": "_FusedConv2D", "input": ["generator/block_3/LeakyRelu", "generator/block_3/conv2/weights", "generator/block_3/conv2/biases"], "device": "/device:CPU:0", "attr": {"fused_ops": {"list": {"s": ["Qmlhc0FkZA=="]}}, "dilations": {"list": {"i": ["1", "1", "1", "1"]}}, "T": {"type": "DT_FLOAT"}, "strides": {"list": {"i": ["1", "1", "1", "1"]}}, "data_format": {"s": "TkhXQw=="}, "explicit_paddings": {"list": {}}, "use_cudnn_on_gpu": {"b": true}, "num_args": {"i": "1"}, "epsilon": {"f": 0.0}, "padding": {"s": "U0FNRQ=="}}}, {"name": "generator/block_3/add", "op": "AddV2", "input": ["generator/block_3/conv2/BiasAdd", "generator/block_2/add"], "attr": {"T": {"type": "DT_FLOAT"}}}, {"name": "generator/Conv_5/BiasAdd", "op": "_FusedConv2D", "input": ["generator/block_3/add", "generator/Conv_5/weights", "generator/Conv_5/biases"], "device": "/device:CPU:0", "attr": {"T": {"type": "DT_FLOAT"}, "strides": {"list": {"i": ["1", "1", "1", "1"]}}, "data_format": {"s": "TkhXQw=="}, "explicit_paddings": {"list": {}}, "use_cudnn_on_gpu": {"b": true}, "num_args": {"i": "1"}, "epsilon": {"f": 0.0}, "padding": {"s": "U0FNRQ=="}, "fused_ops": {"list": {"s": ["Qmlhc0FkZA=="]}}, "dilations": {"list": {"i": ["1", "1", "1", "1"]}}}}, {"name": "generator/LeakyRelu_5", "op": "LeakyRelu", "input": ["generator/Conv_5/BiasAdd"], "attr": {"T": {"type": "DT_FLOAT"}, "alpha": {"f": 0.2}}}, {"name": "generator/Shape", "op": "Shape", "input": ["generator/LeakyRelu_5"], "attr": {"T": {"type": "DT_FLOAT"}, "out_type": {"type": "DT_INT32"}}}, {"name": "generator/Shape_1", "op": "Shape", "input": ["generator/LeakyRelu_5"], "attr": {"T": {"type": "DT_FLOAT"}, "out_type": {"type": "DT_INT32"}}}, {"name": "generator/strided_slice", "op": "StridedSlice", "input": ["generator/Shape", "generator/strided_slice/stack", "generator/strided_slice/stack_1", "generator/strided_slice/stack_2"], "attr": {"Index": {"type": "DT_INT32"}, "T": {"type": "DT_INT32"}, "shrink_axis_mask": {"i": "1"}, "begin_mask": {"i": "0"}, "ellipsis_mask": {"i": "0"}, "new_axis_mask": {"i": "0"}, "end_mask": {"i": "0"}}}, {"name": "generator/strided_slice_1", "op": "StridedSlice", "input": ["generator/Shape_1", "generator/strided_slice_1/stack", "generator/strided_slice_1/stack_1", "generator/strided_slice_1/stack_2"], "attr": {"Index": {"type": "DT_INT32"}, "T": {"type": "DT_INT32"}, "shrink_axis_mask": {"i": "1"}, "ellipsis_mask": {"i": "0"}, "begin_mask": {"i": "0"}, "new_axis_mask": {"i": "0"}, "end_mask": {"i": "0"}}}, {"name": "generator/mul", "op": "Mul", "input": ["generator/strided_slice", "generator/mul/y"], "attr": {"T": {"type": "DT_INT32"}}}, {"name": "generator/mul_1", "op": "Mul", "input": ["generator/strided_slice_1", "generator/mul_1/y"], "attr": {"T": {"type": "DT_INT32"}}}, {"name": "generator/ResizeBilinear/size", "op": "Pack", "input": ["generator/mul", "generator/mul_1"], "attr": {"N": {"i": "2"}, "T": {"type": "DT_INT32"}, "axis": {"i": "0"}}}, {"name": "generator/ResizeBilinear", "op": "ResizeBilinear", "input": ["generator/LeakyRelu_5", "generator/ResizeBilinear/size"], "attr": {"T": {"type": "DT_FLOAT"}, "align_corners": {"b": false}, "half_pixel_centers": {"b": false}}}, {"name": "generator/add", "op": "AddV2", "input": ["generator/ResizeBilinear", "generator/LeakyRelu_2"], "attr": {"T": {"type": "DT_FLOAT"}}}, {"name": "generator/Conv_6/BiasAdd", "op": "_FusedConv2D", "input": ["generator/add", "generator/Conv_6/weights", "generator/Conv_6/biases"], "device": "/device:CPU:0", "attr": {"fused_ops": {"list": {"s": ["Qmlhc0FkZA=="]}}, "dilations": {"list": {"i": ["1", "1", "1", "1"]}}, "T": {"type": "DT_FLOAT"}, "data_format": {"s": "TkhXQw=="}, "strides": {"list": {"i": ["1", "1", "1", "1"]}}, "explicit_paddings": {"list": {}}, "use_cudnn_on_gpu": {"b": true}, "num_args": {"i": "1"}, "epsilon": {"f": 0.0}, "padding": {"s": "U0FNRQ=="}}}, {"name": "generator/LeakyRelu_6", "op": "LeakyRelu", "input": ["generator/Conv_6/BiasAdd"], "attr": {"T": {"type": "DT_FLOAT"}, "alpha": {"f": 0.2}}}, {"name": "generator/Conv_7/BiasAdd", "op": "_FusedConv2D", "input": ["generator/LeakyRelu_6", "generator/Conv_7/weights", "generator/Conv_7/biases"], "device": "/device:CPU:0", "attr": {"dilations": {"list": {"i": ["1", "1", "1", "1"]}}, "T": {"type": "DT_FLOAT"}, "data_format": {"s": "TkhXQw=="}, "strides": {"list": {"i": ["1", "1", "1", "1"]}}, "explicit_paddings": {"list": {}}, "use_cudnn_on_gpu": {"b": true}, "num_args": {"i": "1"}, "epsilon": {"f": 0.0}, "padding": {"s": "U0FNRQ=="}, "fused_ops": {"list": {"s": ["Qmlhc0FkZA=="]}}}}, {"name": "generator/LeakyRelu_7", "op": "LeakyRelu", "input": ["generator/Conv_7/BiasAdd"], "attr": {"alpha": {"f": 0.2}, "T": {"type": "DT_FLOAT"}}}, {"name": "generator/Shape_2", "op": "Shape", "input": ["generator/LeakyRelu_7"], "attr": {"T": {"type": "DT_FLOAT"}, "out_type": {"type": "DT_INT32"}}}, {"name": "generator/Shape_3", "op": "Shape", "input": ["generator/LeakyRelu_7"], "attr": {"T": {"type": "DT_FLOAT"}, "out_type": {"type": "DT_INT32"}}}, {"name": "generator/strided_slice_2", "op": "StridedSlice", "input": ["generator/Shape_2", "generator/strided_slice_2/stack", "generator/strided_slice_2/stack_1", "generator/strided_slice_2/stack_2"], "attr": {"shrink_axis_mask": {"i": "1"}, "ellipsis_mask": {"i": "0"}, "begin_mask": {"i": "0"}, "new_axis_mask": {"i": "0"}, "end_mask": {"i": "0"}, "T": {"type": "DT_INT32"}, "Index": {"type": "DT_INT32"}}}, {"name": "generator/strided_slice_3", "op": "StridedSlice", "input": ["generator/Shape_3", "generator/strided_slice_3/stack", "generator/strided_slice_3/stack_1", "generator/strided_slice_3/stack_2"], "attr": {"shrink_axis_mask": {"i": "1"}, "ellipsis_mask": {"i": "0"}, "begin_mask": {"i": "0"}, "new_axis_mask": {"i": "0"}, "end_mask": {"i": "0"}, "T": {"type": "DT_INT32"}, "Index": {"type": "DT_INT32"}}}, {"name": "generator/mul_2", "op": "Mul", "input": ["generator/strided_slice_2", "generator/mul_2/y"], "attr": {"T": {"type": "DT_INT32"}}}, {"name": "generator/mul_3", "op": "Mul", "input": ["generator/strided_slice_3", "generator/mul_3/y"], "attr": {"T": {"type": "DT_INT32"}}}, {"name": "generator/ResizeBilinear_1/size", "op": "Pack", "input": ["generator/mul_2", "generator/mul_3"], "attr": {"T": {"type": "DT_INT32"}, "axis": {"i": "0"}, "N": {"i": "2"}}}, {"name": "generator/ResizeBilinear_1", "op": "ResizeBilinear", "input": ["generator/LeakyRelu_7", "generator/ResizeBilinear_1/size"], "attr": {"align_corners": {"b": false}, "half_pixel_centers": {"b": false}, "T": {"type": "DT_FLOAT"}}}, {"name": "generator/add_1", "op": "AddV2", "input": ["generator/ResizeBilinear_1", "generator/LeakyRelu"], "attr": {"T": {"type": "DT_FLOAT"}}}, {"name": "generator/Conv_8/BiasAdd", "op": "_FusedConv2D", "input": ["generator/add_1", "generator/Conv_8/weights", "generator/Conv_8/biases"], "device": "/device:CPU:0", "attr": {"T": {"type": "DT_FLOAT"}, "strides": {"list": {"i": ["1", "1", "1", "1"]}}, "data_format": {"s": "TkhXQw=="}, "explicit_paddings": {"list": {}}, "use_cudnn_on_gpu": {"b": true}, "num_args": {"i": "1"}, "epsilon": {"f": 0.0}, "padding": {"s": "U0FNRQ=="}, "fused_ops": {"list": {"s": ["Qmlhc0FkZA=="]}}, "dilations": {"list": {"i": ["1", "1", "1", "1"]}}}}, {"name": "generator/LeakyRelu_8", "op": "LeakyRelu", "input": ["generator/Conv_8/BiasAdd"], "attr": {"T": {"type": "DT_FLOAT"}, "alpha": {"f": 0.2}}}, {"name": "generator/Conv_9/BiasAdd", "op": "_FusedConv2D", "input": ["generator/LeakyRelu_8", "generator/Conv_9/weights", "generator/Conv_9/biases"], "device": "/device:CPU:0", "attr": {"T": {"type": "DT_FLOAT"}, "strides": {"list": {"i": ["1", "1", "1", "1"]}}, "data_format": {"s": "TkhXQw=="}, "use_cudnn_on_gpu": {"b": true}, "explicit_paddings": {"list": {}}, "num_args": {"i": "1"}, "epsilon": {"f": 0.0}, "padding": {"s": "U0FNRQ=="}, "fused_ops": {"list": {"s": ["Qmlhc0FkZA=="]}}, "dilations": {"list": {"i": ["1", "1", "1", "1"]}}}}, {"name": "depthwise_2", "op": "DepthwiseConv2dNative", "input": ["generator/Conv_9/BiasAdd", "depthwise_2/filter_in"], "attr": {"dilations": {"list": {"i": ["1", "1", "1", "1"]}}, "T": {"type": "DT_FLOAT"}, "data_format": {"s": "TkhXQw=="}, "strides": {"list": {"i": ["1", "1", "1", "1"]}}, "explicit_paddings": {"list": {}}, "padding": {"s": "U0FNRQ=="}}}, {"name": "mul", "op": "Mul", "input": ["input_photo", "generator/Conv_9/BiasAdd"], "attr": {"T": {"type": "DT_FLOAT"}}}, {"name": "truediv_1", "op": "RealDiv", "input": ["depthwise_2", "depthwise"], "attr": {"T": {"type": "DT_FLOAT"}}}, {"name": "depthwise_3", "op": "DepthwiseConv2dNative", "input": ["mul", "depthwise_3/filter_in"], "attr": {"dilations": {"list": {"i": ["1", "1", "1", "1"]}}, "T": {"type": "DT_FLOAT"}, "strides": {"list": {"i": ["1", "1", "1", "1"]}}, "data_format": {"s": "TkhXQw=="}, "explicit_paddings": {"list": {}}, "padding": {"s": "U0FNRQ=="}}}, {"name": "mul_1", "op": "Mul", "input": ["truediv", "truediv_1"], "attr": {"T": {"type": "DT_FLOAT"}}}, {"name": "truediv_2", "op": "RealDiv", "input": ["depthwise_3", "depthwise"], "attr": {"T": {"type": "DT_FLOAT"}}}, {"name": "sub", "op": "Sub", "input": ["truediv_2", "mul_1"], "attr": {"T": {"type": "DT_FLOAT"}}}, {"name": "truediv_4", "op": "RealDiv", "input": ["sub", "add"], "attr": {"T": {"type": "DT_FLOAT"}}}, {"name": "depthwise_5", "op": "DepthwiseConv2dNative", "input": ["truediv_4", "depthwise_5/filter_in"], "attr": {"padding": {"s": "U0FNRQ=="}, "dilations": {"list": {"i": ["1", "1", "1", "1"]}}, "T": {"type": "DT_FLOAT"}, "strides": {"list": {"i": ["1", "1", "1", "1"]}}, "data_format": {"s": "TkhXQw=="}, "explicit_paddings": {"list": {}}}}, {"name": "mul_4", "op": "Mul", "input": ["truediv_4", "truediv"], "attr": {"T": {"type": "DT_FLOAT"}}}, {"name": "truediv_5", "op": "RealDiv", "input": ["depthwise_5", "depthwise"], "attr": {"T": {"type": "DT_FLOAT"}}}, {"name": "sub_2", "op": "Sub", "input": ["truediv_1", "mul_4"], "attr": {"T": {"type": "DT_FLOAT"}}}, {"name": "mul_5", "op": "Mul", "input": ["truediv_5", "input_photo"], "attr": {"T": {"type": "DT_FLOAT"}}}, {"name": "depthwise_6", "op": "DepthwiseConv2dNative", "input": ["sub_2", "depthwise_6/filter_in"], "attr": {"dilations": {"list": {"i": ["1", "1", "1", "1"]}}, "T": {"type": "DT_FLOAT"}, "strides": {"list": {"i": ["1", "1", "1", "1"]}}, "data_format": {"s": "TkhXQw=="}, "explicit_paddings": {"list": {}}, "padding": {"s": "U0FNRQ=="}}}, {"name": "truediv_6", "op": "RealDiv", "input": ["depthwise_6", "depthwise"], "attr": {"T": {"type": "DT_FLOAT"}}}, {"name": "add_1", "op": "AddV2", "input": ["mul_5", "truediv_6"], "attr": {"T": {"type": "DT_FLOAT"}}}, {"name": "final_output", "op": "Identity", "input": ["add_1"], "attr": {"T": {"type": "DT_FLOAT"}}}], "library": {}, "versions": {"producer": 440}}, "weightsManifest": [{"paths": ["group1-shard1of1.bin"], "weights": [{"name": "depthwise_5/filter_in", "shape": [3, 3, 3, 1], "dtype": "float32", "quantization": {"dtype": "uint8", "min": 0.1111111119389534, "scale": 1.0, "original_dtype": "float32"}}, {"name": "depthwise_3/filter_in", "shape": [3, 3, 3, 1], "dtype": "float32", "quantization": {"dtype": "uint8", "min": 0.1111111119389534, "scale": 1.0, "original_dtype": "float32"}}, {"name": "generator/strided_slice_2/stack", "shape": [1], "dtype": "int32"}, {"name": "generator/strided_slice_2/stack_1", "shape": [1], "dtype": "int32"}, {"name": "generator/strided_slice_2/stack_2", "shape": [1], "dtype": "int32"}, {"name": "generator/mul_2/y", "shape": [], "dtype": "int32"}, {"name": "generator/strided_slice/stack", "shape": [1], "dtype": "int32"}, {"name": "generator/strided_slice/stack_1", "shape": [1], "dtype": "int32"}, {"name": "generator/strided_slice/stack_2", "shape": [1], "dtype": "int32"}, {"name": "generator/mul/y", "shape": [], "dtype": "int32"}, {"name": "generator/block_3/conv1/weights", "shape": [3, 3, 128, 128], "dtype": "float32", "quantization": {"dtype": "uint8", "min": -0.22084014918289932, "scale": 0.0015887780516755346, "original_dtype": "float32"}}, {"name": "generator/block_3/conv1/biases", "shape": [128], "dtype": "float32", "quantization": {"dtype": "uint8", "min": -0.16185247474441342, "scale": 0.000735693067020061, "original_dtype": "float32"}}, {"name": "generator/block_3/conv2/weights", "shape": [3, 3, 128, 128], "dtype": "float32", "quantization": {"dtype": "uint8", "min": -0.17605795369428748, "scale": 0.0014550244106965907, "original_dtype": "float32"}}, {"name": "generator/block_3/conv2/biases", "shape": [128], "dtype": "float32", "quantization": {"dtype": "uint8", "min": -0.03943661144551108, "scale": 0.00033706505508983834, "original_dtype": "float32"}}, {"name": "generator/block_2/conv1/weights", "shape": [3, 3, 128, 128], "dtype": "float32", "quantization": {"dtype": "uint8", "min": -0.1758582576232798, "scale": 0.0014297419318965838, "original_dtype": "float32"}}, {"name": "generator/block_2/conv1/biases", "shape": [128], "dtype": "float32", "quantization": {"dtype": "uint8", "min": -0.11882321390451168, "scale": 0.0006062408872679168, "original_dtype": "float32"}}, {"name": "generator/block_2/conv2/weights", "shape": [3, 3, 128, 128], "dtype": "float32", "quantization": {"dtype": "uint8", "min": -0.1716891758582171, "scale": 0.0013845901278888477, "original_dtype": "float32"}}, {"name": "generator/block_2/conv2/biases", "shape": [128], "dtype": "float32", "quantization": {"dtype": "uint8", "min": -0.04040788417937709, "scale": 0.0003339494560279098, "original_dtype": "float32"}}, {"name": "generator/block_1/conv1/weights", "shape": [3, 3, 128, 128], "dtype": "float32", "quantization": {"dtype": "uint8", "min": -0.1809734451420167, "scale": 0.0014956483069588156, "original_dtype": "float32"}}, {"name": "generator/block_1/conv1/biases", "shape": [128], "dtype": "float32", "quantization": {"dtype": "uint8", "min": -0.12373276049015568, "scale": 0.0005333308641817055, "original_dtype": "float32"}}, {"name": "generator/block_1/conv2/weights", "shape": [3, 3, 128, 128], "dtype": "float32", "quantization": {"dtype": "uint8", "min": -0.1817400111871607, "scale": 0.0013768182665693993, "original_dtype": "float32"}}, {"name": "generator/block_1/conv2/biases", "shape": [128], "dtype": "float32", "quantization": {"dtype": "uint8", "min": -0.030564671973971762, "scale": 0.00019344729097450482, "original_dtype": "float32"}}, {"name": "generator/block_0/conv1/weights", "shape": [3, 3, 128, 128], "dtype": "float32", "quantization": {"dtype": "uint8", "min": -0.3216101681484896, "scale": 0.002061603641977497, "original_dtype": "float32"}}, {"name": "generator/block_0/conv1/biases", "shape": [128], "dtype": "float32", "quantization": {"dtype": "uint8", "min": -0.09552246404483038, "scale": 0.00045704528251115016, "original_dtype": "float32"}}, {"name": "generator/block_0/conv2/weights", "shape": [3, 3, 128, 128], "dtype": "float32", "quantization": {"dtype": "uint8", "min": -0.1945579454010608, "scale": 0.0015199839484457875, "original_dtype": "float32"}}, {"name": "generator/block_0/conv2/biases", "shape": [128], "dtype": "float32", "quantization": {"dtype": "uint8", "min": -0.024452958880540204, "scale": 0.00015575133044930066, "original_dtype": "float32"}}, {"name": "generator/Conv_3/weights", "shape": [3, 3, 64, 64], "dtype": "float32", "quantization": {"dtype": "uint8", "min": -0.5706853395583582, "scale": 0.0035446294382506724, "original_dtype": "float32"}}, {"name": "generator/Conv_3/biases", "shape": [64], "dtype": "float32", "quantization": {"dtype": "uint8", "min": -0.09123389861162971, "scale": 0.0006335687403585397, "original_dtype": "float32"}}, {"name": "generator/Conv_4/weights", "shape": [3, 3, 64, 128], "dtype": "float32", "quantization": {"dtype": "uint8", "min": -0.29045896793113035, "scale": 0.0020599926803626266, "original_dtype": "float32"}}, {"name": "generator/Conv_4/biases", "shape": [128], "dtype": "float32", "quantization": {"dtype": "uint8", "min": -0.09685239981786878, "scale": 0.00046340861156875013, "original_dtype": "float32"}}, {"name": "generator/Conv_5/weights", "shape": [3, 3, 128, 64], "dtype": "float32", "quantization": {"dtype": "uint8", "min": -0.19785751805585974, "scale": 0.0015337792097353468, "original_dtype": "float32"}}, {"name": "generator/Conv_5/biases", "shape": [64], "dtype": "float32", "quantization": {"dtype": "uint8", "min": -0.11703464432674296, "scale": 0.0008669232913092071, "original_dtype": "float32"}}, {"name": "generator/strided_slice_1/stack", "shape": [1], "dtype": "int32"}, {"name": "generator/strided_slice_1/stack_1", "shape": [1], "dtype": "int32"}, {"name": "generator/strided_slice_1/stack_2", "shape": [1], "dtype": "int32"}, {"name": "generator/mul_1/y", "shape": [], "dtype": "int32"}, {"name": "generator/Conv_1/weights", "shape": [3, 3, 32, 32], "dtype": "float32", "quantization": {"dtype": "uint8", "min": -0.5959757075590246, "scale": 0.003724848172243904, "original_dtype": "float32"}}, {"name": "generator/Conv_1/biases", "shape": [32], "dtype": "float32", "quantization": {"dtype": "uint8", "min": -0.09598891220840754, "scale": 0.0007163351657343846, "original_dtype": "float32"}}, {"name": "generator/Conv_2/weights", "shape": [3, 3, 32, 64], "dtype": "float32", "quantization": {"dtype": "uint8", "min": -0.43265179442424395, "scale": 0.0029838054787878895, "original_dtype": "float32"}}, {"name": "generator/Conv_2/biases", "shape": [64], "dtype": "float32", "quantization": {"dtype": "uint8", "min": -0.12450774697696461, "scale": 0.0008646371317844765, "original_dtype": "float32"}}, {"name": "generator/Conv_6/weights", "shape": [3, 3, 64, 64], "dtype": "float32", "quantization": {"dtype": "uint8", "min": -0.6253524913507349, "scale": 0.0037900150990953633, "original_dtype": "float32"}}, {"name": "generator/Conv_6/biases", "shape": [64], "dtype": "float32", "quantization": {"dtype": "uint8", "min": -0.1269915305516299, "scale": 0.0010159322444130393, "original_dtype": "float32"}}, {"name": "generator/Conv_7/weights", "shape": [3, 3, 64, 32], "dtype": "float32", "quantization": {"dtype": "uint8", "min": -0.5704397250624265, "scale": 0.004045671808953379, "original_dtype": "float32"}}, {"name": "generator/Conv_7/biases", "shape": [32], "dtype": "float32", "quantization": {"dtype": "uint8", "min": -0.06815012296040854, "scale": 0.0008967121442159017, "original_dtype": "float32"}}, {"name": "generator/strided_slice_3/stack", "shape": [1], "dtype": "int32"}, {"name": "generator/strided_slice_3/stack_1", "shape": [1], "dtype": "int32"}, {"name": "generator/strided_slice_3/stack_2", "shape": [1], "dtype": "int32"}, {"name": "generator/mul_3/y", "shape": [], "dtype": "int32"}, {"name": "generator/Conv/weights", "shape": [7, 7, 3, 32], "dtype": "float32", "quantization": {"dtype": "uint8", "min": -0.31890247586895437, "scale": 0.0021993274197858923, "original_dtype": "float32"}}, {"name": "generator/Conv/biases", "shape": [32], "dtype": "float32", "quantization": {"dtype": "uint8", "min": -0.20848759658196392, "scale": 0.0012712658328168532, "original_dtype": "float32"}}, {"name": "generator/Conv_8/weights", "shape": [3, 3, 32, 32], "dtype": "float32", "quantization": {"dtype": "uint8", "min": -1.0400230753655528, "scale": 0.006227683086021274, "original_dtype": "float32"}}, {"name": "generator/Conv_8/biases", "shape": [32], "dtype": "float32", "quantization": {"dtype": "uint8", "min": -0.03705770741490757, "scale": 0.0006862538410168068, "original_dtype": "float32"}}, {"name": "generator/Conv_9/weights", "shape": [7, 7, 32, 3], "dtype": "float32", "quantization": {"dtype": "uint8", "min": -0.3361294344359753, "scale": 0.002418197370042988, "original_dtype": "float32"}}, {"name": "generator/Conv_9/biases", "shape": [3], "dtype": "float32", "quantization": {"dtype": "uint8", "min": -0.034438492226250034, "scale": 0.0002342754573214288, "original_dtype": "float32"}}, {"name": "depthwise_2/filter_in", "shape": [3, 3, 3, 1], "dtype": "float32", "quantization": {"dtype": "uint8", "min": 0.1111111119389534, "scale": 1.0, "original_dtype": "float32"}}, {"name": "depthwise_4/filter_in", "shape": [3, 3, 3, 1], "dtype": "float32", "quantization": {"dtype": "uint8", "min": 0.1111111119389534, "scale": 1.0, "original_dtype": "float32"}}, {"name": "add/y", "shape": [], "dtype": "float32", "quantization": {"dtype": "uint8", "min": 0.004999999888241291, "scale": 1.0, "original_dtype": "float32"}}, {"name": "depthwise_1/filter_in", "shape": [3, 3, 3, 1], "dtype": "float32", "quantization": {"dtype": "uint8", "min": 0.1111111119389534, "scale": 1.0, "original_dtype": "float32"}}, {"name": "depthwise_6/filter_in", "shape": [3, 3, 3, 1], "dtype": "float32", "quantization": {"dtype": "uint8", "min": 0.1111111119389534, "scale": 1.0, "original_dtype": "float32"}}, {"name": "ones/packed/0", "shape": [], "dtype": "int32"}, {"name": "strided_slice/stack", "shape": [1], "dtype": "int32"}, {"name": "strided_slice/stack_1", "shape": [1], "dtype": "int32"}, {"name": "strided_slice/stack_2", "shape": [1], "dtype": "int32"}, {"name": "strided_slice_1/stack", "shape": [1], "dtype": "int32"}, {"name": "strided_slice_1/stack_1", "shape": [1], "dtype": "int32"}, {"name": "strided_slice_1/stack_2", "shape": [1], "dtype": "int32"}, {"name": "ones/packed/3", "shape": [], "dtype": "int32"}, {"name": "ones/Const", "shape": [], "dtype": "float32", "quantization": {"dtype": "uint8", "min": 1.0, "scale": 1.0, "original_dtype": "float32"}}, {"name": "depthwise/filter_in", "shape": [3, 3, 1, 1], "dtype": "float32", "quantization": {"dtype": "uint8", "min": 0.1111111119389534, "scale": 1.0, "original_dtype": "float32"}}]}]} -------------------------------------------------------------------------------- /models/CartoonGAN/web/group1-shard1of2.bin: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pratapvardhan/cartoonizer-with-tfjs/0a1c1964e44721d73853bc24f7005332ed398021/models/CartoonGAN/web/group1-shard1of2.bin -------------------------------------------------------------------------------- /models/CartoonGAN/web/group1-shard2of2.bin: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pratapvardhan/cartoonizer-with-tfjs/0a1c1964e44721d73853bc24f7005332ed398021/models/CartoonGAN/web/group1-shard2of2.bin -------------------------------------------------------------------------------- /models/CartoonGAN/web/model.json: -------------------------------------------------------------------------------- 1 | {"format": "graph-model", "generatedBy": "2.3.0", "convertedBy": "TensorFlow.js Converter v2.3.0", "userDefinedMetadata": {"signature": {"inputs": {"input_photo:0": {"name": "input_photo:0", "dtype": "DT_FLOAT", "tensorShape": {"dim": [{"size": "1"}, {"size": "-1"}, {"size": "-1"}, {"size": "3"}]}}}, "outputs": {"final_output:0": {"name": "final_output:0", "dtype": "DT_FLOAT", "tensorShape": {"dim": [{"size": "1"}, {"size": "-1"}, {"size": "-1"}, {"size": "3"}]}}}}}, "modelTopology": {"node": [{"name": "depthwise_5/filter_in", "op": "Const", "attr": {"value": {"tensor": {"dtype": "DT_FLOAT", "tensorShape": {"dim": [{"size": "3"}, {"size": "3"}, {"size": "3"}, {"size": "1"}]}}}, "dtype": {"type": "DT_FLOAT"}}}, {"name": "depthwise_3/filter_in", "op": "Const", "attr": {"value": {"tensor": {"dtype": "DT_FLOAT", "tensorShape": {"dim": [{"size": "3"}, {"size": "3"}, {"size": "3"}, {"size": "1"}]}}}, "dtype": {"type": "DT_FLOAT"}}}, {"name": "generator/strided_slice_2/stack", "op": "Const", "attr": {"value": {"tensor": {"dtype": "DT_INT32", "tensorShape": {"dim": [{"size": "1"}]}}}, "dtype": {"type": "DT_INT32"}}}, {"name": "generator/strided_slice_2/stack_1", "op": "Const", "attr": {"dtype": {"type": "DT_INT32"}, "value": {"tensor": {"dtype": "DT_INT32", "tensorShape": {"dim": [{"size": "1"}]}}}}}, {"name": "generator/strided_slice_2/stack_2", "op": "Const", "attr": {"dtype": {"type": "DT_INT32"}, "value": {"tensor": {"dtype": "DT_INT32", "tensorShape": {"dim": [{"size": "1"}]}}}}}, {"name": "generator/mul_2/y", "op": "Const", "attr": {"value": {"tensor": {"dtype": "DT_INT32", "tensorShape": {}}}, "dtype": {"type": "DT_INT32"}}}, {"name": "generator/strided_slice/stack", "op": "Const", "attr": {"value": {"tensor": {"dtype": "DT_INT32", "tensorShape": {"dim": [{"size": "1"}]}}}, "dtype": {"type": "DT_INT32"}}}, {"name": "generator/strided_slice/stack_1", "op": "Const", "attr": {"value": {"tensor": {"dtype": "DT_INT32", "tensorShape": {"dim": [{"size": "1"}]}}}, "dtype": {"type": "DT_INT32"}}}, {"name": "generator/strided_slice/stack_2", "op": "Const", "attr": {"dtype": {"type": "DT_INT32"}, "value": {"tensor": {"dtype": "DT_INT32", "tensorShape": {"dim": [{"size": "1"}]}}}}}, {"name": "generator/mul/y", "op": "Const", "attr": {"value": {"tensor": {"dtype": "DT_INT32", "tensorShape": {}}}, "dtype": {"type": "DT_INT32"}}}, {"name": "generator/block_3/conv1/weights", "op": "Const", "attr": {"value": {"tensor": {"dtype": "DT_FLOAT", "tensorShape": {"dim": [{"size": "3"}, {"size": "3"}, {"size": "128"}, {"size": "128"}]}}}, "dtype": {"type": "DT_FLOAT"}}}, {"name": "generator/block_3/conv1/biases", "op": "Const", "attr": {"value": {"tensor": {"dtype": "DT_FLOAT", "tensorShape": {"dim": [{"size": "128"}]}}}, "dtype": {"type": "DT_FLOAT"}}}, {"name": "generator/block_3/conv2/weights", "op": "Const", "attr": {"value": {"tensor": {"dtype": "DT_FLOAT", "tensorShape": {"dim": [{"size": "3"}, {"size": "3"}, {"size": "128"}, {"size": "128"}]}}}, "dtype": {"type": "DT_FLOAT"}}}, {"name": "generator/block_3/conv2/biases", "op": "Const", "attr": {"value": {"tensor": {"dtype": "DT_FLOAT", "tensorShape": {"dim": [{"size": "128"}]}}}, "dtype": {"type": "DT_FLOAT"}}}, {"name": "generator/block_2/conv1/weights", "op": "Const", "attr": {"value": {"tensor": {"dtype": "DT_FLOAT", "tensorShape": {"dim": [{"size": "3"}, {"size": "3"}, {"size": "128"}, {"size": "128"}]}}}, "dtype": {"type": "DT_FLOAT"}}}, {"name": "generator/block_2/conv1/biases", "op": "Const", "attr": {"value": {"tensor": {"dtype": "DT_FLOAT", "tensorShape": {"dim": [{"size": "128"}]}}}, "dtype": {"type": "DT_FLOAT"}}}, {"name": "generator/block_2/conv2/weights", "op": "Const", "attr": {"value": {"tensor": {"dtype": "DT_FLOAT", "tensorShape": {"dim": [{"size": "3"}, {"size": "3"}, {"size": "128"}, {"size": "128"}]}}}, "dtype": {"type": "DT_FLOAT"}}}, {"name": "generator/block_2/conv2/biases", "op": "Const", "attr": {"dtype": {"type": "DT_FLOAT"}, "value": {"tensor": {"dtype": "DT_FLOAT", "tensorShape": {"dim": [{"size": "128"}]}}}}}, {"name": "generator/block_1/conv1/weights", "op": "Const", "attr": {"dtype": {"type": "DT_FLOAT"}, "value": {"tensor": {"dtype": "DT_FLOAT", "tensorShape": {"dim": [{"size": "3"}, {"size": "3"}, {"size": "128"}, {"size": "128"}]}}}}}, {"name": "generator/block_1/conv1/biases", "op": "Const", "attr": {"value": {"tensor": {"dtype": "DT_FLOAT", "tensorShape": {"dim": [{"size": "128"}]}}}, "dtype": {"type": "DT_FLOAT"}}}, {"name": "generator/block_1/conv2/weights", "op": "Const", "attr": {"value": {"tensor": {"dtype": "DT_FLOAT", "tensorShape": {"dim": [{"size": "3"}, {"size": "3"}, {"size": "128"}, {"size": "128"}]}}}, "dtype": {"type": "DT_FLOAT"}}}, {"name": "generator/block_1/conv2/biases", "op": "Const", "attr": {"dtype": {"type": "DT_FLOAT"}, "value": {"tensor": {"dtype": "DT_FLOAT", "tensorShape": {"dim": [{"size": "128"}]}}}}}, {"name": "generator/block_0/conv1/weights", "op": "Const", "attr": {"value": {"tensor": {"dtype": "DT_FLOAT", "tensorShape": {"dim": [{"size": "3"}, {"size": "3"}, {"size": "128"}, {"size": "128"}]}}}, "dtype": {"type": "DT_FLOAT"}}}, {"name": "generator/block_0/conv1/biases", "op": "Const", "attr": {"value": {"tensor": {"dtype": "DT_FLOAT", "tensorShape": {"dim": [{"size": "128"}]}}}, "dtype": {"type": "DT_FLOAT"}}}, {"name": "generator/block_0/conv2/weights", "op": "Const", "attr": {"value": {"tensor": {"dtype": "DT_FLOAT", "tensorShape": {"dim": [{"size": "3"}, {"size": "3"}, {"size": "128"}, {"size": "128"}]}}}, "dtype": {"type": "DT_FLOAT"}}}, {"name": "generator/block_0/conv2/biases", "op": "Const", "attr": {"dtype": {"type": "DT_FLOAT"}, "value": {"tensor": {"dtype": "DT_FLOAT", "tensorShape": {"dim": [{"size": "128"}]}}}}}, {"name": "generator/Conv_3/weights", "op": "Const", "attr": {"value": {"tensor": {"dtype": "DT_FLOAT", "tensorShape": {"dim": [{"size": "3"}, {"size": "3"}, {"size": "64"}, {"size": "64"}]}}}, "dtype": {"type": "DT_FLOAT"}}}, {"name": "generator/Conv_3/biases", "op": "Const", "attr": {"value": {"tensor": {"dtype": "DT_FLOAT", "tensorShape": {"dim": [{"size": "64"}]}}}, "dtype": {"type": "DT_FLOAT"}}}, {"name": "generator/Conv_4/weights", "op": "Const", "attr": {"value": {"tensor": {"dtype": "DT_FLOAT", "tensorShape": {"dim": [{"size": "3"}, {"size": "3"}, {"size": "64"}, {"size": "128"}]}}}, "dtype": {"type": "DT_FLOAT"}}}, {"name": "generator/Conv_4/biases", "op": "Const", "attr": {"value": {"tensor": {"dtype": "DT_FLOAT", "tensorShape": {"dim": [{"size": "128"}]}}}, "dtype": {"type": "DT_FLOAT"}}}, {"name": "generator/Conv_5/weights", "op": "Const", "attr": {"value": {"tensor": {"dtype": "DT_FLOAT", "tensorShape": {"dim": [{"size": "3"}, {"size": "3"}, {"size": "128"}, {"size": "64"}]}}}, "dtype": {"type": "DT_FLOAT"}}}, {"name": "generator/Conv_5/biases", "op": "Const", "attr": {"dtype": {"type": "DT_FLOAT"}, "value": {"tensor": {"dtype": "DT_FLOAT", "tensorShape": {"dim": [{"size": "64"}]}}}}}, {"name": "generator/strided_slice_1/stack", "op": "Const", "attr": {"value": {"tensor": {"dtype": "DT_INT32", "tensorShape": {"dim": [{"size": "1"}]}}}, "dtype": {"type": "DT_INT32"}}}, {"name": "generator/strided_slice_1/stack_1", "op": "Const", "attr": {"value": {"tensor": {"dtype": "DT_INT32", "tensorShape": {"dim": [{"size": "1"}]}}}, "dtype": {"type": "DT_INT32"}}}, {"name": "generator/strided_slice_1/stack_2", "op": "Const", "attr": {"dtype": {"type": "DT_INT32"}, "value": {"tensor": {"dtype": "DT_INT32", "tensorShape": {"dim": [{"size": "1"}]}}}}}, {"name": "generator/mul_1/y", "op": "Const", "attr": {"value": {"tensor": {"dtype": "DT_INT32", "tensorShape": {}}}, "dtype": {"type": "DT_INT32"}}}, {"name": "generator/Conv_1/weights", "op": "Const", "attr": {"value": {"tensor": {"dtype": "DT_FLOAT", "tensorShape": {"dim": [{"size": "3"}, {"size": "3"}, {"size": "32"}, {"size": "32"}]}}}, "dtype": {"type": "DT_FLOAT"}}}, {"name": "generator/Conv_1/biases", "op": "Const", "attr": {"dtype": {"type": "DT_FLOAT"}, "value": {"tensor": {"dtype": "DT_FLOAT", "tensorShape": {"dim": [{"size": "32"}]}}}}}, {"name": "generator/Conv_2/weights", "op": "Const", "attr": {"dtype": {"type": "DT_FLOAT"}, "value": {"tensor": {"dtype": "DT_FLOAT", "tensorShape": {"dim": [{"size": "3"}, {"size": "3"}, {"size": "32"}, {"size": "64"}]}}}}}, {"name": "generator/Conv_2/biases", "op": "Const", "attr": {"dtype": {"type": "DT_FLOAT"}, "value": {"tensor": {"dtype": "DT_FLOAT", "tensorShape": {"dim": [{"size": "64"}]}}}}}, {"name": "generator/Conv_6/weights", "op": "Const", "attr": {"dtype": {"type": "DT_FLOAT"}, "value": {"tensor": {"dtype": "DT_FLOAT", "tensorShape": {"dim": [{"size": "3"}, {"size": "3"}, {"size": "64"}, {"size": "64"}]}}}}}, {"name": "generator/Conv_6/biases", "op": "Const", "attr": {"value": {"tensor": {"dtype": "DT_FLOAT", "tensorShape": {"dim": [{"size": "64"}]}}}, "dtype": {"type": "DT_FLOAT"}}}, {"name": "generator/Conv_7/weights", "op": "Const", "attr": {"value": {"tensor": {"dtype": "DT_FLOAT", "tensorShape": {"dim": [{"size": "3"}, {"size": "3"}, {"size": "64"}, {"size": "32"}]}}}, "dtype": {"type": "DT_FLOAT"}}}, {"name": "generator/Conv_7/biases", "op": "Const", "attr": {"dtype": {"type": "DT_FLOAT"}, "value": {"tensor": {"dtype": "DT_FLOAT", "tensorShape": {"dim": [{"size": "32"}]}}}}}, {"name": "generator/strided_slice_3/stack", "op": "Const", "attr": {"value": {"tensor": {"dtype": "DT_INT32", "tensorShape": {"dim": [{"size": "1"}]}}}, "dtype": {"type": "DT_INT32"}}}, {"name": "generator/strided_slice_3/stack_1", "op": "Const", "attr": {"value": {"tensor": {"dtype": "DT_INT32", "tensorShape": {"dim": [{"size": "1"}]}}}, "dtype": {"type": "DT_INT32"}}}, {"name": "generator/strided_slice_3/stack_2", "op": "Const", "attr": {"value": {"tensor": {"dtype": "DT_INT32", "tensorShape": {"dim": [{"size": "1"}]}}}, "dtype": {"type": "DT_INT32"}}}, {"name": "generator/mul_3/y", "op": "Const", "attr": {"value": {"tensor": {"dtype": "DT_INT32", "tensorShape": {}}}, "dtype": {"type": "DT_INT32"}}}, {"name": "generator/Conv/weights", "op": "Const", "attr": {"dtype": {"type": "DT_FLOAT"}, "value": {"tensor": {"dtype": "DT_FLOAT", "tensorShape": {"dim": [{"size": "7"}, {"size": "7"}, {"size": "3"}, {"size": "32"}]}}}}}, {"name": "generator/Conv/biases", "op": "Const", "attr": {"value": {"tensor": {"dtype": "DT_FLOAT", "tensorShape": {"dim": [{"size": "32"}]}}}, "dtype": {"type": "DT_FLOAT"}}}, {"name": "generator/Conv_8/weights", "op": "Const", "attr": {"value": {"tensor": {"dtype": "DT_FLOAT", "tensorShape": {"dim": [{"size": "3"}, {"size": "3"}, {"size": "32"}, {"size": "32"}]}}}, "dtype": {"type": "DT_FLOAT"}}}, {"name": "generator/Conv_8/biases", "op": "Const", "attr": {"value": {"tensor": {"dtype": "DT_FLOAT", "tensorShape": {"dim": [{"size": "32"}]}}}, "dtype": {"type": "DT_FLOAT"}}}, {"name": "generator/Conv_9/weights", "op": "Const", "attr": {"value": {"tensor": {"dtype": "DT_FLOAT", "tensorShape": {"dim": [{"size": "7"}, {"size": "7"}, {"size": "32"}, {"size": "3"}]}}}, "dtype": {"type": "DT_FLOAT"}}}, {"name": "generator/Conv_9/biases", "op": "Const", "attr": {"value": {"tensor": {"dtype": "DT_FLOAT", "tensorShape": {"dim": [{"size": "3"}]}}}, "dtype": {"type": "DT_FLOAT"}}}, {"name": "depthwise_2/filter_in", "op": "Const", "attr": {"value": {"tensor": {"dtype": "DT_FLOAT", "tensorShape": {"dim": [{"size": "3"}, {"size": "3"}, {"size": "3"}, {"size": "1"}]}}}, "dtype": {"type": "DT_FLOAT"}}}, {"name": "depthwise_4/filter_in", "op": "Const", "attr": {"value": {"tensor": {"dtype": "DT_FLOAT", "tensorShape": {"dim": [{"size": "3"}, {"size": "3"}, {"size": "3"}, {"size": "1"}]}}}, "dtype": {"type": "DT_FLOAT"}}}, {"name": "add/y", "op": "Const", "attr": {"value": {"tensor": {"dtype": "DT_FLOAT", "tensorShape": {}}}, "dtype": {"type": "DT_FLOAT"}}}, {"name": "depthwise_1/filter_in", "op": "Const", "attr": {"dtype": {"type": "DT_FLOAT"}, "value": {"tensor": {"dtype": "DT_FLOAT", "tensorShape": {"dim": [{"size": "3"}, {"size": "3"}, {"size": "3"}, {"size": "1"}]}}}}}, {"name": "depthwise_6/filter_in", "op": "Const", "attr": {"value": {"tensor": {"dtype": "DT_FLOAT", "tensorShape": {"dim": [{"size": "3"}, {"size": "3"}, {"size": "3"}, {"size": "1"}]}}}, "dtype": {"type": "DT_FLOAT"}}}, {"name": "ones/packed/0", "op": "Const", "attr": {"value": {"tensor": {"dtype": "DT_INT32", "tensorShape": {}}}, "dtype": {"type": "DT_INT32"}}}, {"name": "strided_slice/stack", "op": "Const", "attr": {"value": {"tensor": {"dtype": "DT_INT32", "tensorShape": {"dim": [{"size": "1"}]}}}, "dtype": {"type": "DT_INT32"}}}, {"name": "strided_slice/stack_1", "op": "Const", "attr": {"dtype": {"type": "DT_INT32"}, "value": {"tensor": {"dtype": "DT_INT32", "tensorShape": {"dim": [{"size": "1"}]}}}}}, {"name": "strided_slice/stack_2", "op": "Const", "attr": {"value": {"tensor": {"dtype": "DT_INT32", "tensorShape": {"dim": [{"size": "1"}]}}}, "dtype": {"type": "DT_INT32"}}}, {"name": "strided_slice_1/stack", "op": "Const", "attr": {"value": {"tensor": {"dtype": "DT_INT32", "tensorShape": {"dim": [{"size": "1"}]}}}, "dtype": {"type": "DT_INT32"}}}, {"name": "strided_slice_1/stack_1", "op": "Const", "attr": {"dtype": {"type": "DT_INT32"}, "value": {"tensor": {"dtype": "DT_INT32", "tensorShape": {"dim": [{"size": "1"}]}}}}}, {"name": "strided_slice_1/stack_2", "op": "Const", "attr": {"value": {"tensor": {"dtype": "DT_INT32", "tensorShape": {"dim": [{"size": "1"}]}}}, "dtype": {"type": "DT_INT32"}}}, {"name": "ones/packed/3", "op": "Const", "attr": {"value": {"tensor": {"dtype": "DT_INT32", "tensorShape": {}}}, "dtype": {"type": "DT_INT32"}}}, {"name": "ones/Const", "op": "Const", "attr": {"value": {"tensor": {"dtype": "DT_FLOAT", "tensorShape": {}}}, "dtype": {"type": "DT_FLOAT"}}}, {"name": "depthwise/filter_in", "op": "Const", "attr": {"value": {"tensor": {"dtype": "DT_FLOAT", "tensorShape": {"dim": [{"size": "3"}, {"size": "3"}, {"size": "1"}, {"size": "1"}]}}}, "dtype": {"type": "DT_FLOAT"}}}, {"name": "input_photo", "op": "Placeholder", "attr": {"dtype": {"type": "DT_FLOAT"}, "shape": {"shape": {"dim": [{"size": "1"}, {"size": "-1"}, {"size": "-1"}, {"size": "3"}]}}}}, {"name": "generator/Conv/BiasAdd", "op": "_FusedConv2D", "input": ["input_photo", "generator/Conv/weights", "generator/Conv/biases"], "device": "/device:CPU:0", "attr": {"fused_ops": {"list": {"s": ["Qmlhc0FkZA=="]}}, "dilations": {"list": {"i": ["1", "1", "1", "1"]}}, "T": {"type": "DT_FLOAT"}, "strides": {"list": {"i": ["1", "1", "1", "1"]}}, "data_format": {"s": "TkhXQw=="}, "use_cudnn_on_gpu": {"b": true}, "explicit_paddings": {"list": {}}, "num_args": {"i": "1"}, "epsilon": {"f": 0.0}, "padding": {"s": "U0FNRQ=="}}}, {"name": "ArithmeticOptimizer/ReplaceMulWithSquare_mul_2", "op": "Square", "input": ["input_photo"], "attr": {"T": {"type": "DT_FLOAT"}}}, {"name": "depthwise_1", "op": "DepthwiseConv2dNative", "input": ["input_photo", "depthwise_1/filter_in"], "attr": {"data_format": {"s": "TkhXQw=="}, "strides": {"list": {"i": ["1", "1", "1", "1"]}}, "explicit_paddings": {"list": {}}, "padding": {"s": "U0FNRQ=="}, "dilations": {"list": {"i": ["1", "1", "1", "1"]}}, "T": {"type": "DT_FLOAT"}}}, {"name": "Shape", "op": "Shape", "input": ["input_photo"], "attr": {"T": {"type": "DT_FLOAT"}, "out_type": {"type": "DT_INT32"}}}, {"name": "generator/LeakyRelu", "op": "LeakyRelu", "input": ["generator/Conv/BiasAdd"], "attr": {"T": {"type": "DT_FLOAT"}, "alpha": {"f": 0.2}}}, {"name": "depthwise_4", "op": "DepthwiseConv2dNative", "input": ["ArithmeticOptimizer/ReplaceMulWithSquare_mul_2", "depthwise_4/filter_in"], "attr": {"dilations": {"list": {"i": ["1", "1", "1", "1"]}}, "T": {"type": "DT_FLOAT"}, "strides": {"list": {"i": ["1", "1", "1", "1"]}}, "data_format": {"s": "TkhXQw=="}, "explicit_paddings": {"list": {}}, "padding": {"s": "U0FNRQ=="}}}, {"name": "strided_slice", "op": "StridedSlice", "input": ["Shape", "strided_slice/stack", "strided_slice/stack_1", "strided_slice/stack_2"], "attr": {"shrink_axis_mask": {"i": "1"}, "ellipsis_mask": {"i": "0"}, "begin_mask": {"i": "0"}, "new_axis_mask": {"i": "0"}, "end_mask": {"i": "0"}, "Index": {"type": "DT_INT32"}, "T": {"type": "DT_INT32"}}}, {"name": "strided_slice_1", "op": "StridedSlice", "input": ["Shape", "strided_slice_1/stack", "strided_slice_1/stack_1", "strided_slice_1/stack_2"], "attr": {"T": {"type": "DT_INT32"}, "Index": {"type": "DT_INT32"}, "shrink_axis_mask": {"i": "1"}, "ellipsis_mask": {"i": "0"}, "begin_mask": {"i": "0"}, "new_axis_mask": {"i": "0"}, "end_mask": {"i": "0"}}}, {"name": "generator/Conv_1/BiasAdd", "op": "_FusedConv2D", "input": ["generator/LeakyRelu", "generator/Conv_1/weights", "generator/Conv_1/biases"], "device": "/device:CPU:0", "attr": {"dilations": {"list": {"i": ["1", "1", "1", "1"]}}, "T": {"type": "DT_FLOAT"}, "strides": {"list": {"i": ["1", "2", "2", "1"]}}, "data_format": {"s": "TkhXQw=="}, "use_cudnn_on_gpu": {"b": true}, "explicit_paddings": {"list": {}}, "num_args": {"i": "1"}, "epsilon": {"f": 0.0}, "padding": {"s": "U0FNRQ=="}, "fused_ops": {"list": {"s": ["Qmlhc0FkZA=="]}}}}, {"name": "ones/packed", "op": "Pack", "input": ["ones/packed/0", "strided_slice", "strided_slice_1", "ones/packed/3"], "attr": {"T": {"type": "DT_INT32"}, "axis": {"i": "0"}, "N": {"i": "4"}}}, {"name": "generator/LeakyRelu_1", "op": "LeakyRelu", "input": ["generator/Conv_1/BiasAdd"], "attr": {"T": {"type": "DT_FLOAT"}, "alpha": {"f": 0.2}}}, {"name": "ones", "op": "Fill", "input": ["ones/packed", "ones/Const"], "attr": {"T": {"type": "DT_FLOAT"}, "index_type": {"type": "DT_INT32"}}}, {"name": "generator/Conv_2/BiasAdd", "op": "_FusedConv2D", "input": ["generator/LeakyRelu_1", "generator/Conv_2/weights", "generator/Conv_2/biases"], "device": "/device:CPU:0", "attr": {"dilations": {"list": {"i": ["1", "1", "1", "1"]}}, "T": {"type": "DT_FLOAT"}, "data_format": {"s": "TkhXQw=="}, "strides": {"list": {"i": ["1", "1", "1", "1"]}}, "explicit_paddings": {"list": {}}, "use_cudnn_on_gpu": {"b": true}, "num_args": {"i": "1"}, "epsilon": {"f": 0.0}, "padding": {"s": "U0FNRQ=="}, "fused_ops": {"list": {"s": ["Qmlhc0FkZA=="]}}}}, {"name": "depthwise", "op": "DepthwiseConv2dNative", "input": ["ones", "depthwise/filter_in"], "attr": {"dilations": {"list": {"i": ["1", "1", "1", "1"]}}, "T": {"type": "DT_FLOAT"}, "data_format": {"s": "TkhXQw=="}, "strides": {"list": {"i": ["1", "1", "1", "1"]}}, "explicit_paddings": {"list": {}}, "padding": {"s": "U0FNRQ=="}}}, {"name": "generator/LeakyRelu_2", "op": "LeakyRelu", "input": ["generator/Conv_2/BiasAdd"], "attr": {"alpha": {"f": 0.2}, "T": {"type": "DT_FLOAT"}}}, {"name": "truediv_3", "op": "RealDiv", "input": ["depthwise_4", "depthwise"], "attr": {"T": {"type": "DT_FLOAT"}}}, {"name": "truediv", "op": "RealDiv", "input": ["depthwise_1", "depthwise"], "attr": {"T": {"type": "DT_FLOAT"}}}, {"name": "generator/Conv_3/BiasAdd", "op": "_FusedConv2D", "input": ["generator/LeakyRelu_2", "generator/Conv_3/weights", "generator/Conv_3/biases"], "device": "/device:CPU:0", "attr": {"T": {"type": "DT_FLOAT"}, "strides": {"list": {"i": ["1", "2", "2", "1"]}}, "data_format": {"s": "TkhXQw=="}, "use_cudnn_on_gpu": {"b": true}, "explicit_paddings": {"list": {}}, "num_args": {"i": "1"}, "epsilon": {"f": 0.0}, "padding": {"s": "U0FNRQ=="}, "fused_ops": {"list": {"s": ["Qmlhc0FkZA=="]}}, "dilations": {"list": {"i": ["1", "1", "1", "1"]}}}}, {"name": "ArithmeticOptimizer/ReplaceMulWithSquare_mul_3", "op": "Square", "input": ["truediv"], "attr": {"T": {"type": "DT_FLOAT"}}}, {"name": "generator/LeakyRelu_3", "op": "LeakyRelu", "input": ["generator/Conv_3/BiasAdd"], "attr": {"T": {"type": "DT_FLOAT"}, "alpha": {"f": 0.2}}}, {"name": "sub_1", "op": "Sub", "input": ["add/y", "ArithmeticOptimizer/ReplaceMulWithSquare_mul_3"], "attr": {"T": {"type": "DT_FLOAT"}}}, {"name": "generator/Conv_4/BiasAdd", "op": "_FusedConv2D", "input": ["generator/LeakyRelu_3", "generator/Conv_4/weights", "generator/Conv_4/biases"], "device": "/device:CPU:0", "attr": {"fused_ops": {"list": {"s": ["Qmlhc0FkZA=="]}}, "dilations": {"list": {"i": ["1", "1", "1", "1"]}}, "T": {"type": "DT_FLOAT"}, "strides": {"list": {"i": ["1", "1", "1", "1"]}}, "data_format": {"s": "TkhXQw=="}, "use_cudnn_on_gpu": {"b": true}, "explicit_paddings": {"list": {}}, "num_args": {"i": "1"}, "epsilon": {"f": 0.0}, "padding": {"s": "U0FNRQ=="}}}, {"name": "add", "op": "Add", "input": ["truediv_3", "sub_1"], "attr": {"T": {"type": "DT_FLOAT"}}}, {"name": "generator/LeakyRelu_4", "op": "LeakyRelu", "input": ["generator/Conv_4/BiasAdd"], "attr": {"T": {"type": "DT_FLOAT"}, "alpha": {"f": 0.2}}}, {"name": "generator/block_0/conv1/BiasAdd", "op": "_FusedConv2D", "input": ["generator/LeakyRelu_4", "generator/block_0/conv1/weights", "generator/block_0/conv1/biases"], "device": "/device:CPU:0", "attr": {"data_format": {"s": "TkhXQw=="}, "strides": {"list": {"i": ["1", "1", "1", "1"]}}, "use_cudnn_on_gpu": {"b": true}, "explicit_paddings": {"list": {}}, "num_args": {"i": "1"}, "epsilon": {"f": 0.0}, "padding": {"s": "U0FNRQ=="}, "fused_ops": {"list": {"s": ["Qmlhc0FkZA=="]}}, "dilations": {"list": {"i": ["1", "1", "1", "1"]}}, "T": {"type": "DT_FLOAT"}}}, {"name": "generator/block_0/LeakyRelu", "op": "LeakyRelu", "input": ["generator/block_0/conv1/BiasAdd"], "attr": {"T": {"type": "DT_FLOAT"}, "alpha": {"f": 0.2}}}, {"name": "generator/block_0/conv2/BiasAdd", "op": "_FusedConv2D", "input": ["generator/block_0/LeakyRelu", "generator/block_0/conv2/weights", "generator/block_0/conv2/biases"], "device": "/device:CPU:0", "attr": {"num_args": {"i": "1"}, "epsilon": {"f": 0.0}, "padding": {"s": "U0FNRQ=="}, "fused_ops": {"list": {"s": ["Qmlhc0FkZA=="]}}, "dilations": {"list": {"i": ["1", "1", "1", "1"]}}, "T": {"type": "DT_FLOAT"}, "strides": {"list": {"i": ["1", "1", "1", "1"]}}, "data_format": {"s": "TkhXQw=="}, "use_cudnn_on_gpu": {"b": true}, "explicit_paddings": {"list": {}}}}, {"name": "generator/block_0/add", "op": "AddV2", "input": ["generator/block_0/conv2/BiasAdd", "generator/LeakyRelu_4"], "attr": {"T": {"type": "DT_FLOAT"}}}, {"name": "generator/block_1/conv1/BiasAdd", "op": "_FusedConv2D", "input": ["generator/block_0/add", "generator/block_1/conv1/weights", "generator/block_1/conv1/biases"], "device": "/device:CPU:0", "attr": {"T": {"type": "DT_FLOAT"}, "data_format": {"s": "TkhXQw=="}, "strides": {"list": {"i": ["1", "1", "1", "1"]}}, "use_cudnn_on_gpu": {"b": true}, "explicit_paddings": {"list": {}}, "num_args": {"i": "1"}, "epsilon": {"f": 0.0}, "padding": {"s": "U0FNRQ=="}, "fused_ops": {"list": {"s": ["Qmlhc0FkZA=="]}}, "dilations": {"list": {"i": ["1", "1", "1", "1"]}}}}, {"name": "generator/block_1/LeakyRelu", "op": "LeakyRelu", "input": ["generator/block_1/conv1/BiasAdd"], "attr": {"T": {"type": "DT_FLOAT"}, "alpha": {"f": 0.2}}}, {"name": "generator/block_1/conv2/BiasAdd", "op": "_FusedConv2D", "input": ["generator/block_1/LeakyRelu", "generator/block_1/conv2/weights", "generator/block_1/conv2/biases"], "device": "/device:CPU:0", "attr": {"T": {"type": "DT_FLOAT"}, "data_format": {"s": "TkhXQw=="}, "strides": {"list": {"i": ["1", "1", "1", "1"]}}, "use_cudnn_on_gpu": {"b": true}, "explicit_paddings": {"list": {}}, "num_args": {"i": "1"}, "epsilon": {"f": 0.0}, "padding": {"s": "U0FNRQ=="}, "fused_ops": {"list": {"s": ["Qmlhc0FkZA=="]}}, "dilations": {"list": {"i": ["1", "1", "1", "1"]}}}}, {"name": "generator/block_1/add", "op": "AddV2", "input": ["generator/block_1/conv2/BiasAdd", "generator/block_0/add"], "attr": {"T": {"type": "DT_FLOAT"}}}, {"name": "generator/block_2/conv1/BiasAdd", "op": "_FusedConv2D", "input": ["generator/block_1/add", "generator/block_2/conv1/weights", "generator/block_2/conv1/biases"], "device": "/device:CPU:0", "attr": {"epsilon": {"f": 0.0}, "padding": {"s": "U0FNRQ=="}, "fused_ops": {"list": {"s": ["Qmlhc0FkZA=="]}}, "dilations": {"list": {"i": ["1", "1", "1", "1"]}}, "T": {"type": "DT_FLOAT"}, "data_format": {"s": "TkhXQw=="}, "strides": {"list": {"i": ["1", "1", "1", "1"]}}, "explicit_paddings": {"list": {}}, "use_cudnn_on_gpu": {"b": true}, "num_args": {"i": "1"}}}, {"name": "generator/block_2/LeakyRelu", "op": "LeakyRelu", "input": ["generator/block_2/conv1/BiasAdd"], "attr": {"T": {"type": "DT_FLOAT"}, "alpha": {"f": 0.2}}}, {"name": "generator/block_2/conv2/BiasAdd", "op": "_FusedConv2D", "input": ["generator/block_2/LeakyRelu", "generator/block_2/conv2/weights", "generator/block_2/conv2/biases"], "device": "/device:CPU:0", "attr": {"epsilon": {"f": 0.0}, "padding": {"s": "U0FNRQ=="}, "fused_ops": {"list": {"s": ["Qmlhc0FkZA=="]}}, "dilations": {"list": {"i": ["1", "1", "1", "1"]}}, "T": {"type": "DT_FLOAT"}, "strides": {"list": {"i": ["1", "1", "1", "1"]}}, "data_format": {"s": "TkhXQw=="}, "explicit_paddings": {"list": {}}, "use_cudnn_on_gpu": {"b": true}, "num_args": {"i": "1"}}}, {"name": "generator/block_2/add", "op": "AddV2", "input": ["generator/block_2/conv2/BiasAdd", "generator/block_1/add"], "attr": {"T": {"type": "DT_FLOAT"}}}, {"name": "generator/block_3/conv1/BiasAdd", "op": "_FusedConv2D", "input": ["generator/block_2/add", "generator/block_3/conv1/weights", "generator/block_3/conv1/biases"], "device": "/device:CPU:0", "attr": {"dilations": {"list": {"i": ["1", "1", "1", "1"]}}, "T": {"type": "DT_FLOAT"}, "strides": {"list": {"i": ["1", "1", "1", "1"]}}, "data_format": {"s": "TkhXQw=="}, "explicit_paddings": {"list": {}}, "use_cudnn_on_gpu": {"b": true}, "num_args": {"i": "1"}, "epsilon": {"f": 0.0}, "padding": {"s": "U0FNRQ=="}, "fused_ops": {"list": {"s": ["Qmlhc0FkZA=="]}}}}, {"name": "generator/block_3/LeakyRelu", "op": "LeakyRelu", "input": ["generator/block_3/conv1/BiasAdd"], "attr": {"alpha": {"f": 0.2}, "T": {"type": "DT_FLOAT"}}}, {"name": "generator/block_3/conv2/BiasAdd", "op": "_FusedConv2D", "input": ["generator/block_3/LeakyRelu", "generator/block_3/conv2/weights", "generator/block_3/conv2/biases"], "device": "/device:CPU:0", "attr": {"num_args": {"i": "1"}, "epsilon": {"f": 0.0}, "padding": {"s": "U0FNRQ=="}, "fused_ops": {"list": {"s": ["Qmlhc0FkZA=="]}}, "dilations": {"list": {"i": ["1", "1", "1", "1"]}}, "T": {"type": "DT_FLOAT"}, "data_format": {"s": "TkhXQw=="}, "strides": {"list": {"i": ["1", "1", "1", "1"]}}, "explicit_paddings": {"list": {}}, "use_cudnn_on_gpu": {"b": true}}}, {"name": "generator/block_3/add", "op": "AddV2", "input": ["generator/block_3/conv2/BiasAdd", "generator/block_2/add"], "attr": {"T": {"type": "DT_FLOAT"}}}, {"name": "generator/Conv_5/BiasAdd", "op": "_FusedConv2D", "input": ["generator/block_3/add", "generator/Conv_5/weights", "generator/Conv_5/biases"], "device": "/device:CPU:0", "attr": {"data_format": {"s": "TkhXQw=="}, "strides": {"list": {"i": ["1", "1", "1", "1"]}}, "explicit_paddings": {"list": {}}, "use_cudnn_on_gpu": {"b": true}, "num_args": {"i": "1"}, "epsilon": {"f": 0.0}, "padding": {"s": "U0FNRQ=="}, "fused_ops": {"list": {"s": ["Qmlhc0FkZA=="]}}, "dilations": {"list": {"i": ["1", "1", "1", "1"]}}, "T": {"type": "DT_FLOAT"}}}, {"name": "generator/LeakyRelu_5", "op": "LeakyRelu", "input": ["generator/Conv_5/BiasAdd"], "attr": {"T": {"type": "DT_FLOAT"}, "alpha": {"f": 0.2}}}, {"name": "generator/Shape", "op": "Shape", "input": ["generator/LeakyRelu_5"], "attr": {"T": {"type": "DT_FLOAT"}, "out_type": {"type": "DT_INT32"}}}, {"name": "generator/Shape_1", "op": "Shape", "input": ["generator/LeakyRelu_5"], "attr": {"T": {"type": "DT_FLOAT"}, "out_type": {"type": "DT_INT32"}}}, {"name": "generator/strided_slice", "op": "StridedSlice", "input": ["generator/Shape", "generator/strided_slice/stack", "generator/strided_slice/stack_1", "generator/strided_slice/stack_2"], "attr": {"shrink_axis_mask": {"i": "1"}, "begin_mask": {"i": "0"}, "ellipsis_mask": {"i": "0"}, "new_axis_mask": {"i": "0"}, "end_mask": {"i": "0"}, "T": {"type": "DT_INT32"}, "Index": {"type": "DT_INT32"}}}, {"name": "generator/strided_slice_1", "op": "StridedSlice", "input": ["generator/Shape_1", "generator/strided_slice_1/stack", "generator/strided_slice_1/stack_1", "generator/strided_slice_1/stack_2"], "attr": {"shrink_axis_mask": {"i": "1"}, "ellipsis_mask": {"i": "0"}, "begin_mask": {"i": "0"}, "new_axis_mask": {"i": "0"}, "end_mask": {"i": "0"}, "Index": {"type": "DT_INT32"}, "T": {"type": "DT_INT32"}}}, {"name": "generator/mul", "op": "Mul", "input": ["generator/strided_slice", "generator/mul/y"], "attr": {"T": {"type": "DT_INT32"}}}, {"name": "generator/mul_1", "op": "Mul", "input": ["generator/strided_slice_1", "generator/mul_1/y"], "attr": {"T": {"type": "DT_INT32"}}}, {"name": "generator/ResizeBilinear/size", "op": "Pack", "input": ["generator/mul", "generator/mul_1"], "attr": {"N": {"i": "2"}, "T": {"type": "DT_INT32"}, "axis": {"i": "0"}}}, {"name": "generator/ResizeBilinear", "op": "ResizeBilinear", "input": ["generator/LeakyRelu_5", "generator/ResizeBilinear/size"], "attr": {"align_corners": {"b": false}, "half_pixel_centers": {"b": false}, "T": {"type": "DT_FLOAT"}}}, {"name": "generator/add", "op": "AddV2", "input": ["generator/ResizeBilinear", "generator/LeakyRelu_2"], "attr": {"T": {"type": "DT_FLOAT"}}}, {"name": "generator/Conv_6/BiasAdd", "op": "_FusedConv2D", "input": ["generator/add", "generator/Conv_6/weights", "generator/Conv_6/biases"], "device": "/device:CPU:0", "attr": {"T": {"type": "DT_FLOAT"}, "data_format": {"s": "TkhXQw=="}, "strides": {"list": {"i": ["1", "1", "1", "1"]}}, "explicit_paddings": {"list": {}}, "use_cudnn_on_gpu": {"b": true}, "num_args": {"i": "1"}, "epsilon": {"f": 0.0}, "padding": {"s": "U0FNRQ=="}, "fused_ops": {"list": {"s": ["Qmlhc0FkZA=="]}}, "dilations": {"list": {"i": ["1", "1", "1", "1"]}}}}, {"name": "generator/LeakyRelu_6", "op": "LeakyRelu", "input": ["generator/Conv_6/BiasAdd"], "attr": {"T": {"type": "DT_FLOAT"}, "alpha": {"f": 0.2}}}, {"name": "generator/Conv_7/BiasAdd", "op": "_FusedConv2D", "input": ["generator/LeakyRelu_6", "generator/Conv_7/weights", "generator/Conv_7/biases"], "device": "/device:CPU:0", "attr": {"fused_ops": {"list": {"s": ["Qmlhc0FkZA=="]}}, "dilations": {"list": {"i": ["1", "1", "1", "1"]}}, "T": {"type": "DT_FLOAT"}, "strides": {"list": {"i": ["1", "1", "1", "1"]}}, "data_format": {"s": "TkhXQw=="}, "use_cudnn_on_gpu": {"b": true}, "explicit_paddings": {"list": {}}, "num_args": {"i": "1"}, "epsilon": {"f": 0.0}, "padding": {"s": "U0FNRQ=="}}}, {"name": "generator/LeakyRelu_7", "op": "LeakyRelu", "input": ["generator/Conv_7/BiasAdd"], "attr": {"T": {"type": "DT_FLOAT"}, "alpha": {"f": 0.2}}}, {"name": "generator/Shape_2", "op": "Shape", "input": ["generator/LeakyRelu_7"], "attr": {"T": {"type": "DT_FLOAT"}, "out_type": {"type": "DT_INT32"}}}, {"name": "generator/Shape_3", "op": "Shape", "input": ["generator/LeakyRelu_7"], "attr": {"T": {"type": "DT_FLOAT"}, "out_type": {"type": "DT_INT32"}}}, {"name": "generator/strided_slice_2", "op": "StridedSlice", "input": ["generator/Shape_2", "generator/strided_slice_2/stack", "generator/strided_slice_2/stack_1", "generator/strided_slice_2/stack_2"], "attr": {"shrink_axis_mask": {"i": "1"}, "ellipsis_mask": {"i": "0"}, "begin_mask": {"i": "0"}, "new_axis_mask": {"i": "0"}, "end_mask": {"i": "0"}, "T": {"type": "DT_INT32"}, "Index": {"type": "DT_INT32"}}}, {"name": "generator/strided_slice_3", "op": "StridedSlice", "input": ["generator/Shape_3", "generator/strided_slice_3/stack", "generator/strided_slice_3/stack_1", "generator/strided_slice_3/stack_2"], "attr": {"Index": {"type": "DT_INT32"}, "T": {"type": "DT_INT32"}, "shrink_axis_mask": {"i": "1"}, "ellipsis_mask": {"i": "0"}, "begin_mask": {"i": "0"}, "new_axis_mask": {"i": "0"}, "end_mask": {"i": "0"}}}, {"name": "generator/mul_2", "op": "Mul", "input": ["generator/strided_slice_2", "generator/mul_2/y"], "attr": {"T": {"type": "DT_INT32"}}}, {"name": "generator/mul_3", "op": "Mul", "input": ["generator/strided_slice_3", "generator/mul_3/y"], "attr": {"T": {"type": "DT_INT32"}}}, {"name": "generator/ResizeBilinear_1/size", "op": "Pack", "input": ["generator/mul_2", "generator/mul_3"], "attr": {"N": {"i": "2"}, "T": {"type": "DT_INT32"}, "axis": {"i": "0"}}}, {"name": "generator/ResizeBilinear_1", "op": "ResizeBilinear", "input": ["generator/LeakyRelu_7", "generator/ResizeBilinear_1/size"], "attr": {"align_corners": {"b": false}, "half_pixel_centers": {"b": false}, "T": {"type": "DT_FLOAT"}}}, {"name": "generator/add_1", "op": "AddV2", "input": ["generator/ResizeBilinear_1", "generator/LeakyRelu"], "attr": {"T": {"type": "DT_FLOAT"}}}, {"name": "generator/Conv_8/BiasAdd", "op": "_FusedConv2D", "input": ["generator/add_1", "generator/Conv_8/weights", "generator/Conv_8/biases"], "device": "/device:CPU:0", "attr": {"dilations": {"list": {"i": ["1", "1", "1", "1"]}}, "T": {"type": "DT_FLOAT"}, "strides": {"list": {"i": ["1", "1", "1", "1"]}}, "data_format": {"s": "TkhXQw=="}, "explicit_paddings": {"list": {}}, "use_cudnn_on_gpu": {"b": true}, "num_args": {"i": "1"}, "epsilon": {"f": 0.0}, "padding": {"s": "U0FNRQ=="}, "fused_ops": {"list": {"s": ["Qmlhc0FkZA=="]}}}}, {"name": "generator/LeakyRelu_8", "op": "LeakyRelu", "input": ["generator/Conv_8/BiasAdd"], "attr": {"alpha": {"f": 0.2}, "T": {"type": "DT_FLOAT"}}}, {"name": "generator/Conv_9/BiasAdd", "op": "_FusedConv2D", "input": ["generator/LeakyRelu_8", "generator/Conv_9/weights", "generator/Conv_9/biases"], "device": "/device:CPU:0", "attr": {"data_format": {"s": "TkhXQw=="}, "strides": {"list": {"i": ["1", "1", "1", "1"]}}, "explicit_paddings": {"list": {}}, "use_cudnn_on_gpu": {"b": true}, "num_args": {"i": "1"}, "epsilon": {"f": 0.0}, "padding": {"s": "U0FNRQ=="}, "fused_ops": {"list": {"s": ["Qmlhc0FkZA=="]}}, "dilations": {"list": {"i": ["1", "1", "1", "1"]}}, "T": {"type": "DT_FLOAT"}}}, {"name": "depthwise_2", "op": "DepthwiseConv2dNative", "input": ["generator/Conv_9/BiasAdd", "depthwise_2/filter_in"], "attr": {"data_format": {"s": "TkhXQw=="}, "strides": {"list": {"i": ["1", "1", "1", "1"]}}, "explicit_paddings": {"list": {}}, "padding": {"s": "U0FNRQ=="}, "dilations": {"list": {"i": ["1", "1", "1", "1"]}}, "T": {"type": "DT_FLOAT"}}}, {"name": "mul", "op": "Mul", "input": ["input_photo", "generator/Conv_9/BiasAdd"], "attr": {"T": {"type": "DT_FLOAT"}}}, {"name": "truediv_1", "op": "RealDiv", "input": ["depthwise_2", "depthwise"], "attr": {"T": {"type": "DT_FLOAT"}}}, {"name": "depthwise_3", "op": "DepthwiseConv2dNative", "input": ["mul", "depthwise_3/filter_in"], "attr": {"padding": {"s": "U0FNRQ=="}, "dilations": {"list": {"i": ["1", "1", "1", "1"]}}, "T": {"type": "DT_FLOAT"}, "strides": {"list": {"i": ["1", "1", "1", "1"]}}, "data_format": {"s": "TkhXQw=="}, "explicit_paddings": {"list": {}}}}, {"name": "mul_1", "op": "Mul", "input": ["truediv", "truediv_1"], "attr": {"T": {"type": "DT_FLOAT"}}}, {"name": "truediv_2", "op": "RealDiv", "input": ["depthwise_3", "depthwise"], "attr": {"T": {"type": "DT_FLOAT"}}}, {"name": "sub", "op": "Sub", "input": ["truediv_2", "mul_1"], "attr": {"T": {"type": "DT_FLOAT"}}}, {"name": "truediv_4", "op": "RealDiv", "input": ["sub", "add"], "attr": {"T": {"type": "DT_FLOAT"}}}, {"name": "depthwise_5", "op": "DepthwiseConv2dNative", "input": ["truediv_4", "depthwise_5/filter_in"], "attr": {"strides": {"list": {"i": ["1", "1", "1", "1"]}}, "data_format": {"s": "TkhXQw=="}, "explicit_paddings": {"list": {}}, "padding": {"s": "U0FNRQ=="}, "dilations": {"list": {"i": ["1", "1", "1", "1"]}}, "T": {"type": "DT_FLOAT"}}}, {"name": "mul_4", "op": "Mul", "input": ["truediv_4", "truediv"], "attr": {"T": {"type": "DT_FLOAT"}}}, {"name": "truediv_5", "op": "RealDiv", "input": ["depthwise_5", "depthwise"], "attr": {"T": {"type": "DT_FLOAT"}}}, {"name": "sub_2", "op": "Sub", "input": ["truediv_1", "mul_4"], "attr": {"T": {"type": "DT_FLOAT"}}}, {"name": "mul_5", "op": "Mul", "input": ["truediv_5", "input_photo"], "attr": {"T": {"type": "DT_FLOAT"}}}, {"name": "depthwise_6", "op": "DepthwiseConv2dNative", "input": ["sub_2", "depthwise_6/filter_in"], "attr": {"padding": {"s": "U0FNRQ=="}, "dilations": {"list": {"i": ["1", "1", "1", "1"]}}, "T": {"type": "DT_FLOAT"}, "strides": {"list": {"i": ["1", "1", "1", "1"]}}, "data_format": {"s": "TkhXQw=="}, "explicit_paddings": {"list": {}}}}, {"name": "truediv_6", "op": "RealDiv", "input": ["depthwise_6", "depthwise"], "attr": {"T": {"type": "DT_FLOAT"}}}, {"name": "add_1", "op": "AddV2", "input": ["mul_5", "truediv_6"], "attr": {"T": {"type": "DT_FLOAT"}}}, {"name": "final_output", "op": "Identity", "input": ["add_1"], "attr": {"T": {"type": "DT_FLOAT"}}}], "library": {}, "versions": {"producer": 440}}, "weightsManifest": [{"paths": ["group1-shard1of2.bin", "group1-shard2of2.bin"], "weights": [{"name": "depthwise_5/filter_in", "shape": [3, 3, 3, 1], "dtype": "float32"}, {"name": "depthwise_3/filter_in", "shape": [3, 3, 3, 1], "dtype": "float32"}, {"name": "generator/strided_slice_2/stack", "shape": [1], "dtype": "int32"}, {"name": "generator/strided_slice_2/stack_1", "shape": [1], "dtype": "int32"}, {"name": "generator/strided_slice_2/stack_2", "shape": [1], "dtype": "int32"}, {"name": "generator/mul_2/y", "shape": [], "dtype": "int32"}, {"name": "generator/strided_slice/stack", "shape": [1], "dtype": "int32"}, {"name": "generator/strided_slice/stack_1", "shape": [1], "dtype": "int32"}, {"name": "generator/strided_slice/stack_2", "shape": [1], "dtype": "int32"}, {"name": "generator/mul/y", "shape": [], "dtype": "int32"}, {"name": "generator/block_3/conv1/weights", "shape": [3, 3, 128, 128], "dtype": "float32"}, {"name": "generator/block_3/conv1/biases", "shape": [128], "dtype": "float32"}, {"name": "generator/block_3/conv2/weights", "shape": [3, 3, 128, 128], "dtype": "float32"}, {"name": "generator/block_3/conv2/biases", "shape": [128], "dtype": "float32"}, {"name": "generator/block_2/conv1/weights", "shape": [3, 3, 128, 128], "dtype": "float32"}, {"name": "generator/block_2/conv1/biases", "shape": [128], "dtype": "float32"}, {"name": "generator/block_2/conv2/weights", "shape": [3, 3, 128, 128], "dtype": "float32"}, {"name": "generator/block_2/conv2/biases", "shape": [128], "dtype": "float32"}, {"name": "generator/block_1/conv1/weights", "shape": [3, 3, 128, 128], "dtype": "float32"}, {"name": "generator/block_1/conv1/biases", "shape": [128], "dtype": "float32"}, {"name": "generator/block_1/conv2/weights", "shape": [3, 3, 128, 128], "dtype": "float32"}, {"name": "generator/block_1/conv2/biases", "shape": [128], "dtype": "float32"}, {"name": "generator/block_0/conv1/weights", "shape": [3, 3, 128, 128], "dtype": "float32"}, {"name": "generator/block_0/conv1/biases", "shape": [128], "dtype": "float32"}, {"name": "generator/block_0/conv2/weights", "shape": [3, 3, 128, 128], "dtype": "float32"}, {"name": "generator/block_0/conv2/biases", "shape": [128], "dtype": "float32"}, {"name": "generator/Conv_3/weights", "shape": [3, 3, 64, 64], "dtype": "float32"}, {"name": "generator/Conv_3/biases", "shape": [64], "dtype": "float32"}, {"name": "generator/Conv_4/weights", "shape": [3, 3, 64, 128], "dtype": "float32"}, {"name": "generator/Conv_4/biases", "shape": [128], "dtype": "float32"}, {"name": "generator/Conv_5/weights", "shape": [3, 3, 128, 64], "dtype": "float32"}, {"name": "generator/Conv_5/biases", "shape": [64], "dtype": "float32"}, {"name": "generator/strided_slice_1/stack", "shape": [1], "dtype": "int32"}, {"name": "generator/strided_slice_1/stack_1", "shape": [1], "dtype": "int32"}, {"name": "generator/strided_slice_1/stack_2", "shape": [1], "dtype": "int32"}, {"name": "generator/mul_1/y", "shape": [], "dtype": "int32"}, {"name": "generator/Conv_1/weights", "shape": [3, 3, 32, 32], "dtype": "float32"}, {"name": "generator/Conv_1/biases", "shape": [32], "dtype": "float32"}, {"name": "generator/Conv_2/weights", "shape": [3, 3, 32, 64], "dtype": "float32"}, {"name": "generator/Conv_2/biases", "shape": [64], "dtype": "float32"}, {"name": "generator/Conv_6/weights", "shape": [3, 3, 64, 64], "dtype": "float32"}, {"name": "generator/Conv_6/biases", "shape": [64], "dtype": "float32"}, {"name": "generator/Conv_7/weights", "shape": [3, 3, 64, 32], "dtype": "float32"}, {"name": "generator/Conv_7/biases", "shape": [32], "dtype": "float32"}, {"name": "generator/strided_slice_3/stack", "shape": [1], "dtype": "int32"}, {"name": "generator/strided_slice_3/stack_1", "shape": [1], "dtype": "int32"}, {"name": "generator/strided_slice_3/stack_2", "shape": [1], "dtype": "int32"}, {"name": "generator/mul_3/y", "shape": [], "dtype": "int32"}, {"name": "generator/Conv/weights", "shape": [7, 7, 3, 32], "dtype": "float32"}, {"name": "generator/Conv/biases", "shape": [32], "dtype": "float32"}, {"name": "generator/Conv_8/weights", "shape": [3, 3, 32, 32], "dtype": "float32"}, {"name": "generator/Conv_8/biases", "shape": [32], "dtype": "float32"}, {"name": "generator/Conv_9/weights", "shape": [7, 7, 32, 3], "dtype": "float32"}, {"name": "generator/Conv_9/biases", "shape": [3], "dtype": "float32"}, {"name": "depthwise_2/filter_in", "shape": [3, 3, 3, 1], "dtype": "float32"}, {"name": "depthwise_4/filter_in", "shape": [3, 3, 3, 1], "dtype": "float32"}, {"name": "add/y", "shape": [], "dtype": "float32"}, {"name": "depthwise_1/filter_in", "shape": [3, 3, 3, 1], "dtype": "float32"}, {"name": "depthwise_6/filter_in", "shape": [3, 3, 3, 1], "dtype": "float32"}, {"name": "ones/packed/0", "shape": [], "dtype": "int32"}, {"name": "strided_slice/stack", "shape": [1], "dtype": "int32"}, {"name": "strided_slice/stack_1", "shape": [1], "dtype": "int32"}, {"name": "strided_slice/stack_2", "shape": [1], "dtype": "int32"}, {"name": "strided_slice_1/stack", "shape": [1], "dtype": "int32"}, {"name": "strided_slice_1/stack_1", "shape": [1], "dtype": "int32"}, {"name": "strided_slice_1/stack_2", "shape": [1], "dtype": "int32"}, {"name": "ones/packed/3", "shape": [], "dtype": "int32"}, {"name": "ones/Const", "shape": [], "dtype": "float32"}, {"name": "depthwise/filter_in", "shape": [3, 3, 1, 1], "dtype": "float32"}]}]} -------------------------------------------------------------------------------- /script.js: -------------------------------------------------------------------------------- 1 | tf.setBackend('wasm').then(() => runModel()) 2 | 3 | const APP = { 4 | model: null, size: 256, 5 | source: document.getElementById('source'), 6 | canvas: document.getElementById('result'), 7 | status: document.getElementById('status'), 8 | download: document.getElementById('download'), 9 | $: n => document.getElementById(n), 10 | path: './models/CartoonGAN/web-uint8/model.json' 11 | } 12 | 13 | const runModel = async () => { 14 | APP.model = await tf.loadGraphModel(APP.path) 15 | // warm up 16 | APP.model.predict(tf.zeros([1, 1, 1, 3])).dispose() 17 | predict(APP.source) 18 | APP.source.onload = () => { 19 | setTimeout(() => { 20 | APP.status.classList.remove('d-none') 21 | APP.canvas.classList.add('d-none') 22 | APP.canvas.classList.remove('d-block') 23 | }, 0) 24 | setTimeout(() => { predict(APP.source) }, 50) 25 | } 26 | } 27 | 28 | async function predict(imgElement) { 29 | let img = tf.browser.fromPixels(imgElement) 30 | const shape = img.shape 31 | const [w, h] = shape 32 | img = normalize(img) 33 | const t0 = performance.now() 34 | const result = await APP.model.predict({ 'input_photo:0': img }) 35 | const timer = performance.now() - t0 36 | let img_out = await result.squeeze().sub(tf.scalar(-1)).div(tf.scalar(2)).clipByValue(0, 1) 37 | const pad = Math.round(Math.abs(w - h) / Math.max(w, h) * APP.size) 38 | const slice = (w > h) ? [0, pad, 0] : [pad, 0, 0] 39 | img_out = img_out.slice(slice) 40 | draw(img_out, shape) 41 | console.log(Math.round(timer / 1000 * 10) / 10) 42 | } 43 | 44 | function normalize(img) { 45 | const [w, h] = img.shape 46 | // pad 47 | const pad = (w > h) ? [[0, 0], [w - h, 0], [0, 0]] : [[h - w, 0], [0, 0], [0, 0]] 48 | img = img.pad(pad) 49 | const size = APP.size 50 | img = tf.image.resizeBilinear(img, [size, size]).reshape([1, size, size, 3]) 51 | const offset = tf.scalar(127.5) 52 | return img.sub(offset).div(offset) 53 | } 54 | 55 | function draw(img, size) { 56 | const scaleby = size[0] / img.shape[0] 57 | tf.browser.toPixels(img, APP.canvas) 58 | APP.canvas.classList.remove('d-none') 59 | APP.canvas.classList.add('d-block') 60 | APP.status.classList.add('d-none') 61 | setTimeout(() => scaleCanvas(scaleby), 50) 62 | } 63 | 64 | function scaleCanvas(pct=2) { 65 | const canvas = APP.$('result') 66 | const tmpcan = document.createElement('canvas') 67 | const tctx = tmpcan.getContext('2d') 68 | const cw = canvas.width 69 | const ch = canvas.height 70 | tmpcan.width = cw 71 | tmpcan.height = ch 72 | tctx.drawImage(canvas, 0, 0) 73 | canvas.width *= pct 74 | canvas.height *= pct 75 | const ctx = canvas.getContext('2d') 76 | ctx.drawImage(tmpcan, 0, 0, cw, ch, 0, 0, cw*pct, ch*pct) 77 | APP.download.href = canvas.toDataURL('image/jpeg') 78 | } 79 | 80 | document.getElementById('file').addEventListener('change', evt => { 81 | evt.target.files.forEach(f => { 82 | if (!f.type.match('image.*')) { return } 83 | let reader = new FileReader() 84 | reader.onload = e => { APP.source.src = e.target.result } 85 | reader.readAsDataURL(f) 86 | }) 87 | evt.target.value = null 88 | }) 89 | 90 | document.querySelectorAll('#examples img').forEach( 91 | img => img.addEventListener('click', evt => { APP.source.src = img.src }) 92 | ) -------------------------------------------------------------------------------- /style.css: -------------------------------------------------------------------------------- 1 | .home { 2 | background-image: url(assets/wave.svg); 3 | background-repeat: no-repeat; 4 | background-position: top center; 5 | } 6 | 7 | .placeholder { 8 | background: #f6f7f8; 9 | min-height: 300px; 10 | } 11 | 12 | .btn-xs { 13 | padding: .125rem .25rem; 14 | font-size: .9rem; 15 | line-height: 1.5; 16 | border-radius: .2rem; 17 | } 18 | 19 | .btn-primary { 20 | color: #fff; 21 | background-color: #101749; 22 | border-color: #101749; 23 | } 24 | 25 | .btn-primary:hover { 26 | color: #fff; 27 | background-color: #090d2a; 28 | border-color: #070a1f; 29 | } 30 | 31 | .sm2 { 32 | font-size: 66.66667% !important; 33 | } 34 | 35 | .cursor-pointer { 36 | cursor: pointer !important; 37 | } --------------------------------------------------------------------------------