Summary:
Pull Request resolved: https://github.com/pytorch/pytorch/pull/19154
I recently saw some weird workflow error due to empty but set net_type. Maybe we should just fallback to simple net in this case.
Reviewed By: dzhulgakov
Differential Revision:
D14890072
fbshipit-source-id:
4e9edf8232298000713bebb0bfdec61e9c5df17d
const std::shared_ptr<const NetDef>& net_def,
Workspace* ws) {
std::string net_type;
- if (net_def->has_type()) {
+ if (net_def->has_type() && !net_def->type().empty()) {
net_type = net_def->type();
} else {
// By default, we will return a simple network that just runs all operators