zhenxingjian / dcnn Goto Github PK
View Code? Open in Web Editor NEWThis is the published codes for Dilated Convolutional Neural Networks for Sequential Manifold-valued Data ICCV 2019
This is the published codes for Dilated Convolutional Neural Networks for Sequential Manifold-valued Data ICCV 2019
Hi, thanks for sharing the code.
I have a question about the computation of wFM, which is stated to use the recursive estimator in the original paper, but it seems to become a direct weighted average of points (on the manifold) in the following code, is there anything I miss here or is this some kind of simplified way to compute the wFM?
def DCNN(x,d,W_root,mode):
'''
x is input, with shape batch * sequence_length * n_para * in_channel
d is the number of skipped, a number
w is the weights, with shape k * in_channel * out_channel
mode is "SPD" or "ODF"
'''
W = tf.pow(W_root,2)
batch_size = tf.shape(x)[0]#x.shape[0]
sequence_length = x.shape[1]
n_para = x.shape[2]
k = W.shape[0]
in_channel = W.shape[1]
out_channel = W.shape[2]
padding = (k - 1) * d
x_pad = tf.pad(x,tf.constant([(0,0),(1,0),(0,0),(0,0)]) * padding , "REFLECT") # for the first element, we need padding
W = tf.reshape(W,[k*in_channel,out_channel])
W_sum = tf.reduce_sum(W,0)
W = tf.div(W,W_sum) # constrain sum(w_k_inchannel) = 1
if mode =="SPD":
x_reorder = tf.transpose(x_pad,[0,2,1,3])
x_reshape = tf.reshape(x_reorder,[batch_size*n_para,1,sequence_length+padding,in_channel])
W = tf.reshape(W,[1,k,in_channel,out_channel])
conv1 = tf.nn.atrous_conv2d(x_reshape,W,d,"VALID",name=None)
conv1 = tf.reshape(conv1,[batch_size,n_para,sequence_length,out_channel])
conv1 = tf.transpose(conv1,[0,2,1,3])
return conv1
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.