Skip to content

Instantly share code, notes, and snippets.

@botev
botev / double_lop.py
Last active July 19, 2017 20:31
Double Lop
import time
import os
import numpy as np
import theano
import theano.tensor as T
from IPython.display import Image
def Rop(f, x, v):
if isinstance(f, (list, tuple)):
u = [T.zeros_like(fi) for fi in f]
@botev
botev / test_lbfgs.py
Created September 21, 2017 02:42
Scipy LBFGS
import os
import time
import numpy as np
import theano
import theano.tensor as T
from scipy.optimize import fmin_l_bfgs_b
def scipy():
path = "."