| 804 | const assets_ns::TensorSource & source, |
| 805 | const std::string & prefix, |
| 806 | int64_t in_channels, |
| 807 | int64_t out_channels, |
| 808 | int64_t kernel_size, |
| 809 | assets_ns::TensorStorageType storage_type, |
| 810 | bool use_bias) { |
| 811 | FlatConvTranspose1dWeights weights = {}; |
| 812 | weights.in_channels = in_channels; |
| 813 | weights.out_channels = out_channels; |
| 814 | weights.kernel_size = kernel_size; |
| 815 | weights.weight = store.load_tensor_as_shape( |
| 816 | source, |
| 817 | prefix + ".weight", |
| 818 | storage_type, |
| 819 | {in_channels, out_channels, kernel_size}, |
| 820 | core::TensorShape::from_dims({in_channels, out_channels * kernel_size})); |
| 821 | if (use_bias) { |
| 822 | weights.bias = store.load_tensor(source, prefix + ".bias", assets_ns::TensorStorageType::F32, {out_channels}); |
| 823 | } |
no test coverage detected