Comments (5)
It is trying to add two more dimensions for elementwise multiplication. I think there is no bug.
from mvsnet_pytorch.
It is trying to add two more dimensions for elementwise multiplication. I think there is no bug.
Thank you for you reply, However, the
depth_values = depth_values.view(*depth_values.shape, 1, 1)
what is the * mean?
from mvsnet_pytorch.
It is to unpack depth_values.shape
as function arguments (you can refer to python tutorials for more information). It is the same as
depth_values = depth_values.view(depth_values.shape[0], depth_values.shape[1], 1, 1) # only when len(depth_values.shape) == 2
from mvsnet_pytorch.
It is to unpack
depth_values.shape
as function arguments (you can refer to python tutorials for more information). It is the same asdepth_values = depth_values.view(depth_values.shape[0], depth_values.shape[1], 1, 1) # only when len(depth_values.shape) == 2
Thank you ~ It works! And I want to konw whether the following code can replace this line?
p: probability volume [B, D, H, W]
depth_values: discrete depth values [B, D]
def depth_regression(p, depth_values):
#depth_values = torch.reshape(depth_values,(256))
depth_values = depth_values.cpu().numpy()
start = depth_values[0][0]
end = depth_values[0][-1]
interval = (end - start) / 256
disp = Variable(torch.Tensor(np.reshape(np.array(np.arange(start,end,interval)),[1,256,1,1])).cuda(), requires_grad=False)
disp = disp.repeat(p.size()[0],1,p.size()[2],p.size()[3])
#print('depth_value ', depth_values.shape)
depth = torch.sum(p * disp, 1)
return depth
from mvsnet_pytorch.
I'm not sure. You can check by yourself.
from mvsnet_pytorch.
Related Issues (20)
- where is the file of test.sh? HOT 3
- CUDA error: unknown error when run train.sh
- 请问怎么训练和测试eth3d数据集呢?
- RuntimeError: Tensors must have same number of dimensions: got 4 and 3? HOT 1
- RuntimeError: Tensors must have same number of dimensions: got 4 and 3 HOT 2
- On the Problem of Calculating the Variance of cost volume HOT 1
- Have anyone checked RMVSNet-Pytorch repository?
- 1080Ti测试显存溢出 HOT 2
- how to solve the error "OSError : unrecognized data stream conntents when reading image file"? HOT 1
- About loss HOT 1
- Floating point exception(core dumped)
- 代码中的matlab问题 HOT 10
- About `Thres_metrics` HOT 4
- 训练UserWarning
- Question about loss function
- 预训练模型
- 测试结果深度图不正确
- how to create a logdir called checkpoints
- Reference image
- Questions about the meaning of grid in the F.grid_sample function.
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 mvsnet_pytorch.