Skip to content

Commit

Permalink
debug
Browse files Browse the repository at this point in the history
2 bugs are fixed.
  • Loading branch information
EasonOnFire committed Nov 14, 2017
1 parent 9e36432 commit 8639692
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
4 changes: 2 additions & 2 deletions model/hashTable.py
Expand Up @@ -23,7 +23,7 @@ def hashTable(patch,Qangle,Qstrenth,Qcoherence):

#Quantization
angle = np.floor(angle/(np.pi/Qangle)-1)
strength = np.floor(strength/(1/Qstrenth)-1)
coherence = np.floor(coherence/(1/Qcoherence)-1)
strength = np.floor(strength/(1.0/Qstrenth)-1)
coherence = np.floor(coherence/(1.0/Qcoherence)-1)

return int(angle),int(strength),int(coherence)
6 changes: 3 additions & 3 deletions train.py
Expand Up @@ -44,7 +44,7 @@ def main():

Q = np.zeros((Qangle * Qstrenth * Qcoherence, 4, patch * patch, patch * patch))
V = np.zeros((Qangle * Qstrenth * Qcoherence, 4, patch * patch, 1))
h = np.zeros((Qangle * Qstrenth * Qcoherence, 4, patch * patch))
res_h = np.zeros((Qangle * Qstrenth * Qcoherence, 4, patch * patch))

for image_path in tqdm(images_path):
print("HashMap of %s" % image_path)
Expand All @@ -71,9 +71,9 @@ def main():
# Todo: Change to more quick learning style
for t in range(4):
for j in range(Qangle * Qstrenth * Qcoherence):
h[j, t] = sparse.linalg.cg(Q[j, t], V[j, t])[0]
res_h[j, t] = sparse.linalg.cg(Q[j, t], V[j, t])[0]

np.save("./Filters", h)
np.save("./Filters", res_h)


if __name__ == '__main__':
Expand Down

0 comments on commit 8639692

Please sign in to comment.