Skip to content

Instantly share code, notes, and snippets.

View tljstewart's full-sized avatar
🟢
Human

Timothy Stewart tljstewart

🟢
Human
View GitHub Profile
@tljstewart
tljstewart / controlnet-zero-init-cnn-test.py
Last active September 16, 2023 02:15
Testing the concept of zero init cnn layers from control net paper
import torch
import torch.nn as nn
import torch.optim as optim
# Generate some random data
batch_size = 32
channels = 3
height = 32
width = 32
x_train = torch.randn(batch_size, channels, height, width)
@tljstewart
tljstewart / effective_modern_cmake.md
Created November 27, 2021 18:21 — forked from mbinna/effective_modern_cmake.md
Effective Modern CMake

Effective Modern CMake

Getting Started

For a brief user-level introduction to CMake, watch C++ Weekly, Episode 78, Intro to CMake by Jason Turner. LLVM’s CMake Primer provides a good high-level introduction to the CMake syntax. Go read it now.

After that, watch Mathieu Ropert’s CppCon 2017 talk Using Modern CMake Patterns to Enforce a Good Modular Design (slides). It provides a thorough explanation of what modern CMake is and why it is so much better than “old school” CMake. The modular design ideas in this talk are based on the book [Large-Scale C++ Software Design](https://www.amazon.de/Large-Scale-Soft