This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var torchjs = require('@idn/torchjs'); | |
var script_module = new torchjs.ScriptModule('resnet18.pt'); | |
var tensor = torchjs.ones([1, 3, 224, 224], false); | |
const { performance } = require('perf_hooks'); | |
// Comment this out if you don't have cuda | |
script_module.cuda(); | |
let start, end; | |
start = performance.now(); |
OlderNewer