Comments (8)
Thanks for your interest.
Firstly, the computation cost of temporal convolution is [(9 × T C1 C1) × N] instead of [(9 × T C C1) × N], which is 6.08G. My apologies for the typo in supplement. Our result is calculated by [(9 × T C1 C1) × N], which is consistent with the ST-GCN model structure.
Secondly, in the NTU RGB+D dataset, there are one or two people in each sample. For samples with only one person, the second person is padded with zeros. The skeleton graphs of these two people are computed respectively. So we need to multiply the computation cost by 2.
Thus the result is (2.0232G + 6.08G) * 2 = 16.2G.
from shift-gcn.
For ST-GCN, the number of parameters in a spatial convolution layer is [ C×C1 + C ], the number of parameters in a temporal convolution layer is [9×C1×C1 + C1], the number of parameters in FC layer is 256×60. The total parameter cost is 3.0M.
For Shift-GCN, the number of parameters in a spatial convolution layer is [C×C1 + C1 + N×C1], the number of parameters in a temporal convolution layer is [C1×C1 + C1 + 2C1], the number of parameters in FC layer is 256×60. The total parameter cost is 0.5M.
from shift-gcn.
Thank you very much for your quick response.
I have also verified for Shift-GCN.
Would also like to know if you have calculated the number of parameters for the model.
from shift-gcn.
Dear @kchengiva,
That was very helpful.
Thanks for your quick response.
from shift-gcn.
Dear @kchengiva,
In the given code I am not able to find where FLOPS are computed? Can you please help.
from shift-gcn.
Thanks for your interest. @preksha12
The code for calculating the computational cost of ST-GCN is as below:
import numpy as np
channel = [[3,64],[64,64],[64,64],[64,64],[64,128],[128,128],[128,128],[128,256],[256,256],[256,256],]
temporal = [300,300,300,300,150,150,150,75,75,75]
# ST-GCN
Sflops = 0
Tflops = 0
for layer in range(len(channel)):
Sflops += 3*(channel[layer][0]*channel[layer][1]*25 + channel[layer][1]*25*25)*temporal[layer]
Tflops += 9*(temporal[layer]*25)*(channel[layer][1]*channel[layer][1])
fc = 256*60
print('ST-GCN')
print('spatial', Sflops*2/1e9)
print('temporal', Tflops*2/1e9)
print('1 stream', (Sflops+Tflops+fc)*2/1e9)
print('2 stream', (Sflops+Tflops+fc)/1e9*2*2)
print('4 stream', (Sflops+Tflops+fc)/1e9*2*4)
from shift-gcn.
Thanks for your interest. @preksha12
The code for calculating the computational cost of ST-GCN is as below:import numpy as np channel = [[3,64],[64,64],[64,64],[64,64],[64,128],[128,128],[128,128],[128,256],[256,256],[256,256],] temporal = [300,300,300,300,150,150,150,75,75,75] # ST-GCN Sflops = 0 Tflops = 0 for layer in range(len(channel)): Sflops += 3*(channel[layer][0]*channel[layer][1]*25 + channel[layer][1]*25*25)*temporal[layer] Tflops += 9*(temporal[layer]*25)*(channel[layer][1]*channel[layer][1]) fc = 256*60 print('ST-GCN') print('spatial', Sflops*2/1e9) print('temporal', Tflops*2/1e9) print('1 stream', (Sflops+Tflops+fc)*2/1e9) print('2 stream', (Sflops+Tflops+fc)/1e9*2*2) print('4 stream', (Sflops+Tflops+fc)/1e9*2*4)
Thank you so much for your reply.
from shift-gcn.
Hello,
I also have doubt regarding how you have formulated these equations for FLOPS. How can we apply FLOPS formula for any other network?
Thanks for your interest. @preksha12
The code for calculating the computational cost of ST-GCN is as below:import numpy as np channel = [[3,64],[64,64],[64,64],[64,64],[64,128],[128,128],[128,128],[128,256],[256,256],[256,256],] temporal = [300,300,300,300,150,150,150,75,75,75] # ST-GCN Sflops = 0 Tflops = 0 for layer in range(len(channel)): Sflops += 3*(channel[layer][0]*channel[layer][1]*25 + channel[layer][1]*25*25)*temporal[layer] Tflops += 9*(temporal[layer]*25)*(channel[layer][1]*channel[layer][1]) fc = 256*60 print('ST-GCN') print('spatial', Sflops*2/1e9) print('temporal', Tflops*2/1e9) print('1 stream', (Sflops+Tflops+fc)*2/1e9) print('2 stream', (Sflops+Tflops+fc)/1e9*2*2) print('4 stream', (Sflops+Tflops+fc)/1e9*2*4)
Thank you so much for your reply.
Hello,
I also have doubt regarding how you have formulated these equations for FLOPS. How can we apply FLOPS formula for any other network?
from shift-gcn.
Related Issues (20)
- Test set accuracy
- plotting learning training and validation graphs
- Does this source supports multi GPUs?
- RuntimeError: input.is_contiguous() HOT 3
- RuntimeError: Only Tensors of floating point dtype can require gradients HOT 3
- example accuracy
- custom dataset category
- a question about shift_Gcn
- cuda device
- RuntimeError: CUDA out of memory. HOT 1
- Demo image
- Why parallel the bone (hip-spine) to Z-axis
- Can not reproduce the result of shift-gcn in joint modality HOT 1
- Training with 90-frame data instead of 300-frame data
- no module named 'shift_cuda' ??
- AttributeError: 'Model' object has no attribute 'model'
- two issue 关于code
- pickle.load报错
- Seeking advice on a coding issue
- Pytorch implementation of adaptive temporal shift operation
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 shift-gcn.