1 Star 0 Fork 0

binqiang2wang/DUAL

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
该仓库未声明开源许可证文件(LICENSE),使用请关注具体项目描述及其代码上游依赖。
克隆/下载
utils.py 301 Bytes
一键复制 编辑 原始数据 按行查看 历史
Mahd 提交于 2021-12-21 14:46 +08:00 . init
import torch
import numpy as np
def set_seed(seed):
np.random.seed(seed)
torch.manual_seed(seed)
if torch.cuda.is_available():
torch.cuda.manual_seed_all(seed)
def sparse_colmun(x):
# L2,1
x = x * x
x = torch.sum(x, 0)
x = torch.sqrt(x)
return torch.sum(x)
Loading...
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
1
https://gitee.com/bq2w/DUAL.git
[email protected]:bq2w/DUAL.git
bq2w
DUAL
DUAL
master

搜索帮助