]> khamidou — GitHub mirrors - safetensors.git/commit
impl `View` for `TensorView` (#329)
authorCorey Lowman <clowman1993@gmail.com>
Mon, 21 Aug 2023 07:14:25 +0000 (03:14 -0400)
committerGitHub <noreply@github.com>
Mon, 21 Aug 2023 07:14:25 +0000 (09:14 +0200)
commit34a2a0a29014faa342ebfb1a0cc22b9574da96d6
treee89e2d056a9f745f51efa9ad2e707198dc1901e7
parentde8e9fab1e171412ff6b9dbb169125321b50fbf3
impl `View` for `TensorView` (#329)

The existing impl only exists for `&TensorView`, which means you cannot pass a `Vec<(String, TensorView)>` into `serialize_to_file`. With this new impl, you can.
safetensors/src/tensor.rs