{
const canvas = htl.html`<canvas/>`;
const rotatedTensor = tf.tidy(() => {
const batchRotatedTensors = tf.image.rotateWithOffset(
batchHummingTensorRgb.div(255),
-0.7
);
return tf.squeeze(batchRotatedTensors);
});
tf.browser.toPixels(rotatedTensor, canvas).then(() => {
rotatedTensor.dispose();
});
return canvas;
}