Skip to content
Snippets Groups Projects
Commit 924e5eaa authored by BRIGGAN2's avatar BRIGGAN2
Browse files

Update README.md

parent b3e0fbae
No related branches found
No related tags found
No related merge requests found
......@@ -43,8 +43,8 @@ def ica(x, **args):
x: numpy array of images
args:
lr: learning rate (default 1e-3)
nsteps: maximum iterations (default 100)
k: number of latent variables
nsteps: maximum iterations (default 1000)
k: number of latent variables (defualt 20)
returns:
L: numpy array of loss function value for all iterations
......@@ -53,9 +53,9 @@ def ica(x, **args):
# default parameters
if not len(args):
args['lr'] = 1e-4
args['nsteps'] = 1000
args['k'] = 20
args['lr'] = 1
args['nsteps'] = 200
args['k'] = 64
lr=args['lr']
nsteps = args['nsteps']
......@@ -66,6 +66,7 @@ def ica(x, **args):
'''training loop using graident descent'''
for step in range(nsteps):
# ***insert gradient descent code here***
''' use backtracking line search '''
# print loss
print('step: {} / {}, L: {}'.format(step, nsteps, L[step]))
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment