This website works better with JavaScript.
Home
Issues
Pull Requests
Milestones
AI流水线
Repositories
Datasets
Forum
实训
竞赛
大数据
Register
Sign In
hummingbird
/
fastNLP
Not watched
Unwatch
Watch all
Watch but not notify
2
Star
0
Fork
0
Code
Releases
13
Wiki
Activity
Issues
0
Pull Requests
0
Datasets
Model
Cloudbrain
Browse Source
add codes testing utils
tags/v0.1.0
xuyige
6 years ago
parent
246908bf45
commit
7a54a20908
1 changed files
with
18 additions
and
0 deletions
Split View
Diff Options
Show Stats
Download Patch File
Download Diff File
+18
-0
test/modules/test_utils.py
+ 18
- 0
test/modules/test_utils.py
View File
@@ -0,0 +1,18 @@
import torch
import numpy as np
import unittest
import fastNLP.modules.utils as utils
class TestUtils(unittest.TestCase):
def test_case_1(self):
a = torch.tensor([
[1, 2, 3, 4, 5], [2, 3, 4, 5, 6]
])
utils.orthogonal(a)
def test_case_2(self):
a = np.random.rand(100, 100)
utils.mst(a)
Write
Preview
Loading…
Cancel
Save