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
给 dataset 增加了get_field_names
tags/v0.4.10
ChenXin
6 years ago
parent
bb01904fc8
commit
3465d2a08f
1 changed files
with
8 additions
and
0 deletions
Split View
Diff Options
Show Stats
Download Patch File
Download Diff File
+8
-0
fastNLP/core/dataset.py
+ 8
- 0
fastNLP/core/dataset.py
View File
@@ -501,6 +501,14 @@ class DataSet(object):
"""
return self.field_arrays
def get_field_names(self)->list:
"""返回一个list,包含所有 field 的名字
:return: list:
"""
return sorted(self.field_arrays.keys())
def get_length(self):
"""获取DataSet的元素数量
Write
Preview
Loading…
Cancel
Save