Comments (4)
I also have this doubt. I cannot find the expression of the relevant formula in the code, only unshared individually connection layer.If you understand this problem, can you discuss it with me?
from gla-gcn.
https://github.com/bruceyo/GLA-GCN/blob/master/common/s_agcn.py
I mischaracterized the problem earlier, I only found the shared individually layer, in s_agcn.py.
I consider self.fc in this module to be the shared individually layer.
class S_AGCN(TemporalModelBase):
def __init__(self, num_joints_in, in_features, num_joints_out,
filter_widths, causal=False, dropout=0.25, channels=96, dataset='h36m'):
super().__init__(num_joints_in, in_features, num_joints_out, filter_widths, causal, dropout, channels, dataset)
layers_tcngcn = []
num_person = 1
in_channels = 2
num_point = num_joints_in
self.graph = Graph(dataset)
self.data_bn = nn.BatchNorm1d(num_person * in_channels * num_point)
A = self.graph.A
self.expand_gcn = TCN_GCN_unit(2, channels, A)
self.causal_shift = []
next_dilation = filter_widths[0]
for i in range(0, len(filter_widths)):
self.pad.append((filter_widths[i] - 1)*next_dilation // 2)
self.causal_shift.append((filter_widths[i]//2 * next_dilation) if causal else 0)
layers_tcngcn.append(TCN_GCN_unit(channels, channels, A))
layers_tcngcn.append(TCN_GCN_unit(channels, channels, A, stride=filter_widths[i], residual=False))
next_dilation = next_dilation * filter_widths[i]
self.layers_tcngcn = nn.ModuleList(layers_tcngcn)
self.fc = nn.Conv1d(channels, 3, 1)
def set_bn_momentum(self, momentum):
self.data_bn.momentum = momentum
self.expand_gcn.gcn1.bn.momentum = momentum
self.expand_gcn.tcn1.bn.momentum = momentum
for layer in self.layers_tcngcn:
layer.gcn1.bn.momentum = momentum
layer.tcn1.bn.momentum = momentum
def _forward_blocks(self, x):
N, V, T = x.size()
v = torch.div(V, 2, rounding_mode='floor') # number of 2D pose joints
x = self.data_bn(x)
x = x.view(N, 1, v, 2, T)
x = x.permute(0, 1, 3, 4, 2).contiguous()
x = x.view(N, 2, T, v)
x = self.expand_gcn(x)
for i in range( len(self.pad) -1):
res = x[:, :, self.causal_shift[i] + self.filter_widths[i]//2 :: self.filter_widths[i], :]
x = self.drop(self.layers_tcngcn[2*i](x))
x = self.drop(self.layers_tcngcn[2*i+1](x))
x = res + x
pose_3d_ = x
pose_3d = torch.zeros(N, 3, v).cuda(0)
for i in range(0,v):
pose_joint_3d = pose_3d_[:,:,:,i].mean(2)
pose_joint_3d = pose_joint_3d.view(N, -1, 1)
pose_joint_3d = self.fc(pose_joint_3d)
pose_3d[:,:,i] = pose_joint_3d.view(N,-1)
return pose_3d
I also have this doubt. I cannot find the expression of the relevant formula in the code, only unshared individually connection layer.If you understand this problem, can you discuss it with me?
from gla-gcn.
Thank you for your reply. Perhaps you are right. That self.fc is a shared connection layer, because I have only looked at this code and haven't run it yet. and study it carefully. My question is that the description and code implementation of the individual connection layers in the paper do not seem to correspond. I am troubled by this issue.Do you have this question?
from gla-gcn.
Thank you for your reply. Perhaps you are right. That self.fc is a shared connection layer, because I have only looked at this code and haven't run it yet. and study it carefully. My question is that the description and code implementation of the individual connection layers in the paper do not seem to correspond. I am troubled by this issue.Do you have this question?
Yes๏ผI also have this issue.
from gla-gcn.
Related Issues (11)
- I try to reproduce your code,but it seems that your file named utils.py lacks a function called "wrap" HOT 6
- ABOUT 3DHP HOT 4
- Can I know to change T value to 81? HOT 2
- Testing MPI_INF_3DHP dataset with refined model. HOT 1
- gradient computation HOT 2
- great at gt but worse at cpn HOT 1
- There is no causal_model in the common folder
- What joints did you use for training and testing on humaneva dataset (T=27, MRCNN) ?
- Subtract min Z-value?
- About the results of gt 21.0
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. ๐๐๐
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google โค๏ธ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from gla-gcn.