INNER CODE UNIT · Rust

Some

tensorflow/rust · src/lib.rs:420

        if let Some(d) = protos::types::DataType::from_i32(self.to_int() as i32) {
            d
        } else {
            // This is unfortunate, but the protobuf crate doesn't support unrecognized enum values.
            panic!("Unable to convert {} to a protobuf DataType", self);
        }
    }

    // We don't use From, because we don't want this to be public API.
    fn from_proto(proto: protos::types::DataType) -> Self {
        Self::from_int(proto.value() as c_uint)
    }
}

////////////////////////

/// Holds error information when communicating with back and forth with `tensorflow`.
///

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…