Skip to content

Instantly share code, notes, and snippets.

View 99991's full-sized avatar

Thomas Germer 99991

  • HHU Düsseldorf
  • Düsseldorf
View GitHub Profile
@tuelwer
tuelwer / pytorch-lbfgs-example.py
Last active June 5, 2025 12:03
pytorch-L-BFGS-example
import torch
import torch.optim as optim
import matplotlib.pyplot as plt
# 2d Rosenbrock function
def f(x):
return (1 - x[0])**2 + 100 * (x[1] - x[0]**2)**2