Skip to content

Commit

Permalink
Reduce precision in test.lua
Browse files Browse the repository at this point in the history
  • Loading branch information
amartya18x authored Jul 20, 2017
1 parent fa05b1f commit 3abacbc
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions test/test.lua
Original file line number Diff line number Diff line change
Expand Up @@ -6490,11 +6490,11 @@ function rnntest.get_rougeS()
local ref_str = "police killed the gunman"
local ref = ref_str:split(" ")
local rouge = nn.get_rougeS(cand_tbl[1]:split(" "), ref, 1, 4)
mytester:assert(math.abs(rouge - 1/2)< 0.000000000001)
mytester:assert(math.abs(rouge - 1/2)< 0.001)
local rouge = nn.get_rougeS(cand_tbl[2]:split(" "), ref, 1, 4)
mytester:assert(math.abs(rouge - 1/6)< 0.000000000001)
mytester:assert(math.abs(rouge - 1/6)< 0.001)
local rouge = nn.get_rougeS(cand_tbl[3]:split(" "), ref, 1, 4)
mytester:assert(math.abs(rouge - 1/3)< 0.000000000001)
mytester:assert(math.abs(rouge - 1/3)< 0.001)
end

function rnn.test(tests, exclude, benchmark_)
Expand Down

0 comments on commit 3abacbc

Please sign in to comment.