|
|
@@ -8,14 +8,11 @@ var protobuf = protobuf || require('./protobuf');
|
|
|
bigdl.ModelFactory = class {
|
|
|
|
|
|
match(context) {
|
|
|
- const identifier = context.identifier;
|
|
|
- const extension = identifier.split('.').pop().toLowerCase();
|
|
|
- if (extension == 'model' || extension == 'bigdl') {
|
|
|
- const tags = context.tags('pb');
|
|
|
- if (tags.has(2) && tags.has(7) && tags.has(8) && tags.has(9) && tags.has(10) && tags.has(11) && tags.has(12)) {
|
|
|
- return true;
|
|
|
- }
|
|
|
+ const tags = context.tags('pb');
|
|
|
+ if (tags.has(2) && tags.has(7) && tags.has(8) && tags.has(9) && tags.has(10) && tags.has(11) && tags.has(12)) {
|
|
|
+ return true;
|
|
|
}
|
|
|
+ return false;
|
|
|
}
|
|
|
|
|
|
open(context, host) {
|