diff options
author | Determinant <[email protected]> | 2015-08-14 15:02:34 +0800 |
---|---|---|
committer | Determinant <[email protected]> | 2015-08-14 15:02:34 +0800 |
commit | 4b3e8591816e553a4409f5fa95f5983e59ff711f (patch) | |
tree | 8b757fb63767bc1463b8df23dd1cf24949608cf8 /nerv/io/sgd_buffer.lua | |
parent | 7082ba094be6ccbf97cfaf893ea437f31ced197b (diff) |
add profiling for copy_rows_fromh_by_idx
Diffstat (limited to 'nerv/io/sgd_buffer.lua')
-rw-r--r-- | nerv/io/sgd_buffer.lua | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/nerv/io/sgd_buffer.lua b/nerv/io/sgd_buffer.lua index f4f7dfe..604fa07 100644 --- a/nerv/io/sgd_buffer.lua +++ b/nerv/io/sgd_buffer.lua @@ -41,7 +41,7 @@ function SGDBuffer:saturate() buff.data:copy_from(buff.leftover, 0, lrow) buff.leftover = nil end - nerv.printf("leftover: %d\n", lrow) + nerv.printf("buffer leftover: %d\n", lrow) reader.tail = lrow reader.has_leftover = false end @@ -87,9 +87,11 @@ end function SGDBuffer:get_data() local batch_size = self.gconf.batch_size if self.head >= self.tail then -- buffer is empty + local t = os.clock() if not self:saturate() then return nil -- the remaining data cannot build a batch end + nerv.info("%.3fs to fill the buffer\n", os.clock() - t) end if self.head + batch_size > self.tail then return nil -- the remaining data cannot build a batch |