We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 9d92974 commit ae8721aCopy full SHA for ae8721a
lib/index.ts
@@ -1,3 +1,4 @@
1
+import Model from '@common/model';
2
/**
3
* @warning
4
*
@@ -13,7 +14,6 @@
13
14
* instance (depending on the version of tensorflow they import.)
15
*/
16
import tf from '@tensorflow/tfjs';
-import Model from '@common/model';
17
18
19
* @example
@@ -87,7 +87,12 @@ export default class AiMR_GAN {
87
if(this.loaded && this.cached) {
88
throw new Error('Refused to cache, model already cached.');
89
}
90
- await this.model.save('indexeddb://gan');
+ try {
91
+ await this.model.save('indexeddb://gan');
92
+ }
93
+ catch {
94
+ console.warn('Could not cache model to indexeddb.');
95
96
97
98
0 commit comments