ckmarkoh / neuralart_tensorflow Goto Github PK
View Code? Open in Web Editor NEWImplementation of "A Neural Algorithm of Artistic Style" by Tensorflow
License: MIT License
Implementation of "A Neural Algorithm of Artistic Style" by Tensorflow
License: MIT License
I would like to use this in a mobile application, and the best way I see is to use it with Firebase ML kit.
The kit only works with tensorFlow Lite models https://www.tensorflow.org/mobile/tflite/
Please can you convert, or tell me how to properly convert your model to a the Tensorflow lite model?
When i run main.py, it show some error
Traceback (most recent call last):
File "main.py", line 144, in
main()
File "main.py", line 112, in main
content_img = read_image(CONTENT_IMG)
File "main.py", line 96, in read_image
image = image[np.newaxis,:IMAGE_H,:IMAGE_W,:]
IndexError: too many indices for array
how do i fix it, Thx
Only the first image (0000.png) has any content - a slightly artsy-fied version of the original. It looks like it works fine for the first image. But everything else after that is black frames; those are not corrupted images, just solid black frames, about 1.5 kB each.
numpy (1.11.1)
scipy (0.18.0)
tensorflow (0.10.0rc0) - installed from binary
Pillow (3.3.1)
CUDA 7.5.18
cuDNN 4
Nvidia driver 367.44
Ubuntu 14.04
kernel 4.4.0-36
Nvidia Titan X Pascal
Here's the output from the script:
$ python main.py
I tensorflow/stream_executor/dso_loader.cc:108] successfully opened CUDA library libcublas.so locally
I tensorflow/stream_executor/dso_loader.cc:108] successfully opened CUDA library libcudnn.so locally
I tensorflow/stream_executor/dso_loader.cc:108] successfully opened CUDA library libcufft.so locally
I tensorflow/stream_executor/dso_loader.cc:108] successfully opened CUDA library libcuda.so.1 locally
I tensorflow/stream_executor/dso_loader.cc:108] successfully opened CUDA library libcurand.so locally
I tensorflow/core/common_runtime/gpu/gpu_init.cc:102] Found device 0 with properties:
name: TITAN X (Pascal)
major: 6 minor: 1 memoryClockRate (GHz) 1.531
pciBusID 0000:01:00.0
Total memory: 11.90GiB
Free memory: 11.48GiB
I tensorflow/core/common_runtime/gpu/gpu_init.cc:126] DMA: 0
I tensorflow/core/common_runtime/gpu/gpu_init.cc:136] 0: Y
I tensorflow/core/common_runtime/gpu/gpu_device.cc:839] Creating TensorFlow device (/gpu:0) -> (device: 0, name: TITAN X (Pascal), pci bus id: 0000:01:00.0)
6.48804e+11
9.17615e+11
9.17613e+11
9.17614e+11
nan
9.17614e+11
inf
nan
nan
nan
9.1761e+11
4.88761e+21
nan
inf
nan
nan
inf
nan
nan
nan
nan
9.17614e+11
nan
nan
nan
nan
nan
nan
7.94981e+18
nan
2.32385e+21
nan
nan
3.28392e+21
inf
nan
nan
1.3813e+12
4.89096e+21
inf
nan
nan
nan
nan
nan
nan
inf
nan
nan
nan
"assert layer_name == expected_layer_name" failed when I used the VGG-19 model linked in the readme. It was 534.9MB and did not seem to have proper layer names. I used the model at https://github.com/ckmarkoh/neuralart_tensorflow (which is in the readm2). Files is at https://drive.google.com/file/d/0B8QJdgMvQDrVU2cyZjFKU1RrLUU/view
it was 576mb and worked fine.
p.s. Thank for the notebook, easy to understand.
ubuntu16
tf 1.0
is this api it changed?
Hi Mark, I have read the paper, and watched your video, I think I got the very basic idea of the style transfer. However, there is one line I don't understand (maybe I am really not familiar with tensrorflow)
In the following
cost_content = sum(map(lambda l,: l[1]*build_content_loss(sess.run(net[l[0]]) , net[l[0]])
, CONTENT_LAYERS))
why using sess.run(net[l[0]]) vs. net[l[0] as cost computation ? what is the difference for net[0] in "sess.run' vs net[0] ?
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.