Benign crates 3,450,705 installs Download

tract-onnx-opl 0.23.0-dev.2

“Tiny, no-nonsense, self contained, TensorFlow and ONNX inference”

Contains an unbounded block loopRust test marker or harness
SHA-256a46c66a0126ddc4606e4bc449636b657bc4dd3aae8ee5c0b83222004c50f5976

Evidence

imports std::convert::TryFrom lines 1–17
1use std::convert::TryFrom;
2use std::convert::TryInto;
3use std::fmt::{self, Debug, Display};
4use std::iter;
5
6use tract_nnef::internal::*;
7
8use tract_ndarray::{
9 Array1, Array2, ArrayD, ArrayView1, ArrayView2, ArrayViewD, ArrayViewMut1, Axis, Ix1, Ix2,
10};
11
12use tract_num_traits::AsPrimitive;
13
14macro_rules! ensure {
15 ($cond: expr, $($rest: expr),* $(,)?) => {
16 if !$cond {
17 …
Rust transmute bitwise-conversion syntax lines 46–55
46:2… }
47 pub fn to_u8(&self) -> u8 {
48 unsafe { std::mem::transmute(*self) }
49 }
50}
51
52impl TryFrom<u8> for Cmp {
53 type Error = TractError;
54 fn try_from(value: u8) -> Result<Self, Self::Error> {
55 …
Contains an unbounded block loop lines 137–141
137:22… ode_id = self.trees.as_slice_unchecked::<u32>()[tree] as usize;
138 loop {
139 let node = self.get_unchecked(node_id);
140 match node {
141 TreeNode::Branch(ref b …
imports super::* lines 391–405
391:46… ty for tree ensemble: {:?}", input.shape());
392 }
393 }
394}
395
396#[cfg(test)]
397mod tests {
398 use super::*;
399 use tract_ndarray::prelude::*;
400
401 fn b(
⋯4 lines
Rust synchronous or async test attribute lines 568–576
568:10… [-0.147_204_7, -0.147_199_3, 0.281_595_9],
569 ])
570 }
571
572 #[test]
573 #[ignore]
574 fn test_tree_ensemble() {
575 let ensemble = generate_gbm_ensemble();
576 let input = generate_gbm_in …

No evidence locations were recorded for this file. Raw result

Keyboard shortcuts on this page: j for the next sample, k for the previous one, x to go back to the feed, d to download the original bytes, r to re-queue the sample for analysis.