One Paragraph of project description goes here
These instructions will get you a copy of the project up and running on your local machine for development and testing purposes. See deployment for notes on how to deploy the project on a live system.
import faiss | |
# example data | |
xb = np.random.rand(200000, 32).astype('float32') | |
xq = np.random.rand(500, 32).astype('float32') | |
# get reference result with index | |
index = faiss.IndexFlatL2(xb.shape[1]) | |
index.add(xb) | |
lims, D, I = index.range_search(xq, 1.5) |
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 |
How do we solve for the policy optimization problem which is to maximize the total reward given some parametrized policy?
To begin with, for an episode the total reward is the sum of all the rewards. If our environment is stochastic, we can never be sure if we will get the same rewards the next time we perform the same actions. Thus the more we go into the future the more the total future reward may diverge. So for that reason it is common to use the discounted future reward where the parameter discount
is called the discount factor and is between 0 and 1.
A good strategy for an agent would be to always choose an action that maximizes the (discounted) future reward. In other words we want to maximize the expected reward per episode.
##Google Interview Questions: Product Marketing Manager
if ! [[ $# -eq 1 || $# -eq 2 || $# -eq 4 ]]; then | |
echo "Usage: $0 <author> [<start_date> <end_date>] [output_dir]" | |
echo "Example: $0 xinan@me.com 2015-05-25 2015-08-21 ./patches" | |
exit | |
fi | |
author=$1 | |
if [ $# -gt 3 ]; then | |
output_dir=$4 |