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
diff --git a/tensor2tensor/utils/trainer_lib.py b/tensor2tensor/utils/trainer_lib.py | |
index 30b00df..8d98c45 100644 | |
--- a/tensor2tensor/utils/trainer_lib.py |
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
const K = 100 | |
const num_iterations = 1 | |
const step_size = 0.01 | |
const dim_x = 5000 | |
const dim_y = 5000 | |
const num_elements = 100 | |
struct DenseArrayAccessor{T, N} <: AbstractArray{T, N} | |
key_begin::Int64 | |
values::Vector{T} |
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
const data_path = "ratings.csv" | |
const K = 100 | |
const num_iterations = 2 | |
const alpha = 0.1 | |
function parse_line(line::AbstractString) | |
tokens = split(line, ',') | |
@assert length(tokens) == 3 | |
token_tuple = (parse(Int64, String(tokens[1])), | |
parse(Int64, String(tokens[2])), |
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
all: libtest.so test_main | |
CXX = g++ -std=c++14 | |
test.pb: test.proto | |
protoc --cpp_out=. test.proto | |
test.pb.h: test.pb | |
test.pb.cc : test.pb |