This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import torch | |
def chamfer_distance_without_batch(p1, p2, debug=False): | |
''' | |
Calculate Chamfer Distance between two point sets | |
:param p1: size[1, N, D] | |
:param p2: size[1, M, D] | |
:param debug: whether need to output debug info |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <string> | |
#include <stack> | |
#include <iostream> | |
using namespace std; | |
bool isOperand(char x) | |
{ | |
return (x >= 'a' && x <= 'z') || | |
(x >= 'A' && x <= 'Z'); | |
} |