文件名称:matlab代码梯度下降法-tf-decompose:在TensorFlow中实现的Tensor分解
文件大小:9KB
文件格式:ZIP
更新时间:2024-06-12 23:58:50
系统开源
matlab代码梯度下降法tf分解 在TensorFlow中实现的CP和Tucker张量分解。 用法 import numpy as np import tensorflow as tf from scipy . io . matlab import loadmat from ktensor import KruskalTensor # Load sensory bread data (http://www.models.life.ku.dk/datasets) mat = loadmat ( 'data/bread/brod.mat' ) X = mat [ 'X' ]. reshape ([ 10 , 11 , 8 ]) # Build ktensor and learn CP decomposition using ALS with specified optimizer T = KruskalTensor ( X . shape , rank = 3 , regularize = 1e-6 , init = 'nvecs' , X_data = X ) X_predict =
【文件预览】:
tf-decompose-master
----ktensor.py(3KB)
----scripts()
--------ktest.py(580B)
--------ttest.py(478B)
----utils.py(3KB)
----dtensor.py(2KB)
----README.md(3KB)
----ttensor.py(6KB)
----.gitignore(44B)