MCPcopy Create free account
hub / github.com/0xShug0/audio.cpp / optional_f32

Method optional_f32

src/framework/assets/torch_bin.cpp:549–556  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

547 }
548
549 std::optional<std::vector<float>> optional_f32(
550 std::string_view name,
551 const std::optional<std::vector<int64_t>> & expected_shape) const override {
552 if (!has_tensor(name)) {
553 return std::nullopt;
554 }
555 return require_f32(name, expected_shape);
556 }
557
558 int64_t require_i64_scalar(std::string_view name) const override {
559 throw std::runtime_error("torch .bin does not support i64 scalars: " + std::string(name));

Callers

nothing calls this directly

Calls 1

require_f32Function · 0.85

Tested by

no test coverage detected