Did I find the right examples for you? yes no      Crawl my project      Python Jobs

All Samples(23)  |  Call(16)  |  Derive(0)  |  Import(7)

src/p/a/paddle-1.0.2/paddle/unstable/sgp_realDU.py   paddle(Download)
import scipy as sp
import pylab
from common import _cost_rec, _cost_cod, _st, _replaceAtoms, _saveDict, sparsity
ra = sp.random
 
            rows, cols = pars['save_shape']
            # save the dictionary
            _saveDict(D, U, rows, cols, path = pars['save_path']+'dictD_'+str(i), sorted = pars['save_sorted'])
            # save the dual
            _saveDict(C.T, U, rows, cols, path = pars['save_path']+'dictC_'+str(i), sorted = pars['save_sorted'])
    print 'X.max() = %f, X.min() = %f' % (X.max(), X.min())
    D0, C0, U0 = init(X, K, rnd=False)
    _saveDict(D0, U0, Nrows = nrows, Ncols = 25, path = './savedRDict_init.png', sorted = sorted)
    U0 = sp.clip(U0, 0, sp.inf)
    D, C, U, full_out = learn(X, D0, C0, U0, tau_U=tau_U, tau_D=tau_D, mu=1.e-8, eta=0., maxiter=200, minused=1, verbose=False, rtol_sgp=rtol_sgp)
 
    print 'Nof negative D elements = %d / %d' % (sp.where(D < 0, 1, 0).sum(), K*d)
    print 'Nof negative U elements = %d / %d' % (sp.where(U < 0, 1, 0).sum(), K*N)
 
    _saveDict(D, U, Nrows = nrows, Ncols = 25, path = './savedDict.png', sorted = sorted)

src/p/a/paddle-1.0.2/paddle/unstable/sgp_real.py   paddle(Download)
import scipy as sp
import pylab
from common import _cost_rec, _cost_cod, _st, _replaceAtoms, _saveDict, sparsity
ra = sp.random
 
            rows, cols = pars['save_shape']
            # save the dictionary
            _saveDict(D, U, rows, cols, path = pars['save_path']+'dictD_'+str(i), sorted = pars['save_sorted'])
            # save the dual
            _saveDict(C.T, U, rows, cols, path = pars['save_path']+'dictC_'+str(i), sorted = pars['save_sorted'])
 
    print 'Nof negative D elements = %d / %d' % (sp.where(D < 0, 1, 0).sum(), K*d)
    _saveDict(D, U, Nrows = 8, Ncols = 25, path = './savedDict.png', sorted = True)
    _saveRep(sp.dot(D, U), X, Nrows = 8, Ncols = 25, path = './savedRep.png')
 
    U0 = U
    D, C, U, full_out = learn(X, D0, C0, U0, tau=0.1, mu=1.e-8, eta=0., maxiter=8, minused=1)
    _saveDict(D, U, Nrows = 8, Ncols = 25, path = './savedDict_test.png', sorted = True)
    _saveRep(sp.dot(D, U), X, Nrows = 8, Ncols = 25, path = './savedRep_test.png')
    sys.exit(0)

src/p/a/paddle-1.0.2/paddle/unstable/dual_l1.py   paddle(Download)
import scipy as sp
import pylab
from common import _cost_rec, _cost_cod, _replaceAtoms, _saveDict, sparsity
import prox
ra = sp.random
            U = sp.dot(C, X)
            # save the dictionary
            _saveDict(D, U, rows, cols, path = pars['save_path']+'dictD_'+str(i), sorted = pars['save_sorted'])
            # save the dual
            _saveDict(C.T, U, rows, cols, path = pars['save_path']+'dictC_'+str(i), sorted = pars['save_sorted'])

src/p/a/paddle-1.0.2/paddle/unstable/sgp.py   paddle(Download)
import scipy as sp
import pylab
from common import _cost_rec, _cost_cod, _st, _replaceAtoms, _saveDict
ra = sp.random
 
            rows, cols = pars['save_shape']
            # save the dictionary
            _saveDict(D, U, rows, cols, path = pars['save_path']+'dictD_'+str(i), sorted = pars['save_sorted'])
            # save the dual
            _saveDict(C.T, U, rows, cols, path = pars['save_path']+'dictC_'+str(i), sorted = pars['save_sorted'])

src/p/a/paddle-1.0.2/paddle/dual.py   paddle(Download)
import scipy as sp
import pylab
from common import _cost_rec, _cost_cod, _replaceAtoms, _saveDict
from prox import _st
ra = sp.random
            rows, cols = pars['save_shape']
            # save the dictionary
            _saveDict(D, U, rows, cols, path = pars['save_path']+'dictD_'+str(i), sorted = pars['save_sorted'])
            # save the dual
            _saveDict(C.T, U, rows, cols, path = pars['save_path']+'dictC_'+str(i), sorted = pars['save_sorted'])

src/p/a/paddle-1.0.2/paddle/unstable/tight2.py   paddle(Download)
import scipy as sp
import pylab
from common import _cost_rec, _replaceAtoms, _saveDict, print_frame_assessment, sparsity
import ntframes, prox
 
            rows, cols = pars['save_shape']
            # save the dictionary
            _saveDict(D, U, rows, cols, path = pars['save_path']+'dictD_'+str(i), sorted = pars['save_sorted'])
 
        # 1 ------- sparse coding step

src/p/a/paddle-1.0.2/paddle/tight.py   paddle(Download)
import scipy
import pylab
from common import _cost_rec, _replaceAtoms, _saveDict, print_frame_assessment
from prox import _st
 
            rows, cols = pars['save_shape']
            # save the dictionary
            _saveDict(D, U, rows, cols, path = pars['save_path']+'dictD_'+str(i), sorted = pars['save_sorted'])
 
        # 1 ------- sparse coding step