Comments (2)
Hi, I probably know how to fix this.
As shown below, in the place of the cls_loss function in the original loss_utils.py file, the definitions of cls_pc_raw and cls_aug_raw are replaced by underscores. I think just change the two underscores to the above two variable names.
def cls_loss(pred, pred_aug, gold, pc_tran, aug_tran, pc_feat, aug_feat, ispn = True):
mse_fn = torch.nn.MSELoss(reduce=True, size_average=True)
cls_pc, _ = cal_loss_raw(pred, gold)
cls_aug, _ = cal_loss_raw(pred_aug, gold)
if ispn:
cls_pc = cls_pc + 0.001*mat_loss(pc_tran)
cls_aug = cls_aug + 0.001*mat_loss(aug_tran)
feat_diff = 10.0*mse_fn(pc_feat,aug_feat)
parameters = torch.max(torch.tensor(NUM).cuda(), torch.exp(1.0-cls_pc_raw)**2).cuda()
cls_diff = (torch.abs(cls_pc_raw - cls_aug_raw) * (parameters*2)).mean()
cls_loss = cls_pc + cls_aug + feat_diff# + cls_diff
return cls_loss
from pointaugment.
`def cls_loss(pred, pred_aug, gold, pc_tran, aug_tran, pc_feat, aug_feat, ispn = True):
mse_fn = torch.nn.MSELoss(reduce=True, size_average=True)
cls_pc, cls_pc_raw= cal_loss_raw(pred, gold)
cls_aug, cls_aug_raw= cal_loss_raw(pred_aug, gold)
if ispn:
cls_pc = cls_pc + 0.001*mat_loss(pc_tran)
cls_aug = cls_aug + 0.001*mat_loss(aug_tran)
feat_diff = 10.0*mse_fn(pc_feat,aug_feat)
parameters = torch.max(torch.tensor(NUM).cuda(), torch.exp(1.0-cls_pc_raw)**2).cuda()
cls_diff = (torch.abs(cls_pc_raw - cls_aug_raw) * (parameters*2)).mean()
cls_loss = cls_pc + cls_aug + feat_diff# + cls_diff
return cls_loss`
from pointaugment.
Related Issues (20)
- The code for shape retrieval HOT 1
- Where is the code to reduce model oscillation ? HOT 1
- How to get SHREC16 dataset ? HOT 2
- Question about the SR16 dataset. HOT 1
- ValueError: need at least one array to concatenate HOT 3
- A RuntimeError HOT 4
- Question about the normal feature
- How do you achieve end-to-end? HOT 1
- Could you please share the code for shape retrieval? I will cite your work and compare with your results. Thank you!
- How to augment custom data?
- Generated samples
- Runtime Error
- Question about Augmentor
- modelnet10_ply_hdf5_2048 HOT 2
- looking forward to the code
- NameError: name 'cls_pc_raw' is not defined
- code for pointnet++, RS-CNN, and DGCNN HOT 2
- Classification Results HOT 11
- Bugs
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 pointaugment.