Skip to content

Instantly share code, notes, and snippets.

View Mieluoxxx's full-sized avatar
🌍
I may be slow to respond.

真真夜夜 Mieluoxxx

🌍
I may be slow to respond.
  • 03:15 (UTC +08:00)
View GitHub Profile
@Mieluoxxx
Mieluoxxx / CMakePresets.json
Last active January 12, 2025 10:09
实用脚本
{
"version": 2,
"configurePresets": [
{
"name": "vcpkg",
"generator": "Ninja",
"binaryDir": "${sourceDir}/build",
"cacheVariables": {
"CMAKE_TOOLCHAIN_FILE": "$env{VCPKG_ROOT}/scripts/buildsystems/vcpkg.cmake"
}
@Mieluoxxx
Mieluoxxx / seed_everything.md
Last active May 18, 2025 15:03
深度学习
# 固定随机种子函数
def seed_everything(seed):
    torch.manual_seed(seed)
    torch.cuda.manual_seed(seed)
    np.random.seed(seed)
    random.seed(seed)
    torch.backends.cudnn.deterministic = True
    torch.backends.cudnn.benchmark = False