Skip to content

Commit

Permalink
Add :names to output tensor in to_nx/1 (#22)
Browse files Browse the repository at this point in the history
  • Loading branch information
kipcole9 authored Dec 30, 2024
1 parent e2ef2ed commit 5f131b0
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/frame.ex
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 5f131b0

Please sign in to comment.