lyttonhao / neural-style-mmd Goto Github PK
View Code? Open in Web Editor NEWMXNet Code For Demystifying Neural Style Transfer (IJCAI 2017)
MXNet Code For Demystifying Neural Style Transfer (IJCAI 2017)
Hi, I wonder how do you set the bandwidth parameter of Gaussian Kernel here.
https://github.com/lyttonhao/Neural-Style-MMD/blob/master/mmd_loss.py#L65
Can you give me an explanation? Thank you!
I have tried the bn-loss but it always returns nan gradient and loss. So I want to know what's wrong with it.
neural-style.py line 270
print np.prod(content_array[0].shape)
In the paper "Demystifying Neural Style Transfer", there might be a mistake, which will make Equation (8) incorrect.
For a layer L (in the paper, the authors used the lowcase L) in the loss network, NL is the number of feature maps in layer L. All the feature maps in layer L have the same size for a given input image.
Given different input images of different sizes, the size of those feature maps at the same layer will be different. For example, if the style image is 512x512 and the content image is 256x256, the size of a feature map of the style image at layer 4_2 (use VGG-19 as an example) will be 4 times of the feature map of the content image at layer 4_2.
On the right column of page 2 of the paper, ML is the size of a feature map at layer L for the content image and the generated image. For the style image, the size of a feature map at layer L typically is different. Therefore, the size of matrix to save the activations of the style image at layer L cannot be NL x ML.
If my understanding is correct, then the deduction in Equation (8) is incorrect.
I'm trying to understand the code but unable to understand your loss calculation function can you please explain what are you doing because it doesn't seem you are doing anything in linear kernel you have commented it out in mmd_loss.py
Hi, in line 43
of mmd_loss.py
, you wrote dot(x, x.T)
, I think it should be dot(x.T, x)
, correct?
Is there anyway to implement processing folders full of multiple files(For video)
Maybe even do them in order like other neuralstyle transfer implemations do
error happens when running at "gnorm = mx.nd.norm(model_executor.data_grad).asscalar()" in /mnt/d/mahao/codes/Neural-Style-MMD/neural-style.py:
MXNetError: Check failed: reinterpret_cast( params.info->callbacks[kCustomOpForward])( ptrs.size(), const_cast<void**>(ptrs.data()), const_cast<int*>(tags.data()), reinterpret_cast<const int*>(req.data()), static_cast(ctx.is_train), params.info->contexts[kCustomOpForward]):
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.