img-prcsng / subpixel Goto Github PK
View Code? Open in Web Editor NEWThis is an attempt to port the SubPixel layer from Tensorflow as a Caffe Layer
This is an attempt to port the SubPixel layer from Tensorflow as a Caffe Layer
I try to use the subpixel layer as an efficient way to replace deconvolution layer.
However, the forward speed of subpixel layer (18ms) is way slower than the deconvolution layer(2 ms).
Any idea why this happened?
details:
input blobs: 1x4x540x960
deconvolution: num_output: 1; kernel_size: 2; stride: 2; pad: 0
thank you for your contribution. I test the caffemodel of which the weights and bias were converted from tensorflow model. result from each layer was verified as below
caffe(fp32) : h0 h1 h2 ps caffe_output_tanh
Tensorflow(fp32): tf_h0 tf_h1 tf_h2 tf_output_tanh
indeed, there are still some different between caffe and TF, but i think it may not cause by python layer. I think the designed ps layer is right!
e:\python22\envs\dream\lib\site-packages\caffe\classifier.py in __init__(self, model_file, pretrained_file, image_dims, mean, input_scale, raw_scale, channel_swap)
24 mean=None, input_scale=None, raw_scale=None,
25 channel_swap=None):
---> 26 caffe.Net.__init__(self, model_file, pretrained_file, caffe.TEST)
27
28 # configure pre-processing
E:\w\PyPixelShuffleLayer.py in reshape(self, bottom, top)
67
68 def reshape(self, bottom, top):
---> 69 top[0].reshape(self.n, self.out_channels, self.out_h, self.out_w)
70
71
TypeError: No registered converter was able to produce a C++ rvalue of type int from this Python object of type float
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.