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
skip training while n_epoch in trainer is not greater than 0
tags/v0.3.1^2
xuyige
6 years ago
parent
d4b4ffa28b
commit
e0d6a259ae
1 changed files
with
4 additions
and
0 deletions
Split View
Diff Options
Show Stats
Download Patch File
Download Diff File
+4
-0
fastNLP/core/trainer.py
+ 4
- 0
fastNLP/core/trainer.py
View File
@@ -181,6 +181,10 @@ class Trainer(object):
"""
results = {}
if self.n_epochs <= 0:
print(f"training epoch is {self.n_epochs}, nothing was done.")
results['seconds'] = 0.
return results
try:
if torch.cuda.is_available() and self.use_cuda:
self.model = self.model.cuda()
Write
Preview
Loading…
Cancel
Save