ProGamerGov

Results 515 comments of ProGamerGov

Torch7 had really bad default parameter values for the Adam optimizer, which is why neural-style had a parameter for the learning rate. PyTorch's Adam optimizer seems use better default parameter...

I implemented histogram loss as it's own layer type alongside content and style layers. The code can be found here: https://gist.github.com/ProGamerGov/30e95ac9ff42f3e09288ae07dc012a76 Histogram loss example output on the left, control test...

@genekogan I replied to your comment in the gist regarding weights. Someone also already implemented covariance loss in neural-style-pt here: https://github.com/ProGamerGov/neural-style-pt/issues/11, so that should help with covariance loss part of...

It looks like there may an issue with larger image sizes when testing the histogram layers. I don't know enough about C++ to decode it. ``` Running optimization with L-BFGS...

@genekogan Has covariance loss made any difference with the lower layers? For the histogram size problem, we could potentially try to recreate the `matchHistogram()` function in PyTorch, though `torch.histc()` is...

@genekogan I think you're right. As for the `n cannot be greater than 2^24+1 for Float type` error, I think it's because of a limitation with float numbers themselves: A...

@genekogan I translated my [linear-color-transfer.py](https://github.com/ProGamerGov/Neural-Tools/blob/master/linear-color-transfer.py) to PyTorch: https://gist.github.com/ProGamerGov/684c0953395e66db6ac5fe09d6723a5b The code expects both inputs to have the same size, and it does not change the BGR images to RGB or un-normalize...

I got [linear-color-transfer](https://github.com/ProGamerGov/Neural-Tools/blob/master/linear-color-transfer.py) fully working inside neural-style-pt: https://gist.github.com/ProGamerGov/923b1679b243911e71f9bef4a4bda65a The histogram class is used to perform the standard histogram matching that's normally done via linear-color-transfer, and it's also used by the...

Using these histogram parameters: ``` -hist_mode chol -hist_weight 4000 -hist_layers relu2_1,relu3_1,relu4_1,relu4_2,relu5_1 -hist_image examples/inputs/seated-nude.jpg -hist_target content ``` Histogram loss & histogram matching preprocessing example output on the left, control test (no...

So, oddly enough this code replicates the results from using the CUDA histogram matching code extremely well: ``` def double_mean(self, tensor): tensor = tensor.squeeze(0).permute(2, 1, 0) return tensor.mean(0).mean(0) def forward(self,...