Commit 332d1416 authored by alexander.dornheim's avatar alexander.dornheim
Browse files

Added more imports. Fixed to bugs in CDP_processor

parent ae0f1ec6
from numpy.random import randn, random_sample
from numpy.linalg import norm
from numpy import sqrt, conj, fft, tile
from numpy import sqrt, conj, tile, mean
from numpy.fft import fft, ifft
import numpy as np
import time
def CDP_processor(config):
# Implementation of the Wirtinger Flow (WF) algorithm presented in the paper
......@@ -67,10 +69,11 @@ def CDP_processor(config):
## Initialization
npower_iter = config['warmup_iter']; # Number of power iterations
z0 = randn((n1,n2)); z0 = z0/norm(z0,'fro') # Initial guess
z0 = randn(n1,n2); z0 = z0/norm(z0,'fro') # Initial guess
tic = time.time() # Power iterations
for tt in range(npower_iter):
z0 = At(Y*A(z0)); z0 = z0/norm(z0,'fro')
z0 = At(Y*A(z0))
z0 = z0/norm(z0)
toc = time.time()
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment