From 5f131b03076251d44ed99072965f06a8d8f4a06c Mon Sep 17 00:00:00 2001 From: Kip Cole Date: Mon, 30 Dec 2024 23:47:56 +1100 Subject: [PATCH] Add :names to output tensor in to_nx/1 (#22) --- lib/frame.ex | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/frame.ex b/lib/frame.ex index ad580d4..7d85183 100644 --- a/lib/frame.ex +++ b/lib/frame.ex @@ -71,7 +71,7 @@ defmodule Xav.Frame do def to_nx(%__MODULE__{type: :video} = frame) do frame.data |> Nx.from_binary(:u8) - |> Nx.reshape({frame.height, frame.width, 3}) + |> Nx.reshape({frame.height, frame.width, 3}, names: [:height, :width, :channels]) end def to_nx(%__MODULE__{type: :audio} = frame) do