Skip to content

Commit

Permalink
remove dropout
Browse files Browse the repository at this point in the history
+ fix cmake configuration
  • Loading branch information
connormcmonigle committed Oct 25, 2021
1 parent d97c1ba commit da3e3f2
Show file tree
Hide file tree
Showing 4 changed files with 21 additions and 21 deletions.
11 changes: 7 additions & 4 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ find_package (Threads REQUIRED)
set (CMAKE_CXX_STANDARD 17)

set (OPS_LIMIT 1000000000)
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Ofast -g -DNDEBUG -march=native -mtune=native -fopenmp -Wall -Wextra")
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Ofast -flto -g -DNDEBUG -march=native -mtune=native -fopenmp -Wall -Wextra")

if (CMAKE_CXX_COMPILER_ID STREQUAL "GNU")
set (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fconstexpr-ops-limit=${OPS_LIMIT}")
Expand All @@ -17,13 +17,16 @@ endif()
add_compile_definitions(EVALFILE="eval.bin")

include_directories (include ../seer-nnue/include/)
include_directories (include ../seer-nnue/incbin/)
include_directories (include ../seer-nnue/syzygy/)

add_executable(test_sample_reader test/test_sample_reader.cc)

add_executable(test_sample_reader test/test_sample_reader.cc ../seer-nnue/syzygy/tbchess.c ../seer-nnue/syzygy/tbprobe.c)
target_link_libraries (test_sample_reader Threads::Threads)

add_executable(test_data_gen test/test_data_gen.cc)
add_executable(test_data_gen test/test_data_gen.cc ../seer-nnue/syzygy/tbchess.c ../seer-nnue/syzygy/tbprobe.c)
target_link_libraries (test_data_gen Threads::Threads)

add_subdirectory(pybind11)
pybind11_add_module(seer_train src/seer_train.cc)
pybind11_add_module(seer_train src/seer_train.cc ../seer-nnue/syzygy/tbchess.c ../seer-nnue/syzygy/tbprobe.c)

23 changes: 14 additions & 9 deletions scripts/config.yaml
Original file line number Diff line number Diff line change
@@ -1,23 +1,28 @@
device: 'cuda'
model_save_path: 'model/save.pt'
bin_model_save_path: 'model/save.bin'
device: "cuda"
model_save_path: "model/save.pt"
bin_model_save_path: "model/save.bin"

concurrency: 12
fixed_depth: 8
data_write_path: '/media/connor/7F35A067038168A9/seer_train3/data.txt'
data_write_path: "/media/connor/7F35A067038168A9/seer_train3/data.txt"
tt_mb_size: 8192
target_sample_count: 300000000

data_read_paths: ['/media/connor/7F35A067038168A9/seer_train3/data.txt', '/media/connor/7F35A067038168A9/seer_train3/terashuf/data_shuf.txt']

data_read_paths:
[
/media/connor/7F35A067038168A9/seer_train3/data_old_d8_wdl2.txt,
/media/connor/7F35A067038168A9/seer_train3/data_old_d8_wdl.txt,
/media/connor/7F35A067038168A9/seer_train3/terashuf/data_shuf_old_d6_wdl2.txt,
/media/connor/7F35A067038168A9/seer_train3/terashuf/data_shuf_old_d6_wdl3.txt
]

epochs: 100000
shuffle_buffer_size: 200000

mirror_probability: 0.48
batch_size: 2048
mirror_probability: 0.49
batch_size: 1024

visual_directory: 'visual'
visual_directory: "visual"

save_rate: 1024
report_rate: 50
Expand Down
8 changes: 0 additions & 8 deletions scripts/model.py
Original file line number Diff line number Diff line change
Expand Up @@ -64,27 +64,19 @@ def __init__(self):

self.white_affine = FeatureTransformer(funcs, BASE)
self.black_affine = FeatureTransformer(funcs, BASE)
self.d0 = nn.Dropout(p=0.05)
self.fc0 = nn.Linear(2*BASE, 16)
self.d1 = nn.Dropout(p=0.05)
self.fc1 = nn.Linear(16, 16)
self.d2 = nn.Dropout(p=0.05)
self.fc2 = nn.Linear(32, 16)
self.d3 = nn.Dropout(p=0.05)
self.fc3 = nn.Linear(48, 1)


def forward(self, pov, white, black):
w_ = self.white_affine(white)
b_ = self.black_affine(black)
base = F.relu(pov * torch.cat([w_, b_], dim=1) + (1.0 - pov) * torch.cat([b_, w_], dim=1))
base = self.d0(base)
x = F.relu(self.fc0(base))
x = self.d1(x)
x = torch.cat([x, F.relu(self.fc1(x))], dim=1)
x = self.d2(x)
x = torch.cat([x, F.relu(self.fc2(x))], dim=1)
x = self.d3(x)
x = self.fc3(x)
return x

Expand Down
Binary file modified scripts/seer_train.cpython-38-x86_64-linux-gnu.so
Binary file not shown.

0 comments on commit da3e3f2

Please sign in to comment.