remotecontrol.pb.go 18 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557
  1. // Code generated by protoc-gen-go. DO NOT EDIT.
  2. // source: remotecontrol.proto
  3. package remotecontrol
  4. import (
  5. context "context"
  6. fmt "fmt"
  7. proto "github.com/golang/protobuf/proto"
  8. grpc "google.golang.org/grpc"
  9. codes "google.golang.org/grpc/codes"
  10. status "google.golang.org/grpc/status"
  11. math "math"
  12. )
  13. // Reference imports to suppress errors if they are not otherwise used.
  14. var _ = proto.Marshal
  15. var _ = fmt.Errorf
  16. var _ = math.Inf
  17. // This is a compile-time assertion to ensure that this generated file
  18. // is compatible with the proto package it is being compiled against.
  19. // A compilation error at this line likely means your copy of the
  20. // proto package needs to be updated.
  21. const _ = proto.ProtoPackageIsVersion3 // please upgrade the proto package
  22. type LayerMatrix_ContentType int32
  23. const (
  24. LayerMatrix_Activations LayerMatrix_ContentType = 0
  25. LayerMatrix_Weights LayerMatrix_ContentType = 1
  26. LayerMatrix_Biases LayerMatrix_ContentType = 2
  27. )
  28. var LayerMatrix_ContentType_name = map[int32]string{
  29. 0: "Activations",
  30. 1: "Weights",
  31. 2: "Biases",
  32. }
  33. var LayerMatrix_ContentType_value = map[string]int32{
  34. "Activations": 0,
  35. "Weights": 1,
  36. "Biases": 2,
  37. }
  38. func (x LayerMatrix_ContentType) String() string {
  39. return proto.EnumName(LayerMatrix_ContentType_name, int32(x))
  40. }
  41. func (LayerMatrix_ContentType) EnumDescriptor() ([]byte, []int) {
  42. return fileDescriptor_9e7470c0107e56c6, []int{1, 0}
  43. }
  44. type Matrix struct {
  45. Matrix []byte `protobuf:"bytes,1,opt,name=matrix,proto3" json:"matrix,omitempty"`
  46. XXX_NoUnkeyedLiteral struct{} `json:"-"`
  47. XXX_unrecognized []byte `json:"-"`
  48. XXX_sizecache int32 `json:"-"`
  49. }
  50. func (m *Matrix) Reset() { *m = Matrix{} }
  51. func (m *Matrix) String() string { return proto.CompactTextString(m) }
  52. func (*Matrix) ProtoMessage() {}
  53. func (*Matrix) Descriptor() ([]byte, []int) {
  54. return fileDescriptor_9e7470c0107e56c6, []int{0}
  55. }
  56. func (m *Matrix) XXX_Unmarshal(b []byte) error {
  57. return xxx_messageInfo_Matrix.Unmarshal(m, b)
  58. }
  59. func (m *Matrix) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
  60. return xxx_messageInfo_Matrix.Marshal(b, m, deterministic)
  61. }
  62. func (m *Matrix) XXX_Merge(src proto.Message) {
  63. xxx_messageInfo_Matrix.Merge(m, src)
  64. }
  65. func (m *Matrix) XXX_Size() int {
  66. return xxx_messageInfo_Matrix.Size(m)
  67. }
  68. func (m *Matrix) XXX_DiscardUnknown() {
  69. xxx_messageInfo_Matrix.DiscardUnknown(m)
  70. }
  71. var xxx_messageInfo_Matrix proto.InternalMessageInfo
  72. func (m *Matrix) GetMatrix() []byte {
  73. if m != nil {
  74. return m.Matrix
  75. }
  76. return nil
  77. }
  78. type LayerMatrix struct {
  79. ContentType LayerMatrix_ContentType `protobuf:"varint,1,opt,name=contentType,proto3,enum=remotecontrol.LayerMatrix_ContentType" json:"contentType,omitempty"`
  80. Layer int32 `protobuf:"zigzag32,2,opt,name=layer,proto3" json:"layer,omitempty"`
  81. Matrix *Matrix `protobuf:"bytes,3,opt,name=matrix,proto3" json:"matrix,omitempty"`
  82. XXX_NoUnkeyedLiteral struct{} `json:"-"`
  83. XXX_unrecognized []byte `json:"-"`
  84. XXX_sizecache int32 `json:"-"`
  85. }
  86. func (m *LayerMatrix) Reset() { *m = LayerMatrix{} }
  87. func (m *LayerMatrix) String() string { return proto.CompactTextString(m) }
  88. func (*LayerMatrix) ProtoMessage() {}
  89. func (*LayerMatrix) Descriptor() ([]byte, []int) {
  90. return fileDescriptor_9e7470c0107e56c6, []int{1}
  91. }
  92. func (m *LayerMatrix) XXX_Unmarshal(b []byte) error {
  93. return xxx_messageInfo_LayerMatrix.Unmarshal(m, b)
  94. }
  95. func (m *LayerMatrix) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
  96. return xxx_messageInfo_LayerMatrix.Marshal(b, m, deterministic)
  97. }
  98. func (m *LayerMatrix) XXX_Merge(src proto.Message) {
  99. xxx_messageInfo_LayerMatrix.Merge(m, src)
  100. }
  101. func (m *LayerMatrix) XXX_Size() int {
  102. return xxx_messageInfo_LayerMatrix.Size(m)
  103. }
  104. func (m *LayerMatrix) XXX_DiscardUnknown() {
  105. xxx_messageInfo_LayerMatrix.DiscardUnknown(m)
  106. }
  107. var xxx_messageInfo_LayerMatrix proto.InternalMessageInfo
  108. func (m *LayerMatrix) GetContentType() LayerMatrix_ContentType {
  109. if m != nil {
  110. return m.ContentType
  111. }
  112. return LayerMatrix_Activations
  113. }
  114. func (m *LayerMatrix) GetLayer() int32 {
  115. if m != nil {
  116. return m.Layer
  117. }
  118. return 0
  119. }
  120. func (m *LayerMatrix) GetMatrix() *Matrix {
  121. if m != nil {
  122. return m.Matrix
  123. }
  124. return nil
  125. }
  126. type Configuration struct {
  127. Sizes []int32 `protobuf:"zigzag32,1,rep,packed,name=sizes,proto3" json:"sizes,omitempty"`
  128. XXX_NoUnkeyedLiteral struct{} `json:"-"`
  129. XXX_unrecognized []byte `json:"-"`
  130. XXX_sizecache int32 `json:"-"`
  131. }
  132. func (m *Configuration) Reset() { *m = Configuration{} }
  133. func (m *Configuration) String() string { return proto.CompactTextString(m) }
  134. func (*Configuration) ProtoMessage() {}
  135. func (*Configuration) Descriptor() ([]byte, []int) {
  136. return fileDescriptor_9e7470c0107e56c6, []int{2}
  137. }
  138. func (m *Configuration) XXX_Unmarshal(b []byte) error {
  139. return xxx_messageInfo_Configuration.Unmarshal(m, b)
  140. }
  141. func (m *Configuration) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
  142. return xxx_messageInfo_Configuration.Marshal(b, m, deterministic)
  143. }
  144. func (m *Configuration) XXX_Merge(src proto.Message) {
  145. xxx_messageInfo_Configuration.Merge(m, src)
  146. }
  147. func (m *Configuration) XXX_Size() int {
  148. return xxx_messageInfo_Configuration.Size(m)
  149. }
  150. func (m *Configuration) XXX_DiscardUnknown() {
  151. xxx_messageInfo_Configuration.DiscardUnknown(m)
  152. }
  153. var xxx_messageInfo_Configuration proto.InternalMessageInfo
  154. func (m *Configuration) GetSizes() []int32 {
  155. if m != nil {
  156. return m.Sizes
  157. }
  158. return nil
  159. }
  160. type None struct {
  161. XXX_NoUnkeyedLiteral struct{} `json:"-"`
  162. XXX_unrecognized []byte `json:"-"`
  163. XXX_sizecache int32 `json:"-"`
  164. }
  165. func (m *None) Reset() { *m = None{} }
  166. func (m *None) String() string { return proto.CompactTextString(m) }
  167. func (*None) ProtoMessage() {}
  168. func (*None) Descriptor() ([]byte, []int) {
  169. return fileDescriptor_9e7470c0107e56c6, []int{3}
  170. }
  171. func (m *None) XXX_Unmarshal(b []byte) error {
  172. return xxx_messageInfo_None.Unmarshal(m, b)
  173. }
  174. func (m *None) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
  175. return xxx_messageInfo_None.Marshal(b, m, deterministic)
  176. }
  177. func (m *None) XXX_Merge(src proto.Message) {
  178. xxx_messageInfo_None.Merge(m, src)
  179. }
  180. func (m *None) XXX_Size() int {
  181. return xxx_messageInfo_None.Size(m)
  182. }
  183. func (m *None) XXX_DiscardUnknown() {
  184. xxx_messageInfo_None.DiscardUnknown(m)
  185. }
  186. var xxx_messageInfo_None proto.InternalMessageInfo
  187. func init() {
  188. proto.RegisterEnum("remotecontrol.LayerMatrix_ContentType", LayerMatrix_ContentType_name, LayerMatrix_ContentType_value)
  189. proto.RegisterType((*Matrix)(nil), "remotecontrol.Matrix")
  190. proto.RegisterType((*LayerMatrix)(nil), "remotecontrol.LayerMatrix")
  191. proto.RegisterType((*Configuration)(nil), "remotecontrol.Configuration")
  192. proto.RegisterType((*None)(nil), "remotecontrol.None")
  193. }
  194. func init() { proto.RegisterFile("remotecontrol.proto", fileDescriptor_9e7470c0107e56c6) }
  195. var fileDescriptor_9e7470c0107e56c6 = []byte{
  196. // 313 bytes of a gzipped FileDescriptorProto
  197. 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x9c, 0x92, 0xc1, 0x4b, 0xc3, 0x30,
  198. 0x14, 0xc6, 0x9b, 0x4d, 0x3b, 0x78, 0x71, 0x5a, 0x33, 0x95, 0x51, 0x3c, 0x94, 0x80, 0xd2, 0x8b,
  199. 0x45, 0xea, 0x41, 0x3c, 0x28, 0xb8, 0x1e, 0xf4, 0xa0, 0x22, 0x45, 0xf0, 0x5c, 0x6b, 0xac, 0x81,
  200. 0xad, 0x19, 0x49, 0x14, 0xe7, 0xff, 0xa9, 0x7f, 0x8f, 0x34, 0x9d, 0xb5, 0x2d, 0xf5, 0xb2, 0x5b,
  201. 0xde, 0xe3, 0xfb, 0xbe, 0xf7, 0xcb, 0x4b, 0x60, 0x24, 0xd9, 0x4c, 0x68, 0x96, 0x8a, 0x5c, 0x4b,
  202. 0x31, 0x0d, 0xe6, 0x52, 0x68, 0x41, 0x86, 0x8d, 0x26, 0xf5, 0xc0, 0xbe, 0x4d, 0xb4, 0xe4, 0x1f,
  203. 0x64, 0x0f, 0xec, 0x99, 0x39, 0x8d, 0x91, 0x87, 0xfc, 0x8d, 0x78, 0x59, 0xd1, 0x2f, 0x04, 0xf8,
  204. 0x26, 0x59, 0x30, 0xb9, 0xd4, 0x5d, 0x03, 0x2e, 0xcc, 0x2c, 0xd7, 0x0f, 0x8b, 0x39, 0x33, 0xe2,
  205. 0xcd, 0xf0, 0x30, 0x68, 0xce, 0xaa, 0x19, 0x82, 0xe8, 0x4f, 0x1d, 0xd7, 0xad, 0x64, 0x07, 0xd6,
  206. 0xa7, 0x85, 0x6e, 0xdc, 0xf3, 0x90, 0xbf, 0x1d, 0x97, 0x05, 0x39, 0xaa, 0x38, 0xfa, 0x1e, 0xf2,
  207. 0x71, 0xb8, 0xdb, 0x8a, 0x2e, 0x53, 0x2b, 0xbc, 0x53, 0xc0, 0xb5, 0x01, 0x64, 0x0b, 0xf0, 0x65,
  208. 0xaa, 0xf9, 0x7b, 0xa2, 0xb9, 0xc8, 0x95, 0x63, 0x11, 0x0c, 0x83, 0x47, 0xc6, 0xb3, 0x57, 0xad,
  209. 0x1c, 0x44, 0x00, 0xec, 0x09, 0x4f, 0x14, 0x53, 0x4e, 0x8f, 0x1e, 0xc0, 0x30, 0x12, 0xf9, 0x0b,
  210. 0xcf, 0xde, 0xa4, 0x11, 0x17, 0x38, 0x8a, 0x7f, 0x32, 0x35, 0x46, 0x5e, 0xbf, 0xc0, 0x31, 0x05,
  211. 0xb5, 0x61, 0xed, 0x4e, 0xe4, 0x2c, 0xfc, 0xee, 0xc1, 0x30, 0x36, 0x20, 0x51, 0x09, 0x42, 0xae,
  212. 0xc0, 0xc9, 0x98, 0x6e, 0x66, 0x8c, 0x5a, 0xb0, 0x85, 0xd5, 0xdd, 0x6f, 0x35, 0x1b, 0x16, 0x6a,
  213. 0x91, 0x49, 0x83, 0xb9, 0x3b, 0xc3, 0xfd, 0x7f, 0xc1, 0xd4, 0x3a, 0x46, 0xe4, 0xfc, 0xf7, 0x66,
  214. 0xab, 0xd9, 0x2f, 0xaa, 0x2d, 0xad, 0xe6, 0x3f, 0x83, 0xc1, 0xbd, 0x64, 0xcf, 0x3c, 0xd5, 0xa4,
  215. 0xfb, 0xbd, 0xdc, 0xee, 0x36, 0xb5, 0x9e, 0x6c, 0xf3, 0x2f, 0x4f, 0x7e, 0x02, 0x00, 0x00, 0xff,
  216. 0xff, 0x89, 0xa6, 0x82, 0x97, 0xae, 0x02, 0x00, 0x00,
  217. }
  218. // Reference imports to suppress errors if they are not otherwise used.
  219. var _ context.Context
  220. var _ grpc.ClientConn
  221. // This is a compile-time assertion to ensure that this generated file
  222. // is compatible with the grpc package it is being compiled against.
  223. const _ = grpc.SupportPackageIsVersion4
  224. // RemoteControlClient is the client API for RemoteControl service.
  225. //
  226. // For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream.
  227. type RemoteControlClient interface {
  228. GetConfiguration(ctx context.Context, in *None, opts ...grpc.CallOption) (*Configuration, error)
  229. Activations(ctx context.Context, in *None, opts ...grpc.CallOption) (RemoteControl_ActivationsClient, error)
  230. Biases(ctx context.Context, in *None, opts ...grpc.CallOption) (RemoteControl_BiasesClient, error)
  231. Weights(ctx context.Context, in *None, opts ...grpc.CallOption) (RemoteControl_WeightsClient, error)
  232. Predict(ctx context.Context, in *Matrix, opts ...grpc.CallOption) (*Matrix, error)
  233. }
  234. type remoteControlClient struct {
  235. cc *grpc.ClientConn
  236. }
  237. func NewRemoteControlClient(cc *grpc.ClientConn) RemoteControlClient {
  238. return &remoteControlClient{cc}
  239. }
  240. func (c *remoteControlClient) GetConfiguration(ctx context.Context, in *None, opts ...grpc.CallOption) (*Configuration, error) {
  241. out := new(Configuration)
  242. err := c.cc.Invoke(ctx, "/remotecontrol.RemoteControl/getConfiguration", in, out, opts...)
  243. if err != nil {
  244. return nil, err
  245. }
  246. return out, nil
  247. }
  248. func (c *remoteControlClient) Activations(ctx context.Context, in *None, opts ...grpc.CallOption) (RemoteControl_ActivationsClient, error) {
  249. stream, err := c.cc.NewStream(ctx, &_RemoteControl_serviceDesc.Streams[0], "/remotecontrol.RemoteControl/Activations", opts...)
  250. if err != nil {
  251. return nil, err
  252. }
  253. x := &remoteControlActivationsClient{stream}
  254. if err := x.ClientStream.SendMsg(in); err != nil {
  255. return nil, err
  256. }
  257. if err := x.ClientStream.CloseSend(); err != nil {
  258. return nil, err
  259. }
  260. return x, nil
  261. }
  262. type RemoteControl_ActivationsClient interface {
  263. Recv() (*LayerMatrix, error)
  264. grpc.ClientStream
  265. }
  266. type remoteControlActivationsClient struct {
  267. grpc.ClientStream
  268. }
  269. func (x *remoteControlActivationsClient) Recv() (*LayerMatrix, error) {
  270. m := new(LayerMatrix)
  271. if err := x.ClientStream.RecvMsg(m); err != nil {
  272. return nil, err
  273. }
  274. return m, nil
  275. }
  276. func (c *remoteControlClient) Biases(ctx context.Context, in *None, opts ...grpc.CallOption) (RemoteControl_BiasesClient, error) {
  277. stream, err := c.cc.NewStream(ctx, &_RemoteControl_serviceDesc.Streams[1], "/remotecontrol.RemoteControl/Biases", opts...)
  278. if err != nil {
  279. return nil, err
  280. }
  281. x := &remoteControlBiasesClient{stream}
  282. if err := x.ClientStream.SendMsg(in); err != nil {
  283. return nil, err
  284. }
  285. if err := x.ClientStream.CloseSend(); err != nil {
  286. return nil, err
  287. }
  288. return x, nil
  289. }
  290. type RemoteControl_BiasesClient interface {
  291. Recv() (*LayerMatrix, error)
  292. grpc.ClientStream
  293. }
  294. type remoteControlBiasesClient struct {
  295. grpc.ClientStream
  296. }
  297. func (x *remoteControlBiasesClient) Recv() (*LayerMatrix, error) {
  298. m := new(LayerMatrix)
  299. if err := x.ClientStream.RecvMsg(m); err != nil {
  300. return nil, err
  301. }
  302. return m, nil
  303. }
  304. func (c *remoteControlClient) Weights(ctx context.Context, in *None, opts ...grpc.CallOption) (RemoteControl_WeightsClient, error) {
  305. stream, err := c.cc.NewStream(ctx, &_RemoteControl_serviceDesc.Streams[2], "/remotecontrol.RemoteControl/Weights", opts...)
  306. if err != nil {
  307. return nil, err
  308. }
  309. x := &remoteControlWeightsClient{stream}
  310. if err := x.ClientStream.SendMsg(in); err != nil {
  311. return nil, err
  312. }
  313. if err := x.ClientStream.CloseSend(); err != nil {
  314. return nil, err
  315. }
  316. return x, nil
  317. }
  318. type RemoteControl_WeightsClient interface {
  319. Recv() (*LayerMatrix, error)
  320. grpc.ClientStream
  321. }
  322. type remoteControlWeightsClient struct {
  323. grpc.ClientStream
  324. }
  325. func (x *remoteControlWeightsClient) Recv() (*LayerMatrix, error) {
  326. m := new(LayerMatrix)
  327. if err := x.ClientStream.RecvMsg(m); err != nil {
  328. return nil, err
  329. }
  330. return m, nil
  331. }
  332. func (c *remoteControlClient) Predict(ctx context.Context, in *Matrix, opts ...grpc.CallOption) (*Matrix, error) {
  333. out := new(Matrix)
  334. err := c.cc.Invoke(ctx, "/remotecontrol.RemoteControl/Predict", in, out, opts...)
  335. if err != nil {
  336. return nil, err
  337. }
  338. return out, nil
  339. }
  340. // RemoteControlServer is the server API for RemoteControl service.
  341. type RemoteControlServer interface {
  342. GetConfiguration(context.Context, *None) (*Configuration, error)
  343. Activations(*None, RemoteControl_ActivationsServer) error
  344. Biases(*None, RemoteControl_BiasesServer) error
  345. Weights(*None, RemoteControl_WeightsServer) error
  346. Predict(context.Context, *Matrix) (*Matrix, error)
  347. }
  348. // UnimplementedRemoteControlServer can be embedded to have forward compatible implementations.
  349. type UnimplementedRemoteControlServer struct {
  350. }
  351. func (*UnimplementedRemoteControlServer) GetConfiguration(ctx context.Context, req *None) (*Configuration, error) {
  352. return nil, status.Errorf(codes.Unimplemented, "method GetConfiguration not implemented")
  353. }
  354. func (*UnimplementedRemoteControlServer) Activations(req *None, srv RemoteControl_ActivationsServer) error {
  355. return status.Errorf(codes.Unimplemented, "method Activations not implemented")
  356. }
  357. func (*UnimplementedRemoteControlServer) Biases(req *None, srv RemoteControl_BiasesServer) error {
  358. return status.Errorf(codes.Unimplemented, "method Biases not implemented")
  359. }
  360. func (*UnimplementedRemoteControlServer) Weights(req *None, srv RemoteControl_WeightsServer) error {
  361. return status.Errorf(codes.Unimplemented, "method Weights not implemented")
  362. }
  363. func (*UnimplementedRemoteControlServer) Predict(ctx context.Context, req *Matrix) (*Matrix, error) {
  364. return nil, status.Errorf(codes.Unimplemented, "method Predict not implemented")
  365. }
  366. func RegisterRemoteControlServer(s *grpc.Server, srv RemoteControlServer) {
  367. s.RegisterService(&_RemoteControl_serviceDesc, srv)
  368. }
  369. func _RemoteControl_GetConfiguration_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
  370. in := new(None)
  371. if err := dec(in); err != nil {
  372. return nil, err
  373. }
  374. if interceptor == nil {
  375. return srv.(RemoteControlServer).GetConfiguration(ctx, in)
  376. }
  377. info := &grpc.UnaryServerInfo{
  378. Server: srv,
  379. FullMethod: "/remotecontrol.RemoteControl/GetConfiguration",
  380. }
  381. handler := func(ctx context.Context, req interface{}) (interface{}, error) {
  382. return srv.(RemoteControlServer).GetConfiguration(ctx, req.(*None))
  383. }
  384. return interceptor(ctx, in, info, handler)
  385. }
  386. func _RemoteControl_Activations_Handler(srv interface{}, stream grpc.ServerStream) error {
  387. m := new(None)
  388. if err := stream.RecvMsg(m); err != nil {
  389. return err
  390. }
  391. return srv.(RemoteControlServer).Activations(m, &remoteControlActivationsServer{stream})
  392. }
  393. type RemoteControl_ActivationsServer interface {
  394. Send(*LayerMatrix) error
  395. grpc.ServerStream
  396. }
  397. type remoteControlActivationsServer struct {
  398. grpc.ServerStream
  399. }
  400. func (x *remoteControlActivationsServer) Send(m *LayerMatrix) error {
  401. return x.ServerStream.SendMsg(m)
  402. }
  403. func _RemoteControl_Biases_Handler(srv interface{}, stream grpc.ServerStream) error {
  404. m := new(None)
  405. if err := stream.RecvMsg(m); err != nil {
  406. return err
  407. }
  408. return srv.(RemoteControlServer).Biases(m, &remoteControlBiasesServer{stream})
  409. }
  410. type RemoteControl_BiasesServer interface {
  411. Send(*LayerMatrix) error
  412. grpc.ServerStream
  413. }
  414. type remoteControlBiasesServer struct {
  415. grpc.ServerStream
  416. }
  417. func (x *remoteControlBiasesServer) Send(m *LayerMatrix) error {
  418. return x.ServerStream.SendMsg(m)
  419. }
  420. func _RemoteControl_Weights_Handler(srv interface{}, stream grpc.ServerStream) error {
  421. m := new(None)
  422. if err := stream.RecvMsg(m); err != nil {
  423. return err
  424. }
  425. return srv.(RemoteControlServer).Weights(m, &remoteControlWeightsServer{stream})
  426. }
  427. type RemoteControl_WeightsServer interface {
  428. Send(*LayerMatrix) error
  429. grpc.ServerStream
  430. }
  431. type remoteControlWeightsServer struct {
  432. grpc.ServerStream
  433. }
  434. func (x *remoteControlWeightsServer) Send(m *LayerMatrix) error {
  435. return x.ServerStream.SendMsg(m)
  436. }
  437. func _RemoteControl_Predict_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
  438. in := new(Matrix)
  439. if err := dec(in); err != nil {
  440. return nil, err
  441. }
  442. if interceptor == nil {
  443. return srv.(RemoteControlServer).Predict(ctx, in)
  444. }
  445. info := &grpc.UnaryServerInfo{
  446. Server: srv,
  447. FullMethod: "/remotecontrol.RemoteControl/Predict",
  448. }
  449. handler := func(ctx context.Context, req interface{}) (interface{}, error) {
  450. return srv.(RemoteControlServer).Predict(ctx, req.(*Matrix))
  451. }
  452. return interceptor(ctx, in, info, handler)
  453. }
  454. var _RemoteControl_serviceDesc = grpc.ServiceDesc{
  455. ServiceName: "remotecontrol.RemoteControl",
  456. HandlerType: (*RemoteControlServer)(nil),
  457. Methods: []grpc.MethodDesc{
  458. {
  459. MethodName: "getConfiguration",
  460. Handler: _RemoteControl_GetConfiguration_Handler,
  461. },
  462. {
  463. MethodName: "Predict",
  464. Handler: _RemoteControl_Predict_Handler,
  465. },
  466. },
  467. Streams: []grpc.StreamDesc{
  468. {
  469. StreamName: "Activations",
  470. Handler: _RemoteControl_Activations_Handler,
  471. ServerStreams: true,
  472. },
  473. {
  474. StreamName: "Biases",
  475. Handler: _RemoteControl_Biases_Handler,
  476. ServerStreams: true,
  477. },
  478. {
  479. StreamName: "Weights",
  480. Handler: _RemoteControl_Weights_Handler,
  481. ServerStreams: true,
  482. },
  483. },
  484. Metadata: "remotecontrol.proto",
  485. }