Created by: pangyoki
PR types
Others
PR changes
APIs
Describe
Support that value type of op assign_value
can be float64
.
Because of Attr
(defined in framework.proto) not supporting double
, so we need to change double
to float
in AddAttr
, and then cast float
to double
when doing the assign
processing . This method will lead to float number precision loss.
// in framework.proto
message Attr {
required string name = 1;
required AttrType type = 2;
optional int32 i = 3;
optional float f = 4;
optional string s = 5;
repeated int32 ints = 6;
repeated float floats = 7;
repeated string strings = 8;
optional bool b = 10;
repeated bool bools = 11;
optional int32 block_idx = 12;
optional int64 l = 13;
repeated int32 blocks_idx = 14;
repeated int64 longs = 15;
};