assertself._shape_and_dtypesisnotNoneorself._pred_shape_and_dtypesisnotNone,"You need to build_forward or build_predict_head first to prepare input features."
ifphase=='train':
assertself._shape_and_dtypesisnotNone,"You need to build_forward or build_predict_head first to prepare input features."
else:
assertself._pred_shape_and_dtypesisnotNone,"You need to build_forward or build_predict_head first to prepare input features."
# 这里不确定是否要向上取整,需确认
# 这里不确定是否要向上取整,需确认
# tail = self._num_examples % batch_size > 0
# tail = self._num_examples % batch_size > 0
...
@@ -463,8 +466,22 @@ class Trainer(object):
...
@@ -463,8 +466,22 @@ class Trainer(object):
else:
else:
raiseException("model not found. You should at least build_forward or build_predict_forward to load its checkpoint.")
raiseException("model not found. You should at least build_forward or build_predict_forward to load its checkpoint.")