File tree 1 file changed +6
-10
lines changed
tensorboard/plugins/projector/vz_projector
1 file changed +6
-10
lines changed Original file line number Diff line number Diff line change @@ -86,7 +86,7 @@ export interface DataPoint {
86
86
[ key : string ] : number ;
87
87
} ;
88
88
}
89
- const IS_FIREFOX = navigator . userAgent . toLowerCase ( ) . indexOf ( 'firefox' ) >= 0 ;
89
+
90
90
/** Controls whether nearest neighbors computation is done on the GPU or CPU. */
91
91
export const TSNE_SAMPLE_SIZE = 10000 ;
92
92
export const UMAP_SAMPLE_SIZE = 5000 ;
@@ -473,15 +473,11 @@ export class DataSet {
473
473
. map ( ( neighbors ) => neighbors . slice ( 0 , nNeighbors ) )
474
474
) ;
475
475
} else {
476
- const knnGpuEnabled = ( await util . hasWebGLSupport ( ) ) && ! IS_FIREFOX ;
477
- const result = await ( knnGpuEnabled
478
- ? knn . findKNNGPUCosDistNorm ( data , nNeighbors , ( d ) => d . vector )
479
- : knn . findKNN (
480
- data ,
481
- nNeighbors ,
482
- ( d ) => d . vector ,
483
- ( a , b ) => vector . cosDistNorm ( a , b )
484
- ) ) ;
476
+ const result = await knn . findKNNGPUCosDistNorm (
477
+ data ,
478
+ nNeighbors ,
479
+ ( d ) => d . vector
480
+ ) ;
485
481
this . nearest = result ;
486
482
return Promise . resolve ( result ) ;
487
483
}
You can’t perform that action at this time.
0 commit comments