Skip to content

Instantly share code, notes, and snippets.

View jinliangwei's full-sized avatar

Jinliang Wei jinliangwei

  • Google / Brain / TensorFlow
  • United States
View GitHub Profile
diff --git a/tensor2tensor/utils/trainer_lib.py b/tensor2tensor/utils/trainer_lib.py
index 30b00df..8d98c45 100644
--- a/tensor2tensor/utils/trainer_lib.py
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}
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])),
@jinliangwei
jinliangwei / Makefile
Created March 25, 2017 01:08
After "make all", running "julia helloworld.jl" causes abort due to "attempt to free invalid pointer". However, running "./test_main" works.
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