Searched defs:TensorTraits (Results 1 – 1 of 1) sorted by relevance
249 struct TensorTraits<float> { struct250 static int size(const TensorProto& p) { return p.float_val_size(); } in size()251 static float get(const TensorProto& p, int i) { return p.float_val(i); } in get()252 static std::string accessor_name() { return "float_val"; } in accessor_name()253 static std::string type_name() { return "float"; } in type_name()254 static void CopyFromContent(const TensorProto& p, std::vector<float>* data) { in CopyFromContent()261 struct TensorTraits<uint8_t> { struct262 static int size(const TensorProto& p) { return p.int_val_size(); } in size()263 static uint8_t get(const TensorProto& p, int i) { return p.int_val(i); } in get()264 static std::string accessor_name() { return "int_val"; } in accessor_name()[all …]