UNPKG

@tensorflow/tfjs-node

Version:

This repository provides native TensorFlow execution in backend JavaScript applications under the Node.js runtime, accelerated by the TensorFlow C binary under the hood. It provides the same API as [TensorFlow.js](https://js.tensorflow.org/api/latest/).

1,523 lines (1,419 loc) 270 kB
// source: api.proto /** * @fileoverview * @enhanceable * @suppress {messageConventions} JS Compiler reports an error if a variable or * field starts with 'MSG_' and isn't a translatable message. * @public */ // GENERATED CODE -- DO NOT EDIT! var jspb = require('google-protobuf'); var goog = jspb; var global = Function('return this')(); goog.exportSymbol('proto.tensorflow.Any', null, global); goog.exportSymbol('proto.tensorflow.AssetFileDef', null, global); goog.exportSymbol('proto.tensorflow.AttrValue', null, global); goog.exportSymbol('proto.tensorflow.AttrValue.ListValue', null, global); goog.exportSymbol('proto.tensorflow.AttrValue.ValueCase', null, global); goog.exportSymbol('proto.tensorflow.CollectionDef', null, global); goog.exportSymbol('proto.tensorflow.CollectionDef.AnyList', null, global); goog.exportSymbol('proto.tensorflow.CollectionDef.BytesList', null, global); goog.exportSymbol('proto.tensorflow.CollectionDef.FloatList', null, global); goog.exportSymbol('proto.tensorflow.CollectionDef.Int64List', null, global); goog.exportSymbol('proto.tensorflow.CollectionDef.KindCase', null, global); goog.exportSymbol('proto.tensorflow.CollectionDef.NodeList', null, global); goog.exportSymbol('proto.tensorflow.DataType', null, global); goog.exportSymbol('proto.tensorflow.FunctionDef', null, global); goog.exportSymbol('proto.tensorflow.FunctionDefLibrary', null, global); goog.exportSymbol('proto.tensorflow.GradientDef', null, global); goog.exportSymbol('proto.tensorflow.GraphDef', null, global); goog.exportSymbol('proto.tensorflow.MetaGraphDef', null, global); goog.exportSymbol('proto.tensorflow.MetaGraphDef.MetaInfoDef', null, global); goog.exportSymbol('proto.tensorflow.NameAttrList', null, global); goog.exportSymbol('proto.tensorflow.NodeDef', null, global); goog.exportSymbol('proto.tensorflow.OpDef', null, global); goog.exportSymbol('proto.tensorflow.OpDef.ArgDef', null, global); goog.exportSymbol('proto.tensorflow.OpDef.AttrDef', null, global); goog.exportSymbol('proto.tensorflow.OpDef.OpDeprecation', null, global); goog.exportSymbol('proto.tensorflow.OpList', null, global); goog.exportSymbol('proto.tensorflow.SavedModel', null, global); goog.exportSymbol('proto.tensorflow.SaverDef', null, global); goog.exportSymbol('proto.tensorflow.SaverDef.CheckpointFormatVersion', null, global); goog.exportSymbol('proto.tensorflow.SignatureDef', null, global); goog.exportSymbol('proto.tensorflow.Tensor', null, global); goog.exportSymbol('proto.tensorflow.TensorInfo', null, global); goog.exportSymbol('proto.tensorflow.TensorInfo.CooSparse', null, global); goog.exportSymbol('proto.tensorflow.TensorInfo.EncodingCase', null, global); goog.exportSymbol('proto.tensorflow.TensorShape', null, global); goog.exportSymbol('proto.tensorflow.TensorShape.Dim', null, global); goog.exportSymbol('proto.tensorflow.VersionDef', null, global); /** * Generated by JsPbCodeGenerator. * @param {Array=} opt_data Optional initial data array, typically from a * server response, or constructed directly in Javascript. The array is used * in place and becomes part of the constructed object. It is not cloned. * If no data is provided, the constructed object will be empty, but still * valid. * @extends {jspb.Message} * @constructor */ proto.tensorflow.Any = function(opt_data) { jspb.Message.initialize(this, opt_data, 0, -1, null, null); }; goog.inherits(proto.tensorflow.Any, jspb.Message); if (goog.DEBUG && !COMPILED) { /** * @public * @override */ proto.tensorflow.Any.displayName = 'proto.tensorflow.Any'; } /** * Generated by JsPbCodeGenerator. * @param {Array=} opt_data Optional initial data array, typically from a * server response, or constructed directly in Javascript. The array is used * in place and becomes part of the constructed object. It is not cloned. * If no data is provided, the constructed object will be empty, but still * valid. * @extends {jspb.Message} * @constructor */ proto.tensorflow.TensorShape = function(opt_data) { jspb.Message.initialize(this, opt_data, 0, -1, proto.tensorflow.TensorShape.repeatedFields_, null); }; goog.inherits(proto.tensorflow.TensorShape, jspb.Message); if (goog.DEBUG && !COMPILED) { /** * @public * @override */ proto.tensorflow.TensorShape.displayName = 'proto.tensorflow.TensorShape'; } /** * Generated by JsPbCodeGenerator. * @param {Array=} opt_data Optional initial data array, typically from a * server response, or constructed directly in Javascript. The array is used * in place and becomes part of the constructed object. It is not cloned. * If no data is provided, the constructed object will be empty, but still * valid. * @extends {jspb.Message} * @constructor */ proto.tensorflow.TensorShape.Dim = function(opt_data) { jspb.Message.initialize(this, opt_data, 0, -1, null, null); }; goog.inherits(proto.tensorflow.TensorShape.Dim, jspb.Message); if (goog.DEBUG && !COMPILED) { /** * @public * @override */ proto.tensorflow.TensorShape.Dim.displayName = 'proto.tensorflow.TensorShape.Dim'; } /** * Generated by JsPbCodeGenerator. * @param {Array=} opt_data Optional initial data array, typically from a * server response, or constructed directly in Javascript. The array is used * in place and becomes part of the constructed object. It is not cloned. * If no data is provided, the constructed object will be empty, but still * valid. * @extends {jspb.Message} * @constructor */ proto.tensorflow.Tensor = function(opt_data) { jspb.Message.initialize(this, opt_data, 0, -1, proto.tensorflow.Tensor.repeatedFields_, null); }; goog.inherits(proto.tensorflow.Tensor, jspb.Message); if (goog.DEBUG && !COMPILED) { /** * @public * @override */ proto.tensorflow.Tensor.displayName = 'proto.tensorflow.Tensor'; } /** * Generated by JsPbCodeGenerator. * @param {Array=} opt_data Optional initial data array, typically from a * server response, or constructed directly in Javascript. The array is used * in place and becomes part of the constructed object. It is not cloned. * If no data is provided, the constructed object will be empty, but still * valid. * @extends {jspb.Message} * @constructor */ proto.tensorflow.AttrValue = function(opt_data) { jspb.Message.initialize(this, opt_data, 0, -1, null, proto.tensorflow.AttrValue.oneofGroups_); }; goog.inherits(proto.tensorflow.AttrValue, jspb.Message); if (goog.DEBUG && !COMPILED) { /** * @public * @override */ proto.tensorflow.AttrValue.displayName = 'proto.tensorflow.AttrValue'; } /** * Generated by JsPbCodeGenerator. * @param {Array=} opt_data Optional initial data array, typically from a * server response, or constructed directly in Javascript. The array is used * in place and becomes part of the constructed object. It is not cloned. * If no data is provided, the constructed object will be empty, but still * valid. * @extends {jspb.Message} * @constructor */ proto.tensorflow.AttrValue.ListValue = function(opt_data) { jspb.Message.initialize(this, opt_data, 0, -1, proto.tensorflow.AttrValue.ListValue.repeatedFields_, null); }; goog.inherits(proto.tensorflow.AttrValue.ListValue, jspb.Message); if (goog.DEBUG && !COMPILED) { /** * @public * @override */ proto.tensorflow.AttrValue.ListValue.displayName = 'proto.tensorflow.AttrValue.ListValue'; } /** * Generated by JsPbCodeGenerator. * @param {Array=} opt_data Optional initial data array, typically from a * server response, or constructed directly in Javascript. The array is used * in place and becomes part of the constructed object. It is not cloned. * If no data is provided, the constructed object will be empty, but still * valid. * @extends {jspb.Message} * @constructor */ proto.tensorflow.NameAttrList = function(opt_data) { jspb.Message.initialize(this, opt_data, 0, -1, null, null); }; goog.inherits(proto.tensorflow.NameAttrList, jspb.Message); if (goog.DEBUG && !COMPILED) { /** * @public * @override */ proto.tensorflow.NameAttrList.displayName = 'proto.tensorflow.NameAttrList'; } /** * Generated by JsPbCodeGenerator. * @param {Array=} opt_data Optional initial data array, typically from a * server response, or constructed directly in Javascript. The array is used * in place and becomes part of the constructed object. It is not cloned. * If no data is provided, the constructed object will be empty, but still * valid. * @extends {jspb.Message} * @constructor */ proto.tensorflow.NodeDef = function(opt_data) { jspb.Message.initialize(this, opt_data, 0, -1, proto.tensorflow.NodeDef.repeatedFields_, null); }; goog.inherits(proto.tensorflow.NodeDef, jspb.Message); if (goog.DEBUG && !COMPILED) { /** * @public * @override */ proto.tensorflow.NodeDef.displayName = 'proto.tensorflow.NodeDef'; } /** * Generated by JsPbCodeGenerator. * @param {Array=} opt_data Optional initial data array, typically from a * server response, or constructed directly in Javascript. The array is used * in place and becomes part of the constructed object. It is not cloned. * If no data is provided, the constructed object will be empty, but still * valid. * @extends {jspb.Message} * @constructor */ proto.tensorflow.VersionDef = function(opt_data) { jspb.Message.initialize(this, opt_data, 0, -1, proto.tensorflow.VersionDef.repeatedFields_, null); }; goog.inherits(proto.tensorflow.VersionDef, jspb.Message); if (goog.DEBUG && !COMPILED) { /** * @public * @override */ proto.tensorflow.VersionDef.displayName = 'proto.tensorflow.VersionDef'; } /** * Generated by JsPbCodeGenerator. * @param {Array=} opt_data Optional initial data array, typically from a * server response, or constructed directly in Javascript. The array is used * in place and becomes part of the constructed object. It is not cloned. * If no data is provided, the constructed object will be empty, but still * valid. * @extends {jspb.Message} * @constructor */ proto.tensorflow.GraphDef = function(opt_data) { jspb.Message.initialize(this, opt_data, 0, -1, proto.tensorflow.GraphDef.repeatedFields_, null); }; goog.inherits(proto.tensorflow.GraphDef, jspb.Message); if (goog.DEBUG && !COMPILED) { /** * @public * @override */ proto.tensorflow.GraphDef.displayName = 'proto.tensorflow.GraphDef'; } /** * Generated by JsPbCodeGenerator. * @param {Array=} opt_data Optional initial data array, typically from a * server response, or constructed directly in Javascript. The array is used * in place and becomes part of the constructed object. It is not cloned. * If no data is provided, the constructed object will be empty, but still * valid. * @extends {jspb.Message} * @constructor */ proto.tensorflow.CollectionDef = function(opt_data) { jspb.Message.initialize(this, opt_data, 0, -1, null, proto.tensorflow.CollectionDef.oneofGroups_); }; goog.inherits(proto.tensorflow.CollectionDef, jspb.Message); if (goog.DEBUG && !COMPILED) { /** * @public * @override */ proto.tensorflow.CollectionDef.displayName = 'proto.tensorflow.CollectionDef'; } /** * Generated by JsPbCodeGenerator. * @param {Array=} opt_data Optional initial data array, typically from a * server response, or constructed directly in Javascript. The array is used * in place and becomes part of the constructed object. It is not cloned. * If no data is provided, the constructed object will be empty, but still * valid. * @extends {jspb.Message} * @constructor */ proto.tensorflow.CollectionDef.NodeList = function(opt_data) { jspb.Message.initialize(this, opt_data, 0, -1, proto.tensorflow.CollectionDef.NodeList.repeatedFields_, null); }; goog.inherits(proto.tensorflow.CollectionDef.NodeList, jspb.Message); if (goog.DEBUG && !COMPILED) { /** * @public * @override */ proto.tensorflow.CollectionDef.NodeList.displayName = 'proto.tensorflow.CollectionDef.NodeList'; } /** * Generated by JsPbCodeGenerator. * @param {Array=} opt_data Optional initial data array, typically from a * server response, or constructed directly in Javascript. The array is used * in place and becomes part of the constructed object. It is not cloned. * If no data is provided, the constructed object will be empty, but still * valid. * @extends {jspb.Message} * @constructor */ proto.tensorflow.CollectionDef.BytesList = function(opt_data) { jspb.Message.initialize(this, opt_data, 0, -1, proto.tensorflow.CollectionDef.BytesList.repeatedFields_, null); }; goog.inherits(proto.tensorflow.CollectionDef.BytesList, jspb.Message); if (goog.DEBUG && !COMPILED) { /** * @public * @override */ proto.tensorflow.CollectionDef.BytesList.displayName = 'proto.tensorflow.CollectionDef.BytesList'; } /** * Generated by JsPbCodeGenerator. * @param {Array=} opt_data Optional initial data array, typically from a * server response, or constructed directly in Javascript. The array is used * in place and becomes part of the constructed object. It is not cloned. * If no data is provided, the constructed object will be empty, but still * valid. * @extends {jspb.Message} * @constructor */ proto.tensorflow.CollectionDef.Int64List = function(opt_data) { jspb.Message.initialize(this, opt_data, 0, -1, proto.tensorflow.CollectionDef.Int64List.repeatedFields_, null); }; goog.inherits(proto.tensorflow.CollectionDef.Int64List, jspb.Message); if (goog.DEBUG && !COMPILED) { /** * @public * @override */ proto.tensorflow.CollectionDef.Int64List.displayName = 'proto.tensorflow.CollectionDef.Int64List'; } /** * Generated by JsPbCodeGenerator. * @param {Array=} opt_data Optional initial data array, typically from a * server response, or constructed directly in Javascript. The array is used * in place and becomes part of the constructed object. It is not cloned. * If no data is provided, the constructed object will be empty, but still * valid. * @extends {jspb.Message} * @constructor */ proto.tensorflow.CollectionDef.FloatList = function(opt_data) { jspb.Message.initialize(this, opt_data, 0, -1, proto.tensorflow.CollectionDef.FloatList.repeatedFields_, null); }; goog.inherits(proto.tensorflow.CollectionDef.FloatList, jspb.Message); if (goog.DEBUG && !COMPILED) { /** * @public * @override */ proto.tensorflow.CollectionDef.FloatList.displayName = 'proto.tensorflow.CollectionDef.FloatList'; } /** * Generated by JsPbCodeGenerator. * @param {Array=} opt_data Optional initial data array, typically from a * server response, or constructed directly in Javascript. The array is used * in place and becomes part of the constructed object. It is not cloned. * If no data is provided, the constructed object will be empty, but still * valid. * @extends {jspb.Message} * @constructor */ proto.tensorflow.CollectionDef.AnyList = function(opt_data) { jspb.Message.initialize(this, opt_data, 0, -1, proto.tensorflow.CollectionDef.AnyList.repeatedFields_, null); }; goog.inherits(proto.tensorflow.CollectionDef.AnyList, jspb.Message); if (goog.DEBUG && !COMPILED) { /** * @public * @override */ proto.tensorflow.CollectionDef.AnyList.displayName = 'proto.tensorflow.CollectionDef.AnyList'; } /** * Generated by JsPbCodeGenerator. * @param {Array=} opt_data Optional initial data array, typically from a * server response, or constructed directly in Javascript. The array is used * in place and becomes part of the constructed object. It is not cloned. * If no data is provided, the constructed object will be empty, but still * valid. * @extends {jspb.Message} * @constructor */ proto.tensorflow.SaverDef = function(opt_data) { jspb.Message.initialize(this, opt_data, 0, -1, null, null); }; goog.inherits(proto.tensorflow.SaverDef, jspb.Message); if (goog.DEBUG && !COMPILED) { /** * @public * @override */ proto.tensorflow.SaverDef.displayName = 'proto.tensorflow.SaverDef'; } /** * Generated by JsPbCodeGenerator. * @param {Array=} opt_data Optional initial data array, typically from a * server response, or constructed directly in Javascript. The array is used * in place and becomes part of the constructed object. It is not cloned. * If no data is provided, the constructed object will be empty, but still * valid. * @extends {jspb.Message} * @constructor */ proto.tensorflow.TensorInfo = function(opt_data) { jspb.Message.initialize(this, opt_data, 0, -1, null, proto.tensorflow.TensorInfo.oneofGroups_); }; goog.inherits(proto.tensorflow.TensorInfo, jspb.Message); if (goog.DEBUG && !COMPILED) { /** * @public * @override */ proto.tensorflow.TensorInfo.displayName = 'proto.tensorflow.TensorInfo'; } /** * Generated by JsPbCodeGenerator. * @param {Array=} opt_data Optional initial data array, typically from a * server response, or constructed directly in Javascript. The array is used * in place and becomes part of the constructed object. It is not cloned. * If no data is provided, the constructed object will be empty, but still * valid. * @extends {jspb.Message} * @constructor */ proto.tensorflow.TensorInfo.CooSparse = function(opt_data) { jspb.Message.initialize(this, opt_data, 0, -1, null, null); }; goog.inherits(proto.tensorflow.TensorInfo.CooSparse, jspb.Message); if (goog.DEBUG && !COMPILED) { /** * @public * @override */ proto.tensorflow.TensorInfo.CooSparse.displayName = 'proto.tensorflow.TensorInfo.CooSparse'; } /** * Generated by JsPbCodeGenerator. * @param {Array=} opt_data Optional initial data array, typically from a * server response, or constructed directly in Javascript. The array is used * in place and becomes part of the constructed object. It is not cloned. * If no data is provided, the constructed object will be empty, but still * valid. * @extends {jspb.Message} * @constructor */ proto.tensorflow.SignatureDef = function(opt_data) { jspb.Message.initialize(this, opt_data, 0, -1, null, null); }; goog.inherits(proto.tensorflow.SignatureDef, jspb.Message); if (goog.DEBUG && !COMPILED) { /** * @public * @override */ proto.tensorflow.SignatureDef.displayName = 'proto.tensorflow.SignatureDef'; } /** * Generated by JsPbCodeGenerator. * @param {Array=} opt_data Optional initial data array, typically from a * server response, or constructed directly in Javascript. The array is used * in place and becomes part of the constructed object. It is not cloned. * If no data is provided, the constructed object will be empty, but still * valid. * @extends {jspb.Message} * @constructor */ proto.tensorflow.AssetFileDef = function(opt_data) { jspb.Message.initialize(this, opt_data, 0, -1, null, null); }; goog.inherits(proto.tensorflow.AssetFileDef, jspb.Message); if (goog.DEBUG && !COMPILED) { /** * @public * @override */ proto.tensorflow.AssetFileDef.displayName = 'proto.tensorflow.AssetFileDef'; } /** * Generated by JsPbCodeGenerator. * @param {Array=} opt_data Optional initial data array, typically from a * server response, or constructed directly in Javascript. The array is used * in place and becomes part of the constructed object. It is not cloned. * If no data is provided, the constructed object will be empty, but still * valid. * @extends {jspb.Message} * @constructor */ proto.tensorflow.OpDef = function(opt_data) { jspb.Message.initialize(this, opt_data, 0, -1, proto.tensorflow.OpDef.repeatedFields_, null); }; goog.inherits(proto.tensorflow.OpDef, jspb.Message); if (goog.DEBUG && !COMPILED) { /** * @public * @override */ proto.tensorflow.OpDef.displayName = 'proto.tensorflow.OpDef'; } /** * Generated by JsPbCodeGenerator. * @param {Array=} opt_data Optional initial data array, typically from a * server response, or constructed directly in Javascript. The array is used * in place and becomes part of the constructed object. It is not cloned. * If no data is provided, the constructed object will be empty, but still * valid. * @extends {jspb.Message} * @constructor */ proto.tensorflow.OpDef.ArgDef = function(opt_data) { jspb.Message.initialize(this, opt_data, 0, -1, null, null); }; goog.inherits(proto.tensorflow.OpDef.ArgDef, jspb.Message); if (goog.DEBUG && !COMPILED) { /** * @public * @override */ proto.tensorflow.OpDef.ArgDef.displayName = 'proto.tensorflow.OpDef.ArgDef'; } /** * Generated by JsPbCodeGenerator. * @param {Array=} opt_data Optional initial data array, typically from a * server response, or constructed directly in Javascript. The array is used * in place and becomes part of the constructed object. It is not cloned. * If no data is provided, the constructed object will be empty, but still * valid. * @extends {jspb.Message} * @constructor */ proto.tensorflow.OpDef.AttrDef = function(opt_data) { jspb.Message.initialize(this, opt_data, 0, -1, null, null); }; goog.inherits(proto.tensorflow.OpDef.AttrDef, jspb.Message); if (goog.DEBUG && !COMPILED) { /** * @public * @override */ proto.tensorflow.OpDef.AttrDef.displayName = 'proto.tensorflow.OpDef.AttrDef'; } /** * Generated by JsPbCodeGenerator. * @param {Array=} opt_data Optional initial data array, typically from a * server response, or constructed directly in Javascript. The array is used * in place and becomes part of the constructed object. It is not cloned. * If no data is provided, the constructed object will be empty, but still * valid. * @extends {jspb.Message} * @constructor */ proto.tensorflow.OpDef.OpDeprecation = function(opt_data) { jspb.Message.initialize(this, opt_data, 0, -1, null, null); }; goog.inherits(proto.tensorflow.OpDef.OpDeprecation, jspb.Message); if (goog.DEBUG && !COMPILED) { /** * @public * @override */ proto.tensorflow.OpDef.OpDeprecation.displayName = 'proto.tensorflow.OpDef.OpDeprecation'; } /** * Generated by JsPbCodeGenerator. * @param {Array=} opt_data Optional initial data array, typically from a * server response, or constructed directly in Javascript. The array is used * in place and becomes part of the constructed object. It is not cloned. * If no data is provided, the constructed object will be empty, but still * valid. * @extends {jspb.Message} * @constructor */ proto.tensorflow.OpList = function(opt_data) { jspb.Message.initialize(this, opt_data, 0, -1, proto.tensorflow.OpList.repeatedFields_, null); }; goog.inherits(proto.tensorflow.OpList, jspb.Message); if (goog.DEBUG && !COMPILED) { /** * @public * @override */ proto.tensorflow.OpList.displayName = 'proto.tensorflow.OpList'; } /** * Generated by JsPbCodeGenerator. * @param {Array=} opt_data Optional initial data array, typically from a * server response, or constructed directly in Javascript. The array is used * in place and becomes part of the constructed object. It is not cloned. * If no data is provided, the constructed object will be empty, but still * valid. * @extends {jspb.Message} * @constructor */ proto.tensorflow.MetaGraphDef = function(opt_data) { jspb.Message.initialize(this, opt_data, 0, -1, proto.tensorflow.MetaGraphDef.repeatedFields_, null); }; goog.inherits(proto.tensorflow.MetaGraphDef, jspb.Message); if (goog.DEBUG && !COMPILED) { /** * @public * @override */ proto.tensorflow.MetaGraphDef.displayName = 'proto.tensorflow.MetaGraphDef'; } /** * Generated by JsPbCodeGenerator. * @param {Array=} opt_data Optional initial data array, typically from a * server response, or constructed directly in Javascript. The array is used * in place and becomes part of the constructed object. It is not cloned. * If no data is provided, the constructed object will be empty, but still * valid. * @extends {jspb.Message} * @constructor */ proto.tensorflow.MetaGraphDef.MetaInfoDef = function(opt_data) { jspb.Message.initialize(this, opt_data, 0, -1, proto.tensorflow.MetaGraphDef.MetaInfoDef.repeatedFields_, null); }; goog.inherits(proto.tensorflow.MetaGraphDef.MetaInfoDef, jspb.Message); if (goog.DEBUG && !COMPILED) { /** * @public * @override */ proto.tensorflow.MetaGraphDef.MetaInfoDef.displayName = 'proto.tensorflow.MetaGraphDef.MetaInfoDef'; } /** * Generated by JsPbCodeGenerator. * @param {Array=} opt_data Optional initial data array, typically from a * server response, or constructed directly in Javascript. The array is used * in place and becomes part of the constructed object. It is not cloned. * If no data is provided, the constructed object will be empty, but still * valid. * @extends {jspb.Message} * @constructor */ proto.tensorflow.SavedModel = function(opt_data) { jspb.Message.initialize(this, opt_data, 0, -1, proto.tensorflow.SavedModel.repeatedFields_, null); }; goog.inherits(proto.tensorflow.SavedModel, jspb.Message); if (goog.DEBUG && !COMPILED) { /** * @public * @override */ proto.tensorflow.SavedModel.displayName = 'proto.tensorflow.SavedModel'; } /** * Generated by JsPbCodeGenerator. * @param {Array=} opt_data Optional initial data array, typically from a * server response, or constructed directly in Javascript. The array is used * in place and becomes part of the constructed object. It is not cloned. * If no data is provided, the constructed object will be empty, but still * valid. * @extends {jspb.Message} * @constructor */ proto.tensorflow.FunctionDefLibrary = function(opt_data) { jspb.Message.initialize(this, opt_data, 0, -1, proto.tensorflow.FunctionDefLibrary.repeatedFields_, null); }; goog.inherits(proto.tensorflow.FunctionDefLibrary, jspb.Message); if (goog.DEBUG && !COMPILED) { /** * @public * @override */ proto.tensorflow.FunctionDefLibrary.displayName = 'proto.tensorflow.FunctionDefLibrary'; } /** * Generated by JsPbCodeGenerator. * @param {Array=} opt_data Optional initial data array, typically from a * server response, or constructed directly in Javascript. The array is used * in place and becomes part of the constructed object. It is not cloned. * If no data is provided, the constructed object will be empty, but still * valid. * @extends {jspb.Message} * @constructor */ proto.tensorflow.FunctionDef = function(opt_data) { jspb.Message.initialize(this, opt_data, 0, -1, proto.tensorflow.FunctionDef.repeatedFields_, null); }; goog.inherits(proto.tensorflow.FunctionDef, jspb.Message); if (goog.DEBUG && !COMPILED) { /** * @public * @override */ proto.tensorflow.FunctionDef.displayName = 'proto.tensorflow.FunctionDef'; } /** * Generated by JsPbCodeGenerator. * @param {Array=} opt_data Optional initial data array, typically from a * server response, or constructed directly in Javascript. The array is used * in place and becomes part of the constructed object. It is not cloned. * If no data is provided, the constructed object will be empty, but still * valid. * @extends {jspb.Message} * @constructor */ proto.tensorflow.GradientDef = function(opt_data) { jspb.Message.initialize(this, opt_data, 0, -1, null, null); }; goog.inherits(proto.tensorflow.GradientDef, jspb.Message); if (goog.DEBUG && !COMPILED) { /** * @public * @override */ proto.tensorflow.GradientDef.displayName = 'proto.tensorflow.GradientDef'; } if (jspb.Message.GENERATE_TO_OBJECT) { /** * Creates an object representation of this proto. * Field names that are reserved in JavaScript and will be renamed to pb_name. * Optional fields that are not set will be set to undefined. * To access a reserved field use, foo.pb_<name>, eg, foo.pb_default. * For the list of reserved names please see: * net/proto2/compiler/js/internal/generator.cc#kKeyword. * @param {boolean=} opt_includeInstance Deprecated. whether to include the * JSPB instance for transitional soy proto support: * http://goto/soy-param-migration * @return {!Object} */ proto.tensorflow.Any.prototype.toObject = function(opt_includeInstance) { return proto.tensorflow.Any.toObject(opt_includeInstance, this); }; /** * Static version of the {@see toObject} method. * @param {boolean|undefined} includeInstance Deprecated. Whether to include * the JSPB instance for transitional soy proto support: * http://goto/soy-param-migration * @param {!proto.tensorflow.Any} msg The msg instance to transform. * @return {!Object} * @suppress {unusedLocalVariables} f is only used for nested messages */ proto.tensorflow.Any.toObject = function(includeInstance, msg) { var f, obj = { typeUrl: jspb.Message.getFieldWithDefault(msg, 1, ""), value: msg.getValue_asB64() }; if (includeInstance) { obj.$jspbMessageInstance = msg; } return obj; }; } /** * Deserializes binary data (in protobuf wire format). * @param {jspb.ByteSource} bytes The bytes to deserialize. * @return {!proto.tensorflow.Any} */ proto.tensorflow.Any.deserializeBinary = function(bytes) { var reader = new jspb.BinaryReader(bytes); var msg = new proto.tensorflow.Any; return proto.tensorflow.Any.deserializeBinaryFromReader(msg, reader); }; /** * Deserializes binary data (in protobuf wire format) from the * given reader into the given message object. * @param {!proto.tensorflow.Any} msg The message object to deserialize into. * @param {!jspb.BinaryReader} reader The BinaryReader to use. * @return {!proto.tensorflow.Any} */ proto.tensorflow.Any.deserializeBinaryFromReader = function(msg, reader) { while (reader.nextField()) { if (reader.isEndGroup()) { break; } var field = reader.getFieldNumber(); switch (field) { case 1: var value = /** @type {string} */ (reader.readString()); msg.setTypeUrl(value); break; case 2: var value = /** @type {!Uint8Array} */ (reader.readBytes()); msg.setValue(value); break; default: reader.skipField(); break; } } return msg; }; /** * Serializes the message to binary data (in protobuf wire format). * @return {!Uint8Array} */ proto.tensorflow.Any.prototype.serializeBinary = function() { var writer = new jspb.BinaryWriter(); proto.tensorflow.Any.serializeBinaryToWriter(this, writer); return writer.getResultBuffer(); }; /** * Serializes the given message to binary data (in protobuf wire * format), writing to the given BinaryWriter. * @param {!proto.tensorflow.Any} message * @param {!jspb.BinaryWriter} writer * @suppress {unusedLocalVariables} f is only used for nested messages */ proto.tensorflow.Any.serializeBinaryToWriter = function(message, writer) { var f = undefined; f = message.getTypeUrl(); if (f.length > 0) { writer.writeString( 1, f ); } f = message.getValue_asU8(); if (f.length > 0) { writer.writeBytes( 2, f ); } }; /** * optional string type_url = 1; * @return {string} */ proto.tensorflow.Any.prototype.getTypeUrl = function() { return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); }; /** @param {string} value */ proto.tensorflow.Any.prototype.setTypeUrl = function(value) { jspb.Message.setProto3StringField(this, 1, value); }; /** * optional bytes value = 2; * @return {!(string|Uint8Array)} */ proto.tensorflow.Any.prototype.getValue = function() { return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 2, "")); }; /** * optional bytes value = 2; * This is a type-conversion wrapper around `getValue()` * @return {string} */ proto.tensorflow.Any.prototype.getValue_asB64 = function() { return /** @type {string} */ (jspb.Message.bytesAsB64( this.getValue())); }; /** * optional bytes value = 2; * Note that Uint8Array is not supported on all browsers. * @see http://caniuse.com/Uint8Array * This is a type-conversion wrapper around `getValue()` * @return {!Uint8Array} */ proto.tensorflow.Any.prototype.getValue_asU8 = function() { return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( this.getValue())); }; /** @param {!(string|Uint8Array)} value */ proto.tensorflow.Any.prototype.setValue = function(value) { jspb.Message.setProto3BytesField(this, 2, value); }; /** * List of repeated fields within this message type. * @private {!Array<number>} * @const */ proto.tensorflow.TensorShape.repeatedFields_ = [2]; if (jspb.Message.GENERATE_TO_OBJECT) { /** * Creates an object representation of this proto. * Field names that are reserved in JavaScript and will be renamed to pb_name. * Optional fields that are not set will be set to undefined. * To access a reserved field use, foo.pb_<name>, eg, foo.pb_default. * For the list of reserved names please see: * net/proto2/compiler/js/internal/generator.cc#kKeyword. * @param {boolean=} opt_includeInstance Deprecated. whether to include the * JSPB instance for transitional soy proto support: * http://goto/soy-param-migration * @return {!Object} */ proto.tensorflow.TensorShape.prototype.toObject = function(opt_includeInstance) { return proto.tensorflow.TensorShape.toObject(opt_includeInstance, this); }; /** * Static version of the {@see toObject} method. * @param {boolean|undefined} includeInstance Deprecated. Whether to include * the JSPB instance for transitional soy proto support: * http://goto/soy-param-migration * @param {!proto.tensorflow.TensorShape} msg The msg instance to transform. * @return {!Object} * @suppress {unusedLocalVariables} f is only used for nested messages */ proto.tensorflow.TensorShape.toObject = function(includeInstance, msg) { var f, obj = { dimList: jspb.Message.toObjectList(msg.getDimList(), proto.tensorflow.TensorShape.Dim.toObject, includeInstance), unknownRank: jspb.Message.getBooleanFieldWithDefault(msg, 3, false) }; if (includeInstance) { obj.$jspbMessageInstance = msg; } return obj; }; } /** * Deserializes binary data (in protobuf wire format). * @param {jspb.ByteSource} bytes The bytes to deserialize. * @return {!proto.tensorflow.TensorShape} */ proto.tensorflow.TensorShape.deserializeBinary = function(bytes) { var reader = new jspb.BinaryReader(bytes); var msg = new proto.tensorflow.TensorShape; return proto.tensorflow.TensorShape.deserializeBinaryFromReader(msg, reader); }; /** * Deserializes binary data (in protobuf wire format) from the * given reader into the given message object. * @param {!proto.tensorflow.TensorShape} msg The message object to deserialize into. * @param {!jspb.BinaryReader} reader The BinaryReader to use. * @return {!proto.tensorflow.TensorShape} */ proto.tensorflow.TensorShape.deserializeBinaryFromReader = function(msg, reader) { while (reader.nextField()) { if (reader.isEndGroup()) { break; } var field = reader.getFieldNumber(); switch (field) { case 2: var value = new proto.tensorflow.TensorShape.Dim; reader.readMessage(value,proto.tensorflow.TensorShape.Dim.deserializeBinaryFromReader); msg.addDim(value); break; case 3: var value = /** @type {boolean} */ (reader.readBool()); msg.setUnknownRank(value); break; default: reader.skipField(); break; } } return msg; }; /** * Serializes the message to binary data (in protobuf wire format). * @return {!Uint8Array} */ proto.tensorflow.TensorShape.prototype.serializeBinary = function() { var writer = new jspb.BinaryWriter(); proto.tensorflow.TensorShape.serializeBinaryToWriter(this, writer); return writer.getResultBuffer(); }; /** * Serializes the given message to binary data (in protobuf wire * format), writing to the given BinaryWriter. * @param {!proto.tensorflow.TensorShape} message * @param {!jspb.BinaryWriter} writer * @suppress {unusedLocalVariables} f is only used for nested messages */ proto.tensorflow.TensorShape.serializeBinaryToWriter = function(message, writer) { var f = undefined; f = message.getDimList(); if (f.length > 0) { writer.writeRepeatedMessage( 2, f, proto.tensorflow.TensorShape.Dim.serializeBinaryToWriter ); } f = message.getUnknownRank(); if (f) { writer.writeBool( 3, f ); } }; if (jspb.Message.GENERATE_TO_OBJECT) { /** * Creates an object representation of this proto. * Field names that are reserved in JavaScript and will be renamed to pb_name. * Optional fields that are not set will be set to undefined. * To access a reserved field use, foo.pb_<name>, eg, foo.pb_default. * For the list of reserved names please see: * net/proto2/compiler/js/internal/generator.cc#kKeyword. * @param {boolean=} opt_includeInstance Deprecated. whether to include the * JSPB instance for transitional soy proto support: * http://goto/soy-param-migration * @return {!Object} */ proto.tensorflow.TensorShape.Dim.prototype.toObject = function(opt_includeInstance) { return proto.tensorflow.TensorShape.Dim.toObject(opt_includeInstance, this); }; /** * Static version of the {@see toObject} method. * @param {boolean|undefined} includeInstance Deprecated. Whether to include * the JSPB instance for transitional soy proto support: * http://goto/soy-param-migration * @param {!proto.tensorflow.TensorShape.Dim} msg The msg instance to transform. * @return {!Object} * @suppress {unusedLocalVariables} f is only used for nested messages */ proto.tensorflow.TensorShape.Dim.toObject = function(includeInstance, msg) { var f, obj = { size: jspb.Message.getFieldWithDefault(msg, 1, 0), name: jspb.Message.getFieldWithDefault(msg, 2, "") }; if (includeInstance) { obj.$jspbMessageInstance = msg; } return obj; }; } /** * Deserializes binary data (in protobuf wire format). * @param {jspb.ByteSource} bytes The bytes to deserialize. * @return {!proto.tensorflow.TensorShape.Dim} */ proto.tensorflow.TensorShape.Dim.deserializeBinary = function(bytes) { var reader = new jspb.BinaryReader(bytes); var msg = new proto.tensorflow.TensorShape.Dim; return proto.tensorflow.TensorShape.Dim.deserializeBinaryFromReader(msg, reader); }; /** * Deserializes binary data (in protobuf wire format) from the * given reader into the given message object. * @param {!proto.tensorflow.TensorShape.Dim} msg The message object to deserialize into. * @param {!jspb.BinaryReader} reader The BinaryReader to use. * @return {!proto.tensorflow.TensorShape.Dim} */ proto.tensorflow.TensorShape.Dim.deserializeBinaryFromReader = function(msg, reader) { while (reader.nextField()) { if (reader.isEndGroup()) { break; } var field = reader.getFieldNumber(); switch (field) { case 1: var value = /** @type {number} */ (reader.readInt64()); msg.setSize(value); break; case 2: var value = /** @type {string} */ (reader.readString()); msg.setName(value); break; default: reader.skipField(); break; } } return msg; }; /** * Serializes the message to binary data (in protobuf wire format). * @return {!Uint8Array} */ proto.tensorflow.TensorShape.Dim.prototype.serializeBinary = function() { var writer = new jspb.BinaryWriter(); proto.tensorflow.TensorShape.Dim.serializeBinaryToWriter(this, writer); return writer.getResultBuffer(); }; /** * Serializes the given message to binary data (in protobuf wire * format), writing to the given BinaryWriter. * @param {!proto.tensorflow.TensorShape.Dim} message * @param {!jspb.BinaryWriter} writer * @suppress {unusedLocalVariables} f is only used for nested messages */ proto.tensorflow.TensorShape.Dim.serializeBinaryToWriter = function(message, writer) { var f = undefined; f = message.getSize(); if (f !== 0) { writer.writeInt64( 1, f ); } f = message.getName(); if (f.length > 0) { writer.writeString( 2, f ); } }; /** * optional int64 size = 1; * @return {number} */ proto.tensorflow.TensorShape.Dim.prototype.getSize = function() { return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 1, 0)); }; /** @param {number} value */ proto.tensorflow.TensorShape.Dim.prototype.setSize = function(value) { jspb.Message.setProto3IntField(this, 1, value); }; /** * optional string name = 2; * @return {string} */ proto.tensorflow.TensorShape.Dim.prototype.getName = function() { return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); }; /** @param {string} value */ proto.tensorflow.TensorShape.Dim.prototype.setName = function(value) { jspb.Message.setProto3StringField(this, 2, value); }; /** * repeated Dim dim = 2; * @return {!Array<!proto.tensorflow.TensorShape.Dim>} */ proto.tensorflow.TensorShape.prototype.getDimList = function() { return /** @type{!Array<!proto.tensorflow.TensorShape.Dim>} */ ( jspb.Message.getRepeatedWrapperField(this, proto.tensorflow.TensorShape.Dim, 2)); }; /** @param {!Array<!proto.tensorflow.TensorShape.Dim>} value */ proto.tensorflow.TensorShape.prototype.setDimList = function(value) { jspb.Message.setRepeatedWrapperField(this, 2, value); }; /** * @param {!proto.tensorflow.TensorShape.Dim=} opt_value * @param {number=} opt_index * @return {!proto.tensorflow.TensorShape.Dim} */ proto.tensorflow.TensorShape.prototype.addDim = function(opt_value, opt_index) { return jspb.Message.addToRepeatedWrapperField(this, 2, opt_value, proto.tensorflow.TensorShape.Dim, opt_index); }; /** * Clears the list making it empty but non-null. */ proto.tensorflow.TensorShape.prototype.clearDimList = function() { this.setDimList([]); }; /** * optional bool unknown_rank = 3; * @return {boolean} */ proto.tensorflow.TensorShape.prototype.getUnknownRank = function() { return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 3, false)); }; /** @param {boolean} value */ proto.tensorflow.TensorShape.prototype.setUnknownRank = function(value) { jspb.Message.setProto3BooleanField(this, 3, value); }; /** * List of repeated fields within this message type. * @private {!Array<number>} * @const */ proto.tensorflow.Tensor.repeatedFields_ = [5,6,7,8,9,10,11,16,17]; if (jspb.Message.GENERATE_TO_OBJECT) { /** * Creates an object representation of this proto. * Field names that are reserved in JavaScript and will be renamed to pb_name. * Optional fields that are not set will be set to undefined. * To access a reserved field use, foo.pb_<name>, eg, foo.pb_default. * For the list of reserved names please see: * net/proto2/compiler/js/internal/generator.cc#kKeyword. * @param {boolean=} opt_includeInstance Deprecated. whether to include the * JSPB instance for transitional soy proto support: * http://goto/soy-param-migration * @return {!Object} */ proto.tensorflow.Tensor.prototype.toObject = function(opt_includeInstance) { return proto.tensorflow.Tensor.toObject(opt_includeInstance, this); }; /** * Static version of the {@see toObject} method. * @param {boolean|undefined} includeInstance Deprecated. Whether to include * the JSPB instance for transitional soy proto support: * http://goto/soy-param-migration * @param {!proto.tensorflow.Tensor} msg The msg instance to transform. * @return {!Object} * @suppress {unusedLocalVariables} f is only used for nested messages */ proto.tensorflow.Tensor.toObject = function(includeInstance, msg) { var f, obj = { dtype: jspb.Message.getFieldWithDefault(msg, 1, 0), tensorShape: (f = msg.getTensorShape()) && proto.tensorflow.TensorShape.toObject(includeInstance, f), versionNumber: jspb.Message.getFieldWithDefault(msg, 3, 0), tensorContent: msg.getTensorContent_asB64(), floatValList: (f = jspb.Message.getRepeatedFloatingPointField(msg, 5)) == null ? undefined : f, doubleValList: (f = jspb.Message.getRepeatedFloatingPointField(msg, 6)) == null ? undefined : f, intValList: (f = jspb.Message.getRepeatedField(msg, 7)) == null ? undefined : f, stringValList: msg.getStringValList_asB64(), scomplexValList: (f = jspb.Message.getRepeatedFloatingPointField(msg, 9)) == null ? undefined : f, int64ValList: (f = jspb.Message.getRepeatedField(msg, 10)) == null ? undefined : f, boolValList: (f = jspb.Message.getRepeatedBooleanField(msg, 11)) == null ? undefined : f, uint32ValList: (f = jspb.Message.getRepeatedField(msg, 16)) == null ? undefined : f, uint64ValList: (f = jspb.Message.getRepeatedField(msg, 17)) == null ? undefined : f }; if (includeInstance) { obj.$jspbMessageInstance = msg; } return obj; }; } /** * Deserializes binary data (in protobuf wire format). * @param {jspb.ByteSource} bytes The bytes to deserialize. * @return {!proto.tensorflow.Tensor} */ proto.tensorflow.Tensor.deserializeBinary = function(bytes) { var reader = new jspb.BinaryReader(bytes); var msg = new proto.tensorflow.Tensor; return proto.tensorflow.Tensor.deserializeBinaryFromReader(msg, reader); }; /** * Deserializes binary data (in protobuf wire format) from the * given reader into the given message object. * @param {!proto.tensorflow.Tensor} msg The message object to deserialize into. * @param {!jspb.BinaryReader} reader The BinaryReader to use. * @return {!proto.tensorflow.Tensor} */ proto.tensorflow.Tensor.deserializeBinaryFromReader = function(msg, reader) { while (reader.nextField()) { if (reader.isEndGroup()) { break; } var field = reader.getFieldNumber(); switch (field) { case 1: var value = /** @type {!proto.tensorflow.DataType} */ (reader.readEnum()); msg.setDtype(value); break; case 2: var value = new proto.tensorflow.TensorShape; reader.readMessage(value,proto.tensorflow.TensorShape.deserializeBinaryFromReader); msg.setTensorShape(value); break; case 3: var value = /** @type {number} */ (reader.readInt32()); msg.setVersionNumber(value); break; case 4: var value = /** @type {!Uint8Array} */ (reader.readBytes()); msg.setTensorContent(value); break; case 5: var value = /** @type {!Array<number>} */ (reader.readPackedFloat()); msg.setFloatValList(value); break; case 6: var value = /** @type {!Array<number>} */ (reader.readPackedDouble()); msg.setDoubleValList(value); break; case 7: var value = /** @type {!Array<number>} */ (reader.readPackedInt32()); msg.setIntValList(value); break; case 8: var value = /** @type {!Uint8Array} */ (reader.readBytes()); msg.addStringVal(value); break; case 9: var value = /** @type {!Array<number>} */ (reader.readPackedFloat()); msg.setScomplexValList(value); break; case 10: var value = /** @type {!Array<number>} */ (reader.readPackedInt64()); msg.setInt64ValList(value); break; case 11: var value = /** @type {!Array<boolean>} */ (reader.readPackedBool()); msg.setBoolValList(value); break; case 16: var value = /** @type {!Array<number>} */ (reader.readPackedUint32()); msg.setUint32ValList(value); break; case 17: var value = /** @type {!Array<number>} */ (reader.readPackedUint64()); msg.setUint64ValList(value); break; default: reader.skipField(); break; } } return msg; }; /** * Serializes the message to binary data (in protobuf wire format). * @return {!Uint8Array} */ proto.tensorflow.Tensor.prototype.serializeBinary = function() { var writer = new jspb.BinaryWriter(); proto.tensorflow.Tensor.serializeBinaryToWriter(this, writer); return writer.getResultBuffer(); }; /** * Serializes the given message to binary data (in protobuf wire * format), writing to the given BinaryWriter. * @param {!proto.tensorflow.Tensor} message * @param {!jspb.BinaryWriter} writer * @suppress {unusedLocalVariables} f is only used for nested messages */ proto.tensorflow.Tensor.serializeBinaryToWriter = function(message, writer) { var f = undefined; f = message.getDtype(); if (f !== 0.0) { writer.writeEnum( 1, f ); } f = message.getTensorShape(); if (f != null) { writer.writeMessage( 2, f, proto.tensorflow.TensorShape.serializeBinaryToWriter ); } f = message.getVersionNumber(); if (f !== 0) { writer.writeInt32( 3, f ); } f = message.getTensorContent_asU8(); if (f.length > 0) { writer.writeBytes( 4, f ); } f = message.getFloatValList(); if (f.length > 0) { writer.writePackedFloat( 5, f ); } f = message.getDoubleValList(); if (f.length > 0) { writer.writePackedDouble( 6, f ); } f = message.getIntValList(); if (f.length > 0) { writer.writePackedInt32( 7, f ); } f = message.getStringValList_asU8(); if (f.length > 0) { writer.writeRepeatedBytes( 8, f ); } f = message.getScomplexValList(); if (f.length > 0) { writer.writePackedFloat( 9, f ); } f = message.getInt64ValList(); if (f.length > 0) { writer.writePackedInt64( 10, f ); } f = message.getBoolValList(); if (f.length > 0) { writer.writePackedBool( 11, f ); } f = message.getUint32ValList(); if (f.length > 0) { writer.writePackedUint32( 16, f ); } f = message.getUint64ValList(); if (f.length > 0) { writer.writePackedUint64( 17, f ); } }; /** * optional DataType dtype = 1; * @return {!proto.tensorflow.DataType} */ proto.tensorflow.Tensor.prototype.getDtype = function() { return /** @type {!proto.tensorflow.DataType} */ (jspb.Message.getFieldWithDefault(this, 1, 0)); }; /** @param {!proto.tensorflow.DataType} value */ proto.tensorflow.Tensor.prototype.setDtype = function(value) { jspb.Message.setProto3EnumField(this, 1, value); }; /** * optional TensorShape tensor_shape = 2; * @return {?proto.tensorflow.TensorShape} */ proto.tensorflow.Tensor.prototype.getTensorShape = functio