You can not select more than 25 topics Topics must start with a chinese character,a letter or number, can include dashes ('-') and can be up to 35 characters long.

SavedObjectGraph.cs 113 kB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327132813291330133113321333133413351336133713381339134013411342134313441345134613471348134913501351135213531354135513561357135813591360136113621363136413651366136713681369137013711372137313741375137613771378137913801381138213831384138513861387138813891390139113921393139413951396139713981399140014011402140314041405140614071408140914101411141214131414141514161417141814191420142114221423142414251426142714281429143014311432143314341435143614371438143914401441144214431444144514461447144814491450145114521453145414551456145714581459146014611462146314641465146614671468146914701471147214731474147514761477147814791480148114821483148414851486148714881489149014911492149314941495149614971498149915001501150215031504150515061507150815091510151115121513151415151516151715181519152015211522152315241525152615271528152915301531153215331534153515361537153815391540154115421543154415451546154715481549155015511552155315541555155615571558155915601561156215631564156515661567156815691570157115721573157415751576157715781579158015811582158315841585158615871588158915901591159215931594159515961597159815991600160116021603160416051606160716081609161016111612161316141615161616171618161916201621162216231624162516261627162816291630163116321633163416351636163716381639164016411642164316441645164616471648164916501651165216531654165516561657165816591660166116621663166416651666166716681669167016711672167316741675167616771678167916801681168216831684168516861687168816891690169116921693169416951696169716981699170017011702170317041705170617071708170917101711171217131714171517161717171817191720172117221723172417251726172717281729173017311732173317341735173617371738173917401741174217431744174517461747174817491750175117521753175417551756175717581759176017611762176317641765176617671768176917701771177217731774177517761777177817791780178117821783178417851786178717881789179017911792179317941795179617971798179918001801180218031804180518061807180818091810181118121813181418151816181718181819182018211822182318241825182618271828182918301831183218331834183518361837183818391840184118421843184418451846184718481849185018511852185318541855185618571858185918601861186218631864186518661867186818691870187118721873187418751876187718781879188018811882188318841885188618871888188918901891189218931894189518961897189818991900190119021903190419051906190719081909191019111912191319141915191619171918191919201921192219231924192519261927192819291930193119321933193419351936193719381939194019411942194319441945194619471948194919501951195219531954195519561957195819591960196119621963196419651966196719681969197019711972197319741975197619771978197919801981198219831984198519861987198819891990199119921993199419951996199719981999200020012002200320042005200620072008200920102011201220132014201520162017201820192020202120222023202420252026202720282029203020312032203320342035203620372038203920402041204220432044204520462047204820492050205120522053205420552056205720582059206020612062206320642065206620672068206920702071207220732074207520762077207820792080208120822083208420852086208720882089209020912092209320942095209620972098209921002101210221032104210521062107210821092110211121122113211421152116211721182119212021212122212321242125212621272128212921302131213221332134213521362137213821392140214121422143214421452146214721482149215021512152215321542155215621572158215921602161216221632164216521662167216821692170217121722173217421752176217721782179218021812182218321842185218621872188218921902191219221932194219521962197219821992200220122022203220422052206220722082209221022112212221322142215221622172218221922202221222222232224222522262227222822292230223122322233223422352236223722382239224022412242224322442245224622472248224922502251225222532254225522562257225822592260226122622263226422652266226722682269227022712272227322742275227622772278227922802281228222832284228522862287228822892290229122922293229422952296229722982299230023012302230323042305230623072308230923102311231223132314231523162317231823192320232123222323232423252326232723282329233023312332233323342335233623372338233923402341234223432344234523462347234823492350235123522353235423552356235723582359236023612362236323642365236623672368236923702371237223732374237523762377237823792380238123822383238423852386238723882389239023912392239323942395239623972398239924002401240224032404240524062407240824092410241124122413241424152416241724182419242024212422242324242425242624272428242924302431243224332434243524362437243824392440244124422443244424452446244724482449245024512452245324542455245624572458245924602461246224632464246524662467246824692470247124722473247424752476247724782479248024812482248324842485248624872488248924902491249224932494249524962497249824992500250125022503250425052506250725082509251025112512251325142515251625172518251925202521252225232524252525262527252825292530253125322533253425352536253725382539254025412542254325442545254625472548254925502551255225532554255525562557255825592560256125622563256425652566256725682569257025712572257325742575257625772578257925802581258225832584258525862587258825892590259125922593259425952596259725982599260026012602260326042605260626072608260926102611261226132614261526162617261826192620262126222623262426252626262726282629263026312632263326342635263626372638263926402641264226432644264526462647264826492650265126522653265426552656265726582659266026612662266326642665266626672668266926702671267226732674267526762677267826792680268126822683268426852686268726882689269026912692269326942695269626972698269927002701270227032704270527062707270827092710271127122713271427152716271727182719272027212722272327242725272627272728272927302731273227332734273527362737273827392740274127422743274427452746274727482749275027512752275327542755275627572758275927602761276227632764276527662767276827692770277127722773277427752776277727782779278027812782278327842785278627872788278927902791279227932794279527962797279827992800280128022803280428052806280728082809281028112812281328142815281628172818281928202821282228232824282528262827282828292830283128322833283428352836283728382839284028412842284328442845284628472848284928502851285228532854285528562857285828592860286128622863286428652866286728682869287028712872287328742875287628772878287928802881288228832884288528862887288828892890289128922893289428952896289728982899290029012902290329042905290629072908290929102911291229132914291529162917291829192920
  1. // <auto-generated>
  2. // Generated by the protocol buffer compiler. DO NOT EDIT!
  3. // source: tensorflow/core/protobuf/saved_object_graph.proto
  4. // </auto-generated>
  5. #pragma warning disable 1591, 0612, 3021
  6. #region Designer generated code
  7. using pb = global::Google.Protobuf;
  8. using pbc = global::Google.Protobuf.Collections;
  9. using pbr = global::Google.Protobuf.Reflection;
  10. using scg = global::System.Collections.Generic;
  11. namespace Tensorflow {
  12. /// <summary>Holder for reflection information generated from tensorflow/core/protobuf/saved_object_graph.proto</summary>
  13. public static partial class SavedObjectGraphReflection {
  14. #region Descriptor
  15. /// <summary>File descriptor for tensorflow/core/protobuf/saved_object_graph.proto</summary>
  16. public static pbr::FileDescriptor Descriptor {
  17. get { return descriptor; }
  18. }
  19. private static pbr::FileDescriptor descriptor;
  20. static SavedObjectGraphReflection() {
  21. byte[] descriptorData = global::System.Convert.FromBase64String(
  22. string.Concat(
  23. "CjF0ZW5zb3JmbG93L2NvcmUvcHJvdG9idWYvc2F2ZWRfb2JqZWN0X2dyYXBo",
  24. "LnByb3RvEgp0ZW5zb3JmbG93Gix0ZW5zb3JmbG93L2NvcmUvZnJhbWV3b3Jr",
  25. "L3RlbnNvcl9zaGFwZS5wcm90bxoldGVuc29yZmxvdy9jb3JlL2ZyYW1ld29y",
  26. "ay90eXBlcy5wcm90bxoodGVuc29yZmxvdy9jb3JlL2ZyYW1ld29yay92YXJp",
  27. "YWJsZS5wcm90bxoodGVuc29yZmxvdy9jb3JlL2ZyYW1ld29yay92ZXJzaW9u",
  28. "cy5wcm90bxoldGVuc29yZmxvdy9jb3JlL3Byb3RvYnVmL3N0cnVjdC5wcm90",
  29. "bxo1dGVuc29yZmxvdy9jb3JlL3Byb3RvYnVmL3RyYWNrYWJsZV9vYmplY3Rf",
  30. "Z3JhcGgucHJvdG8i6AEKEFNhdmVkT2JqZWN0R3JhcGgSJgoFbm9kZXMYASAD",
  31. "KAsyFy50ZW5zb3JmbG93LlNhdmVkT2JqZWN0Ek8KEmNvbmNyZXRlX2Z1bmN0",
  32. "aW9ucxgCIAMoCzIzLnRlbnNvcmZsb3cuU2F2ZWRPYmplY3RHcmFwaC5Db25j",
  33. "cmV0ZUZ1bmN0aW9uc0VudHJ5GlsKFkNvbmNyZXRlRnVuY3Rpb25zRW50cnkS",
  34. "CwoDa2V5GAEgASgJEjAKBXZhbHVlGAIgASgLMiEudGVuc29yZmxvdy5TYXZl",
  35. "ZENvbmNyZXRlRnVuY3Rpb246AjgBIpAGCgtTYXZlZE9iamVjdBJSCghjaGls",
  36. "ZHJlbhgBIAMoCzJALnRlbnNvcmZsb3cuVHJhY2thYmxlT2JqZWN0R3JhcGgu",
  37. "VHJhY2thYmxlT2JqZWN0Lk9iamVjdFJlZmVyZW5jZRJeCg5zbG90X3Zhcmlh",
  38. "YmxlcxgDIAMoCzJGLnRlbnNvcmZsb3cuVHJhY2thYmxlT2JqZWN0R3JhcGgu",
  39. "VHJhY2thYmxlT2JqZWN0LlNsb3RWYXJpYWJsZVJlZmVyZW5jZRIyCgt1c2Vy",
  40. "X29iamVjdBgEIAEoCzIbLnRlbnNvcmZsb3cuU2F2ZWRVc2VyT2JqZWN0SAAS",
  41. "JwoFYXNzZXQYBSABKAsyFi50ZW5zb3JmbG93LlNhdmVkQXNzZXRIABItCghm",
  42. "dW5jdGlvbhgGIAEoCzIZLnRlbnNvcmZsb3cuU2F2ZWRGdW5jdGlvbkgAEi0K",
  43. "CHZhcmlhYmxlGAcgASgLMhkudGVuc29yZmxvdy5TYXZlZFZhcmlhYmxlSAAS",
  44. "RwoWYmFyZV9jb25jcmV0ZV9mdW5jdGlvbhgIIAEoCzIlLnRlbnNvcmZsb3cu",
  45. "U2F2ZWRCYXJlQ29uY3JldGVGdW5jdGlvbkgAEi0KCGNvbnN0YW50GAkgASgL",
  46. "MhkudGVuc29yZmxvdy5TYXZlZENvbnN0YW50SAASLQoIcmVzb3VyY2UYCiAB",
  47. "KAsyGS50ZW5zb3JmbG93LlNhdmVkUmVzb3VyY2VIABI1Cg9jYXB0dXJlZF90",
  48. "ZW5zb3IYDCABKAsyGi50ZW5zb3JmbG93LkNhcHR1cmVkVGVuc29ySAASRgoQ",
  49. "c2F2ZWFibGVfb2JqZWN0cxgLIAMoCzIsLnRlbnNvcmZsb3cuU2F2ZWRPYmpl",
  50. "Y3QuU2F2ZWFibGVPYmplY3RzRW50cnkaUgoUU2F2ZWFibGVPYmplY3RzRW50",
  51. "cnkSCwoDa2V5GAEgASgJEikKBXZhbHVlGAIgASgLMhoudGVuc29yZmxvdy5T",
  52. "YXZlYWJsZU9iamVjdDoCOAFCBgoEa2luZEoECAIQA1IKYXR0cmlidXRlcyJk",
  53. "Cg9TYXZlZFVzZXJPYmplY3QSEgoKaWRlbnRpZmllchgBIAEoCRInCgd2ZXJz",
  54. "aW9uGAIgASgLMhYudGVuc29yZmxvdy5WZXJzaW9uRGVmEhQKCG1ldGFkYXRh",
  55. "GAMgASgJQgIYASIqCgpTYXZlZEFzc2V0EhwKFGFzc2V0X2ZpbGVfZGVmX2lu",
  56. "ZGV4GAEgASgFIlwKDVNhdmVkRnVuY3Rpb24SGgoSY29uY3JldGVfZnVuY3Rp",
  57. "b25zGAEgAygJEi8KDWZ1bmN0aW9uX3NwZWMYAiABKAsyGC50ZW5zb3JmbG93",
  58. "LkZ1bmN0aW9uU3BlYyI5Cg5DYXB0dXJlZFRlbnNvchIMCgRuYW1lGAEgASgJ",
  59. "EhkKEWNvbmNyZXRlX2Z1bmN0aW9uGAIgASgJIqgBChVTYXZlZENvbmNyZXRl",
  60. "RnVuY3Rpb24SFAoMYm91bmRfaW5wdXRzGAIgAygFEkIKHWNhbm9uaWNhbGl6",
  61. "ZWRfaW5wdXRfc2lnbmF0dXJlGAMgASgLMhsudGVuc29yZmxvdy5TdHJ1Y3R1",
  62. "cmVkVmFsdWUSNQoQb3V0cHV0X3NpZ25hdHVyZRgEIAEoCzIbLnRlbnNvcmZs",
  63. "b3cuU3RydWN0dXJlZFZhbHVlIq0BChlTYXZlZEJhcmVDb25jcmV0ZUZ1bmN0",
  64. "aW9uEh4KFmNvbmNyZXRlX2Z1bmN0aW9uX25hbWUYASABKAkSGQoRYXJndW1l",
  65. "bnRfa2V5d29yZHMYAiADKAkSJAocYWxsb3dlZF9wb3NpdGlvbmFsX2FyZ3Vt",
  66. "ZW50cxgDIAEoAxIvCg1mdW5jdGlvbl9zcGVjGAQgASgLMhgudGVuc29yZmxv",
  67. "dy5GdW5jdGlvblNwZWMiIgoNU2F2ZWRDb25zdGFudBIRCglvcGVyYXRpb24Y",
  68. "ASABKAki1wIKDVNhdmVkVmFyaWFibGUSIwoFZHR5cGUYASABKA4yFC50ZW5z",
  69. "b3JmbG93LkRhdGFUeXBlEisKBXNoYXBlGAIgASgLMhwudGVuc29yZmxvdy5U",
  70. "ZW5zb3JTaGFwZVByb3RvEhEKCXRyYWluYWJsZRgDIAEoCBI8Cg9zeW5jaHJv",
  71. "bml6YXRpb24YBCABKA4yIy50ZW5zb3JmbG93LlZhcmlhYmxlU3luY2hyb25p",
  72. "emF0aW9uEjQKC2FnZ3JlZ2F0aW9uGAUgASgOMh8udGVuc29yZmxvdy5WYXJp",
  73. "YWJsZUFnZ3JlZ2F0aW9uEgwKBG5hbWUYBiABKAkSDgoGZGV2aWNlGAcgASgJ",
  74. "Ek8KLGV4cGVyaW1lbnRhbF9kaXN0cmlidXRlZF92YXJpYWJsZV9jb21wb25l",
  75. "bnRzGAggAygLMhkudGVuc29yZmxvdy5TYXZlZFZhcmlhYmxlIvsBCgxGdW5j",
  76. "dGlvblNwZWMSMAoLZnVsbGFyZ3NwZWMYASABKAsyGy50ZW5zb3JmbG93LlN0",
  77. "cnVjdHVyZWRWYWx1ZRIRCglpc19tZXRob2QYAiABKAgSNAoPaW5wdXRfc2ln",
  78. "bmF0dXJlGAUgASgLMhsudGVuc29yZmxvdy5TdHJ1Y3R1cmVkVmFsdWUSOAoL",
  79. "aml0X2NvbXBpbGUYBiABKA4yIy50ZW5zb3JmbG93LkZ1bmN0aW9uU3BlYy5K",
  80. "aXRDb21waWxlIioKCkppdENvbXBpbGUSCwoHREVGQVVMVBAAEgYKAk9OEAES",
  81. "BwoDT0ZGEAJKBAgDEARKBAgEEAUiHwoNU2F2ZWRSZXNvdXJjZRIOCgZkZXZp",
  82. "Y2UYASABKAkiQQoOU2F2ZWFibGVPYmplY3QSFQoNc2F2ZV9mdW5jdGlvbhgC",
  83. "IAEoBRIYChByZXN0b3JlX2Z1bmN0aW9uGAMgASgFQlpaVWdpdGh1Yi5jb20v",
  84. "dGVuc29yZmxvdy90ZW5zb3JmbG93L3RlbnNvcmZsb3cvZ28vY29yZS9wcm90",
  85. "b2J1Zi9mb3JfY29yZV9wcm90b3NfZ29fcHJvdG/4AQFiBnByb3RvMw=="));
  86. descriptor = pbr::FileDescriptor.FromGeneratedCode(descriptorData,
  87. new pbr::FileDescriptor[] { global::Tensorflow.TensorShapeReflection.Descriptor, global::Tensorflow.TypesReflection.Descriptor, global::Tensorflow.VariableReflection.Descriptor, global::Tensorflow.VersionsReflection.Descriptor, global::Tensorflow.StructReflection.Descriptor, global::Tensorflow.TrackableObjectGraphReflection.Descriptor, },
  88. new pbr::GeneratedClrTypeInfo(null, null, new pbr::GeneratedClrTypeInfo[] {
  89. new pbr::GeneratedClrTypeInfo(typeof(global::Tensorflow.SavedObjectGraph), global::Tensorflow.SavedObjectGraph.Parser, new[]{ "Nodes", "ConcreteFunctions" }, null, null, null, new pbr::GeneratedClrTypeInfo[] { null, }),
  90. new pbr::GeneratedClrTypeInfo(typeof(global::Tensorflow.SavedObject), global::Tensorflow.SavedObject.Parser, new[]{ "Children", "SlotVariables", "UserObject", "Asset", "Function", "Variable", "BareConcreteFunction", "Constant", "Resource", "CapturedTensor", "SaveableObjects" }, new[]{ "Kind" }, null, null, new pbr::GeneratedClrTypeInfo[] { null, }),
  91. new pbr::GeneratedClrTypeInfo(typeof(global::Tensorflow.SavedUserObject), global::Tensorflow.SavedUserObject.Parser, new[]{ "Identifier", "Version", "Metadata" }, null, null, null, null),
  92. new pbr::GeneratedClrTypeInfo(typeof(global::Tensorflow.SavedAsset), global::Tensorflow.SavedAsset.Parser, new[]{ "AssetFileDefIndex" }, null, null, null, null),
  93. new pbr::GeneratedClrTypeInfo(typeof(global::Tensorflow.SavedFunction), global::Tensorflow.SavedFunction.Parser, new[]{ "ConcreteFunctions", "FunctionSpec" }, null, null, null, null),
  94. new pbr::GeneratedClrTypeInfo(typeof(global::Tensorflow.CapturedTensor), global::Tensorflow.CapturedTensor.Parser, new[]{ "Name", "ConcreteFunction" }, null, null, null, null),
  95. new pbr::GeneratedClrTypeInfo(typeof(global::Tensorflow.SavedConcreteFunction), global::Tensorflow.SavedConcreteFunction.Parser, new[]{ "BoundInputs", "CanonicalizedInputSignature", "OutputSignature" }, null, null, null, null),
  96. new pbr::GeneratedClrTypeInfo(typeof(global::Tensorflow.SavedBareConcreteFunction), global::Tensorflow.SavedBareConcreteFunction.Parser, new[]{ "ConcreteFunctionName", "ArgumentKeywords", "AllowedPositionalArguments", "FunctionSpec" }, null, null, null, null),
  97. new pbr::GeneratedClrTypeInfo(typeof(global::Tensorflow.SavedConstant), global::Tensorflow.SavedConstant.Parser, new[]{ "Operation" }, null, null, null, null),
  98. new pbr::GeneratedClrTypeInfo(typeof(global::Tensorflow.SavedVariable), global::Tensorflow.SavedVariable.Parser, new[]{ "Dtype", "Shape", "Trainable", "Synchronization", "Aggregation", "Name", "Device", "ExperimentalDistributedVariableComponents" }, null, null, null, null),
  99. new pbr::GeneratedClrTypeInfo(typeof(global::Tensorflow.FunctionSpec), global::Tensorflow.FunctionSpec.Parser, new[]{ "Fullargspec", "IsMethod", "InputSignature", "JitCompile" }, null, new[]{ typeof(global::Tensorflow.FunctionSpec.Types.JitCompile) }, null, null),
  100. new pbr::GeneratedClrTypeInfo(typeof(global::Tensorflow.SavedResource), global::Tensorflow.SavedResource.Parser, new[]{ "Device" }, null, null, null, null),
  101. new pbr::GeneratedClrTypeInfo(typeof(global::Tensorflow.SaveableObject), global::Tensorflow.SaveableObject.Parser, new[]{ "SaveFunction", "RestoreFunction" }, null, null, null, null)
  102. }));
  103. }
  104. #endregion
  105. }
  106. #region Messages
  107. public sealed partial class SavedObjectGraph : pb::IMessage<SavedObjectGraph> {
  108. private static readonly pb::MessageParser<SavedObjectGraph> _parser = new pb::MessageParser<SavedObjectGraph>(() => new SavedObjectGraph());
  109. private pb::UnknownFieldSet _unknownFields;
  110. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  111. public static pb::MessageParser<SavedObjectGraph> Parser { get { return _parser; } }
  112. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  113. public static pbr::MessageDescriptor Descriptor {
  114. get { return global::Tensorflow.SavedObjectGraphReflection.Descriptor.MessageTypes[0]; }
  115. }
  116. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  117. pbr::MessageDescriptor pb::IMessage.Descriptor {
  118. get { return Descriptor; }
  119. }
  120. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  121. public SavedObjectGraph() {
  122. OnConstruction();
  123. }
  124. partial void OnConstruction();
  125. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  126. public SavedObjectGraph(SavedObjectGraph other) : this() {
  127. nodes_ = other.nodes_.Clone();
  128. concreteFunctions_ = other.concreteFunctions_.Clone();
  129. _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields);
  130. }
  131. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  132. public SavedObjectGraph Clone() {
  133. return new SavedObjectGraph(this);
  134. }
  135. /// <summary>Field number for the "nodes" field.</summary>
  136. public const int NodesFieldNumber = 1;
  137. private static readonly pb::FieldCodec<global::Tensorflow.SavedObject> _repeated_nodes_codec
  138. = pb::FieldCodec.ForMessage(10, global::Tensorflow.SavedObject.Parser);
  139. private readonly pbc::RepeatedField<global::Tensorflow.SavedObject> nodes_ = new pbc::RepeatedField<global::Tensorflow.SavedObject>();
  140. /// <summary>
  141. /// Flattened list of objects in the object graph.
  142. ///
  143. /// The position of the object in this list indicates its id.
  144. /// Nodes[0] is considered the root node.
  145. /// </summary>
  146. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  147. public pbc::RepeatedField<global::Tensorflow.SavedObject> Nodes {
  148. get { return nodes_; }
  149. }
  150. /// <summary>Field number for the "concrete_functions" field.</summary>
  151. public const int ConcreteFunctionsFieldNumber = 2;
  152. private static readonly pbc::MapField<string, global::Tensorflow.SavedConcreteFunction>.Codec _map_concreteFunctions_codec
  153. = new pbc::MapField<string, global::Tensorflow.SavedConcreteFunction>.Codec(pb::FieldCodec.ForString(10, ""), pb::FieldCodec.ForMessage(18, global::Tensorflow.SavedConcreteFunction.Parser), 18);
  154. private readonly pbc::MapField<string, global::Tensorflow.SavedConcreteFunction> concreteFunctions_ = new pbc::MapField<string, global::Tensorflow.SavedConcreteFunction>();
  155. /// <summary>
  156. /// Information about captures and output structures in concrete functions.
  157. /// Referenced from SavedBareConcreteFunction and SavedFunction.
  158. /// </summary>
  159. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  160. public pbc::MapField<string, global::Tensorflow.SavedConcreteFunction> ConcreteFunctions {
  161. get { return concreteFunctions_; }
  162. }
  163. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  164. public override bool Equals(object other) {
  165. return Equals(other as SavedObjectGraph);
  166. }
  167. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  168. public bool Equals(SavedObjectGraph other) {
  169. if (ReferenceEquals(other, null)) {
  170. return false;
  171. }
  172. if (ReferenceEquals(other, this)) {
  173. return true;
  174. }
  175. if(!nodes_.Equals(other.nodes_)) return false;
  176. if (!ConcreteFunctions.Equals(other.ConcreteFunctions)) return false;
  177. return Equals(_unknownFields, other._unknownFields);
  178. }
  179. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  180. public override int GetHashCode() {
  181. int hash = 1;
  182. hash ^= nodes_.GetHashCode();
  183. hash ^= ConcreteFunctions.GetHashCode();
  184. if (_unknownFields != null) {
  185. hash ^= _unknownFields.GetHashCode();
  186. }
  187. return hash;
  188. }
  189. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  190. public override string ToString() {
  191. return pb::JsonFormatter.ToDiagnosticString(this);
  192. }
  193. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  194. public void WriteTo(pb::CodedOutputStream output) {
  195. nodes_.WriteTo(output, _repeated_nodes_codec);
  196. concreteFunctions_.WriteTo(output, _map_concreteFunctions_codec);
  197. if (_unknownFields != null) {
  198. _unknownFields.WriteTo(output);
  199. }
  200. }
  201. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  202. public int CalculateSize() {
  203. int size = 0;
  204. size += nodes_.CalculateSize(_repeated_nodes_codec);
  205. size += concreteFunctions_.CalculateSize(_map_concreteFunctions_codec);
  206. if (_unknownFields != null) {
  207. size += _unknownFields.CalculateSize();
  208. }
  209. return size;
  210. }
  211. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  212. public void MergeFrom(SavedObjectGraph other) {
  213. if (other == null) {
  214. return;
  215. }
  216. nodes_.Add(other.nodes_);
  217. concreteFunctions_.Add(other.concreteFunctions_);
  218. _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields);
  219. }
  220. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  221. public void MergeFrom(pb::CodedInputStream input) {
  222. uint tag;
  223. while ((tag = input.ReadTag()) != 0) {
  224. switch(tag) {
  225. default:
  226. _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input);
  227. break;
  228. case 10: {
  229. nodes_.AddEntriesFrom(input, _repeated_nodes_codec);
  230. break;
  231. }
  232. case 18: {
  233. concreteFunctions_.AddEntriesFrom(input, _map_concreteFunctions_codec);
  234. break;
  235. }
  236. }
  237. }
  238. }
  239. }
  240. public sealed partial class SavedObject : pb::IMessage<SavedObject> {
  241. private static readonly pb::MessageParser<SavedObject> _parser = new pb::MessageParser<SavedObject>(() => new SavedObject());
  242. private pb::UnknownFieldSet _unknownFields;
  243. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  244. public static pb::MessageParser<SavedObject> Parser { get { return _parser; } }
  245. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  246. public static pbr::MessageDescriptor Descriptor {
  247. get { return global::Tensorflow.SavedObjectGraphReflection.Descriptor.MessageTypes[1]; }
  248. }
  249. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  250. pbr::MessageDescriptor pb::IMessage.Descriptor {
  251. get { return Descriptor; }
  252. }
  253. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  254. public SavedObject() {
  255. OnConstruction();
  256. }
  257. partial void OnConstruction();
  258. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  259. public SavedObject(SavedObject other) : this() {
  260. children_ = other.children_.Clone();
  261. dependencies_ = other.dependencies_.Clone();
  262. slotVariables_ = other.slotVariables_.Clone();
  263. saveableObjects_ = other.saveableObjects_.Clone();
  264. switch (other.KindCase) {
  265. case KindOneofCase.UserObject:
  266. UserObject = other.UserObject.Clone();
  267. break;
  268. case KindOneofCase.Asset:
  269. Asset = other.Asset.Clone();
  270. break;
  271. case KindOneofCase.Function:
  272. Function = other.Function.Clone();
  273. break;
  274. case KindOneofCase.Variable:
  275. Variable = other.Variable.Clone();
  276. break;
  277. case KindOneofCase.BareConcreteFunction:
  278. BareConcreteFunction = other.BareConcreteFunction.Clone();
  279. break;
  280. case KindOneofCase.Constant:
  281. Constant = other.Constant.Clone();
  282. break;
  283. case KindOneofCase.Resource:
  284. Resource = other.Resource.Clone();
  285. break;
  286. case KindOneofCase.CapturedTensor:
  287. CapturedTensor = other.CapturedTensor.Clone();
  288. break;
  289. }
  290. _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields);
  291. }
  292. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  293. public SavedObject Clone() {
  294. return new SavedObject(this);
  295. }
  296. /// <summary>Field number for the "children" field.</summary>
  297. public const int ChildrenFieldNumber = 1;
  298. private static readonly pb::FieldCodec<global::Tensorflow.TrackableObjectGraph.Types.TrackableObject.Types.ObjectReference> _repeated_children_codec
  299. = pb::FieldCodec.ForMessage(10, global::Tensorflow.TrackableObjectGraph.Types.TrackableObject.Types.ObjectReference.Parser);
  300. private readonly pbc::RepeatedField<global::Tensorflow.TrackableObjectGraph.Types.TrackableObject.Types.ObjectReference> children_ = new pbc::RepeatedField<global::Tensorflow.TrackableObjectGraph.Types.TrackableObject.Types.ObjectReference>();
  301. private readonly pbc::RepeatedField<global::Tensorflow.TrackableObjectGraph.Types.TrackableObject.Types.ObjectReference> dependencies_ = new pbc::RepeatedField<global::Tensorflow.TrackableObjectGraph.Types.TrackableObject.Types.ObjectReference>();
  302. /// <summary>
  303. /// Objects which this object depends on: named edges in the dependency
  304. /// graph.
  305. ///
  306. /// Note: currently only valid if kind == "user_object" or "resource".
  307. /// </summary>
  308. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  309. public pbc::RepeatedField<global::Tensorflow.TrackableObjectGraph.Types.TrackableObject.Types.ObjectReference> Children {
  310. get { return children_; }
  311. }
  312. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  313. public pbc::RepeatedField<global::Tensorflow.TrackableObjectGraph.Types.TrackableObject.Types.ObjectReference> Dependencies {
  314. get { return dependencies_; }
  315. }
  316. /// <summary>Field number for the "slot_variables" field.</summary>
  317. public const int SlotVariablesFieldNumber = 3;
  318. private static readonly pb::FieldCodec<global::Tensorflow.TrackableObjectGraph.Types.TrackableObject.Types.SlotVariableReference> _repeated_slotVariables_codec
  319. = pb::FieldCodec.ForMessage(26, global::Tensorflow.TrackableObjectGraph.Types.TrackableObject.Types.SlotVariableReference.Parser);
  320. private readonly pbc::RepeatedField<global::Tensorflow.TrackableObjectGraph.Types.TrackableObject.Types.SlotVariableReference> slotVariables_ = new pbc::RepeatedField<global::Tensorflow.TrackableObjectGraph.Types.TrackableObject.Types.SlotVariableReference>();
  321. /// <summary>
  322. /// Slot variables owned by this object. This describes the three-way
  323. /// (optimizer, variable, slot variable) relationship; none of the three
  324. /// depend on the others directly.
  325. ///
  326. /// Note: currently only valid if kind == "user_object".
  327. /// </summary>
  328. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  329. public pbc::RepeatedField<global::Tensorflow.TrackableObjectGraph.Types.TrackableObject.Types.SlotVariableReference> SlotVariables {
  330. get { return slotVariables_; }
  331. }
  332. /// <summary>Field number for the "user_object" field.</summary>
  333. public const int UserObjectFieldNumber = 4;
  334. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  335. public global::Tensorflow.SavedUserObject UserObject {
  336. get { return kindCase_ == KindOneofCase.UserObject ? (global::Tensorflow.SavedUserObject) kind_ : null; }
  337. set {
  338. kind_ = value;
  339. kindCase_ = value == null ? KindOneofCase.None : KindOneofCase.UserObject;
  340. }
  341. }
  342. /// <summary>Field number for the "asset" field.</summary>
  343. public const int AssetFieldNumber = 5;
  344. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  345. public global::Tensorflow.SavedAsset Asset {
  346. get { return kindCase_ == KindOneofCase.Asset ? (global::Tensorflow.SavedAsset) kind_ : null; }
  347. set {
  348. kind_ = value;
  349. kindCase_ = value == null ? KindOneofCase.None : KindOneofCase.Asset;
  350. }
  351. }
  352. /// <summary>Field number for the "function" field.</summary>
  353. public const int FunctionFieldNumber = 6;
  354. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  355. public global::Tensorflow.SavedFunction Function {
  356. get { return kindCase_ == KindOneofCase.Function ? (global::Tensorflow.SavedFunction) kind_ : null; }
  357. set {
  358. kind_ = value;
  359. kindCase_ = value == null ? KindOneofCase.None : KindOneofCase.Function;
  360. }
  361. }
  362. /// <summary>Field number for the "variable" field.</summary>
  363. public const int VariableFieldNumber = 7;
  364. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  365. public global::Tensorflow.SavedVariable Variable {
  366. get { return kindCase_ == KindOneofCase.Variable ? (global::Tensorflow.SavedVariable) kind_ : null; }
  367. set {
  368. kind_ = value;
  369. kindCase_ = value == null ? KindOneofCase.None : KindOneofCase.Variable;
  370. }
  371. }
  372. /// <summary>Field number for the "bare_concrete_function" field.</summary>
  373. public const int BareConcreteFunctionFieldNumber = 8;
  374. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  375. public global::Tensorflow.SavedBareConcreteFunction BareConcreteFunction {
  376. get { return kindCase_ == KindOneofCase.BareConcreteFunction ? (global::Tensorflow.SavedBareConcreteFunction) kind_ : null; }
  377. set {
  378. kind_ = value;
  379. kindCase_ = value == null ? KindOneofCase.None : KindOneofCase.BareConcreteFunction;
  380. }
  381. }
  382. /// <summary>Field number for the "constant" field.</summary>
  383. public const int ConstantFieldNumber = 9;
  384. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  385. public global::Tensorflow.SavedConstant Constant {
  386. get { return kindCase_ == KindOneofCase.Constant ? (global::Tensorflow.SavedConstant) kind_ : null; }
  387. set {
  388. kind_ = value;
  389. kindCase_ = value == null ? KindOneofCase.None : KindOneofCase.Constant;
  390. }
  391. }
  392. /// <summary>Field number for the "resource" field.</summary>
  393. public const int ResourceFieldNumber = 10;
  394. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  395. public global::Tensorflow.SavedResource Resource {
  396. get { return kindCase_ == KindOneofCase.Resource ? (global::Tensorflow.SavedResource) kind_ : null; }
  397. set {
  398. kind_ = value;
  399. kindCase_ = value == null ? KindOneofCase.None : KindOneofCase.Resource;
  400. }
  401. }
  402. /// <summary>Field number for the "captured_tensor" field.</summary>
  403. public const int CapturedTensorFieldNumber = 12;
  404. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  405. public global::Tensorflow.CapturedTensor CapturedTensor {
  406. get { return kindCase_ == KindOneofCase.CapturedTensor ? (global::Tensorflow.CapturedTensor) kind_ : null; }
  407. set {
  408. kind_ = value;
  409. kindCase_ = value == null ? KindOneofCase.None : KindOneofCase.CapturedTensor;
  410. }
  411. }
  412. /// <summary>Field number for the "saveable_objects" field.</summary>
  413. public const int SaveableObjectsFieldNumber = 11;
  414. private static readonly pbc::MapField<string, global::Tensorflow.SaveableObject>.Codec _map_saveableObjects_codec
  415. = new pbc::MapField<string, global::Tensorflow.SaveableObject>.Codec(pb::FieldCodec.ForString(10, ""), pb::FieldCodec.ForMessage(18, global::Tensorflow.SaveableObject.Parser), 90);
  416. private readonly pbc::MapField<string, global::Tensorflow.SaveableObject> saveableObjects_ = new pbc::MapField<string, global::Tensorflow.SaveableObject>();
  417. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  418. public pbc::MapField<string, global::Tensorflow.SaveableObject> SaveableObjects {
  419. get { return saveableObjects_; }
  420. }
  421. private object kind_;
  422. /// <summary>Enum of possible cases for the "kind" oneof.</summary>
  423. public enum KindOneofCase {
  424. None = 0,
  425. UserObject = 4,
  426. Asset = 5,
  427. Function = 6,
  428. Variable = 7,
  429. BareConcreteFunction = 8,
  430. Constant = 9,
  431. Resource = 10,
  432. CapturedTensor = 12,
  433. }
  434. private KindOneofCase kindCase_ = KindOneofCase.None;
  435. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  436. public KindOneofCase KindCase {
  437. get { return kindCase_; }
  438. }
  439. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  440. public void ClearKind() {
  441. kindCase_ = KindOneofCase.None;
  442. kind_ = null;
  443. }
  444. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  445. public override bool Equals(object other) {
  446. return Equals(other as SavedObject);
  447. }
  448. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  449. public bool Equals(SavedObject other) {
  450. if (ReferenceEquals(other, null)) {
  451. return false;
  452. }
  453. if (ReferenceEquals(other, this)) {
  454. return true;
  455. }
  456. if(!children_.Equals(other.children_)) return false;
  457. if(!slotVariables_.Equals(other.slotVariables_)) return false;
  458. if (!object.Equals(UserObject, other.UserObject)) return false;
  459. if (!object.Equals(Asset, other.Asset)) return false;
  460. if (!object.Equals(Function, other.Function)) return false;
  461. if (!object.Equals(Variable, other.Variable)) return false;
  462. if (!object.Equals(BareConcreteFunction, other.BareConcreteFunction)) return false;
  463. if (!object.Equals(Constant, other.Constant)) return false;
  464. if (!object.Equals(Resource, other.Resource)) return false;
  465. if (!object.Equals(CapturedTensor, other.CapturedTensor)) return false;
  466. if (!SaveableObjects.Equals(other.SaveableObjects)) return false;
  467. if (KindCase != other.KindCase) return false;
  468. return Equals(_unknownFields, other._unknownFields);
  469. }
  470. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  471. public override int GetHashCode() {
  472. int hash = 1;
  473. hash ^= children_.GetHashCode();
  474. hash ^= slotVariables_.GetHashCode();
  475. if (kindCase_ == KindOneofCase.UserObject) hash ^= UserObject.GetHashCode();
  476. if (kindCase_ == KindOneofCase.Asset) hash ^= Asset.GetHashCode();
  477. if (kindCase_ == KindOneofCase.Function) hash ^= Function.GetHashCode();
  478. if (kindCase_ == KindOneofCase.Variable) hash ^= Variable.GetHashCode();
  479. if (kindCase_ == KindOneofCase.BareConcreteFunction) hash ^= BareConcreteFunction.GetHashCode();
  480. if (kindCase_ == KindOneofCase.Constant) hash ^= Constant.GetHashCode();
  481. if (kindCase_ == KindOneofCase.Resource) hash ^= Resource.GetHashCode();
  482. if (kindCase_ == KindOneofCase.CapturedTensor) hash ^= CapturedTensor.GetHashCode();
  483. hash ^= SaveableObjects.GetHashCode();
  484. hash ^= (int) kindCase_;
  485. if (_unknownFields != null) {
  486. hash ^= _unknownFields.GetHashCode();
  487. }
  488. return hash;
  489. }
  490. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  491. public override string ToString() {
  492. return pb::JsonFormatter.ToDiagnosticString(this);
  493. }
  494. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  495. public void WriteTo(pb::CodedOutputStream output) {
  496. children_.WriteTo(output, _repeated_children_codec);
  497. slotVariables_.WriteTo(output, _repeated_slotVariables_codec);
  498. if (kindCase_ == KindOneofCase.UserObject) {
  499. output.WriteRawTag(34);
  500. output.WriteMessage(UserObject);
  501. }
  502. if (kindCase_ == KindOneofCase.Asset) {
  503. output.WriteRawTag(42);
  504. output.WriteMessage(Asset);
  505. }
  506. if (kindCase_ == KindOneofCase.Function) {
  507. output.WriteRawTag(50);
  508. output.WriteMessage(Function);
  509. }
  510. if (kindCase_ == KindOneofCase.Variable) {
  511. output.WriteRawTag(58);
  512. output.WriteMessage(Variable);
  513. }
  514. if (kindCase_ == KindOneofCase.BareConcreteFunction) {
  515. output.WriteRawTag(66);
  516. output.WriteMessage(BareConcreteFunction);
  517. }
  518. if (kindCase_ == KindOneofCase.Constant) {
  519. output.WriteRawTag(74);
  520. output.WriteMessage(Constant);
  521. }
  522. if (kindCase_ == KindOneofCase.Resource) {
  523. output.WriteRawTag(82);
  524. output.WriteMessage(Resource);
  525. }
  526. saveableObjects_.WriteTo(output, _map_saveableObjects_codec);
  527. if (kindCase_ == KindOneofCase.CapturedTensor) {
  528. output.WriteRawTag(98);
  529. output.WriteMessage(CapturedTensor);
  530. }
  531. if (_unknownFields != null) {
  532. _unknownFields.WriteTo(output);
  533. }
  534. }
  535. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  536. public int CalculateSize() {
  537. int size = 0;
  538. size += children_.CalculateSize(_repeated_children_codec);
  539. size += slotVariables_.CalculateSize(_repeated_slotVariables_codec);
  540. if (kindCase_ == KindOneofCase.UserObject) {
  541. size += 1 + pb::CodedOutputStream.ComputeMessageSize(UserObject);
  542. }
  543. if (kindCase_ == KindOneofCase.Asset) {
  544. size += 1 + pb::CodedOutputStream.ComputeMessageSize(Asset);
  545. }
  546. if (kindCase_ == KindOneofCase.Function) {
  547. size += 1 + pb::CodedOutputStream.ComputeMessageSize(Function);
  548. }
  549. if (kindCase_ == KindOneofCase.Variable) {
  550. size += 1 + pb::CodedOutputStream.ComputeMessageSize(Variable);
  551. }
  552. if (kindCase_ == KindOneofCase.BareConcreteFunction) {
  553. size += 1 + pb::CodedOutputStream.ComputeMessageSize(BareConcreteFunction);
  554. }
  555. if (kindCase_ == KindOneofCase.Constant) {
  556. size += 1 + pb::CodedOutputStream.ComputeMessageSize(Constant);
  557. }
  558. if (kindCase_ == KindOneofCase.Resource) {
  559. size += 1 + pb::CodedOutputStream.ComputeMessageSize(Resource);
  560. }
  561. if (kindCase_ == KindOneofCase.CapturedTensor) {
  562. size += 1 + pb::CodedOutputStream.ComputeMessageSize(CapturedTensor);
  563. }
  564. size += saveableObjects_.CalculateSize(_map_saveableObjects_codec);
  565. if (_unknownFields != null) {
  566. size += _unknownFields.CalculateSize();
  567. }
  568. return size;
  569. }
  570. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  571. public void MergeFrom(SavedObject other) {
  572. if (other == null) {
  573. return;
  574. }
  575. children_.Add(other.children_);
  576. dependencies_.Add(other.dependencies_);
  577. slotVariables_.Add(other.slotVariables_);
  578. saveableObjects_.Add(other.saveableObjects_);
  579. switch (other.KindCase) {
  580. case KindOneofCase.UserObject:
  581. if (UserObject == null) {
  582. UserObject = new global::Tensorflow.SavedUserObject();
  583. }
  584. UserObject.MergeFrom(other.UserObject);
  585. break;
  586. case KindOneofCase.Asset:
  587. if (Asset == null) {
  588. Asset = new global::Tensorflow.SavedAsset();
  589. }
  590. Asset.MergeFrom(other.Asset);
  591. break;
  592. case KindOneofCase.Function:
  593. if (Function == null) {
  594. Function = new global::Tensorflow.SavedFunction();
  595. }
  596. Function.MergeFrom(other.Function);
  597. break;
  598. case KindOneofCase.Variable:
  599. if (Variable == null) {
  600. Variable = new global::Tensorflow.SavedVariable();
  601. }
  602. Variable.MergeFrom(other.Variable);
  603. break;
  604. case KindOneofCase.BareConcreteFunction:
  605. if (BareConcreteFunction == null) {
  606. BareConcreteFunction = new global::Tensorflow.SavedBareConcreteFunction();
  607. }
  608. BareConcreteFunction.MergeFrom(other.BareConcreteFunction);
  609. break;
  610. case KindOneofCase.Constant:
  611. if (Constant == null) {
  612. Constant = new global::Tensorflow.SavedConstant();
  613. }
  614. Constant.MergeFrom(other.Constant);
  615. break;
  616. case KindOneofCase.Resource:
  617. if (Resource == null) {
  618. Resource = new global::Tensorflow.SavedResource();
  619. }
  620. Resource.MergeFrom(other.Resource);
  621. break;
  622. case KindOneofCase.CapturedTensor:
  623. if (CapturedTensor == null) {
  624. CapturedTensor = new global::Tensorflow.CapturedTensor();
  625. }
  626. CapturedTensor.MergeFrom(other.CapturedTensor);
  627. break;
  628. }
  629. _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields);
  630. }
  631. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  632. public void MergeFrom(pb::CodedInputStream input) {
  633. uint tag;
  634. while ((tag = input.ReadTag()) != 0) {
  635. switch(tag) {
  636. default:
  637. _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input);
  638. break;
  639. case 10: {
  640. children_.AddEntriesFrom(input, _repeated_children_codec);
  641. break;
  642. }
  643. case 26: {
  644. slotVariables_.AddEntriesFrom(input, _repeated_slotVariables_codec);
  645. break;
  646. }
  647. case 34: {
  648. global::Tensorflow.SavedUserObject subBuilder = new global::Tensorflow.SavedUserObject();
  649. if (kindCase_ == KindOneofCase.UserObject) {
  650. subBuilder.MergeFrom(UserObject);
  651. }
  652. input.ReadMessage(subBuilder);
  653. UserObject = subBuilder;
  654. break;
  655. }
  656. case 42: {
  657. global::Tensorflow.SavedAsset subBuilder = new global::Tensorflow.SavedAsset();
  658. if (kindCase_ == KindOneofCase.Asset) {
  659. subBuilder.MergeFrom(Asset);
  660. }
  661. input.ReadMessage(subBuilder);
  662. Asset = subBuilder;
  663. break;
  664. }
  665. case 50: {
  666. global::Tensorflow.SavedFunction subBuilder = new global::Tensorflow.SavedFunction();
  667. if (kindCase_ == KindOneofCase.Function) {
  668. subBuilder.MergeFrom(Function);
  669. }
  670. input.ReadMessage(subBuilder);
  671. Function = subBuilder;
  672. break;
  673. }
  674. case 58: {
  675. global::Tensorflow.SavedVariable subBuilder = new global::Tensorflow.SavedVariable();
  676. if (kindCase_ == KindOneofCase.Variable) {
  677. subBuilder.MergeFrom(Variable);
  678. }
  679. input.ReadMessage(subBuilder);
  680. Variable = subBuilder;
  681. break;
  682. }
  683. case 66: {
  684. global::Tensorflow.SavedBareConcreteFunction subBuilder = new global::Tensorflow.SavedBareConcreteFunction();
  685. if (kindCase_ == KindOneofCase.BareConcreteFunction) {
  686. subBuilder.MergeFrom(BareConcreteFunction);
  687. }
  688. input.ReadMessage(subBuilder);
  689. BareConcreteFunction = subBuilder;
  690. break;
  691. }
  692. case 74: {
  693. global::Tensorflow.SavedConstant subBuilder = new global::Tensorflow.SavedConstant();
  694. if (kindCase_ == KindOneofCase.Constant) {
  695. subBuilder.MergeFrom(Constant);
  696. }
  697. input.ReadMessage(subBuilder);
  698. Constant = subBuilder;
  699. break;
  700. }
  701. case 82: {
  702. global::Tensorflow.SavedResource subBuilder = new global::Tensorflow.SavedResource();
  703. if (kindCase_ == KindOneofCase.Resource) {
  704. subBuilder.MergeFrom(Resource);
  705. }
  706. input.ReadMessage(subBuilder);
  707. Resource = subBuilder;
  708. break;
  709. }
  710. case 90: {
  711. saveableObjects_.AddEntriesFrom(input, _map_saveableObjects_codec);
  712. break;
  713. }
  714. case 98: {
  715. global::Tensorflow.CapturedTensor subBuilder = new global::Tensorflow.CapturedTensor();
  716. if (kindCase_ == KindOneofCase.CapturedTensor) {
  717. subBuilder.MergeFrom(CapturedTensor);
  718. }
  719. input.ReadMessage(subBuilder);
  720. CapturedTensor = subBuilder;
  721. break;
  722. }
  723. }
  724. }
  725. }
  726. }
  727. /// <summary>
  728. /// A SavedUserObject is an object (in the object-oriented language of the
  729. /// TensorFlow program) of some user- or framework-defined class other than
  730. /// those handled specifically by the other kinds of SavedObjects.
  731. ///
  732. /// This object cannot be evaluated as a tensor, and therefore cannot be bound
  733. /// to an input of a function.
  734. /// </summary>
  735. public sealed partial class SavedUserObject : pb::IMessage<SavedUserObject> {
  736. private static readonly pb::MessageParser<SavedUserObject> _parser = new pb::MessageParser<SavedUserObject>(() => new SavedUserObject());
  737. private pb::UnknownFieldSet _unknownFields;
  738. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  739. public static pb::MessageParser<SavedUserObject> Parser { get { return _parser; } }
  740. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  741. public static pbr::MessageDescriptor Descriptor {
  742. get { return global::Tensorflow.SavedObjectGraphReflection.Descriptor.MessageTypes[2]; }
  743. }
  744. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  745. pbr::MessageDescriptor pb::IMessage.Descriptor {
  746. get { return Descriptor; }
  747. }
  748. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  749. public SavedUserObject() {
  750. OnConstruction();
  751. }
  752. partial void OnConstruction();
  753. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  754. public SavedUserObject(SavedUserObject other) : this() {
  755. identifier_ = other.identifier_;
  756. version_ = other.version_ != null ? other.version_.Clone() : null;
  757. metadata_ = other.metadata_;
  758. _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields);
  759. }
  760. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  761. public SavedUserObject Clone() {
  762. return new SavedUserObject(this);
  763. }
  764. /// <summary>Field number for the "identifier" field.</summary>
  765. public const int IdentifierFieldNumber = 1;
  766. private string identifier_ = "";
  767. /// <summary>
  768. /// Corresponds to a registration of the type to use in the loading program.
  769. /// </summary>
  770. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  771. public string Identifier {
  772. get { return identifier_; }
  773. set {
  774. identifier_ = pb::ProtoPreconditions.CheckNotNull(value, "value");
  775. }
  776. }
  777. /// <summary>Field number for the "version" field.</summary>
  778. public const int VersionFieldNumber = 2;
  779. private global::Tensorflow.VersionDef version_;
  780. /// <summary>
  781. /// Version information from the producer of this SavedUserObject.
  782. /// </summary>
  783. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  784. public global::Tensorflow.VersionDef Version {
  785. get { return version_; }
  786. set {
  787. version_ = value;
  788. }
  789. }
  790. /// <summary>Field number for the "metadata" field.</summary>
  791. public const int MetadataFieldNumber = 3;
  792. private string metadata_ = "";
  793. /// <summary>
  794. /// Metadata for deserializing this object.
  795. ///
  796. /// Deprecated! At the time of deprecation, Keras was the only user of this
  797. /// field, and its saving and loading code will be updated shortly.
  798. /// Please save your application-specific metadata to a separate file.
  799. /// </summary>
  800. [global::System.ObsoleteAttribute]
  801. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  802. public string Metadata {
  803. get { return metadata_; }
  804. set {
  805. metadata_ = pb::ProtoPreconditions.CheckNotNull(value, "value");
  806. }
  807. }
  808. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  809. public override bool Equals(object other) {
  810. return Equals(other as SavedUserObject);
  811. }
  812. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  813. public bool Equals(SavedUserObject other) {
  814. if (ReferenceEquals(other, null)) {
  815. return false;
  816. }
  817. if (ReferenceEquals(other, this)) {
  818. return true;
  819. }
  820. if (Identifier != other.Identifier) return false;
  821. if (!object.Equals(Version, other.Version)) return false;
  822. if (Metadata != other.Metadata) return false;
  823. return Equals(_unknownFields, other._unknownFields);
  824. }
  825. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  826. public override int GetHashCode() {
  827. int hash = 1;
  828. if (Identifier.Length != 0) hash ^= Identifier.GetHashCode();
  829. if (version_ != null) hash ^= Version.GetHashCode();
  830. if (Metadata.Length != 0) hash ^= Metadata.GetHashCode();
  831. if (_unknownFields != null) {
  832. hash ^= _unknownFields.GetHashCode();
  833. }
  834. return hash;
  835. }
  836. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  837. public override string ToString() {
  838. return pb::JsonFormatter.ToDiagnosticString(this);
  839. }
  840. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  841. public void WriteTo(pb::CodedOutputStream output) {
  842. if (Identifier.Length != 0) {
  843. output.WriteRawTag(10);
  844. output.WriteString(Identifier);
  845. }
  846. if (version_ != null) {
  847. output.WriteRawTag(18);
  848. output.WriteMessage(Version);
  849. }
  850. if (Metadata.Length != 0) {
  851. output.WriteRawTag(26);
  852. output.WriteString(Metadata);
  853. }
  854. if (_unknownFields != null) {
  855. _unknownFields.WriteTo(output);
  856. }
  857. }
  858. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  859. public int CalculateSize() {
  860. int size = 0;
  861. if (Identifier.Length != 0) {
  862. size += 1 + pb::CodedOutputStream.ComputeStringSize(Identifier);
  863. }
  864. if (version_ != null) {
  865. size += 1 + pb::CodedOutputStream.ComputeMessageSize(Version);
  866. }
  867. if (Metadata.Length != 0) {
  868. size += 1 + pb::CodedOutputStream.ComputeStringSize(Metadata);
  869. }
  870. if (_unknownFields != null) {
  871. size += _unknownFields.CalculateSize();
  872. }
  873. return size;
  874. }
  875. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  876. public void MergeFrom(SavedUserObject other) {
  877. if (other == null) {
  878. return;
  879. }
  880. if (other.Identifier.Length != 0) {
  881. Identifier = other.Identifier;
  882. }
  883. if (other.version_ != null) {
  884. if (version_ == null) {
  885. Version = new global::Tensorflow.VersionDef();
  886. }
  887. Version.MergeFrom(other.Version);
  888. }
  889. if (other.Metadata.Length != 0) {
  890. Metadata = other.Metadata;
  891. }
  892. _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields);
  893. }
  894. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  895. public void MergeFrom(pb::CodedInputStream input) {
  896. uint tag;
  897. while ((tag = input.ReadTag()) != 0) {
  898. switch(tag) {
  899. default:
  900. _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input);
  901. break;
  902. case 10: {
  903. Identifier = input.ReadString();
  904. break;
  905. }
  906. case 18: {
  907. if (version_ == null) {
  908. Version = new global::Tensorflow.VersionDef();
  909. }
  910. input.ReadMessage(Version);
  911. break;
  912. }
  913. case 26: {
  914. Metadata = input.ReadString();
  915. break;
  916. }
  917. }
  918. }
  919. }
  920. }
  921. /// <summary>
  922. /// A SavedAsset points to an asset in the MetaGraph.
  923. ///
  924. /// When bound to a function this object evaluates to a tensor with the absolute
  925. /// filename. Users should not depend on a particular part of the filename to
  926. /// remain stable (e.g. basename could be changed).
  927. /// </summary>
  928. public sealed partial class SavedAsset : pb::IMessage<SavedAsset> {
  929. private static readonly pb::MessageParser<SavedAsset> _parser = new pb::MessageParser<SavedAsset>(() => new SavedAsset());
  930. private pb::UnknownFieldSet _unknownFields;
  931. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  932. public static pb::MessageParser<SavedAsset> Parser { get { return _parser; } }
  933. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  934. public static pbr::MessageDescriptor Descriptor {
  935. get { return global::Tensorflow.SavedObjectGraphReflection.Descriptor.MessageTypes[3]; }
  936. }
  937. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  938. pbr::MessageDescriptor pb::IMessage.Descriptor {
  939. get { return Descriptor; }
  940. }
  941. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  942. public SavedAsset() {
  943. OnConstruction();
  944. }
  945. partial void OnConstruction();
  946. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  947. public SavedAsset(SavedAsset other) : this() {
  948. assetFileDefIndex_ = other.assetFileDefIndex_;
  949. _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields);
  950. }
  951. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  952. public SavedAsset Clone() {
  953. return new SavedAsset(this);
  954. }
  955. /// <summary>Field number for the "asset_file_def_index" field.</summary>
  956. public const int AssetFileDefIndexFieldNumber = 1;
  957. private int assetFileDefIndex_;
  958. /// <summary>
  959. /// Index into `MetaGraphDef.asset_file_def[]` that describes the Asset.
  960. ///
  961. /// Only the field `AssetFileDef.filename` is used. Other fields, such as
  962. /// `AssetFileDef.tensor_info`, MUST be ignored.
  963. /// </summary>
  964. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  965. public int AssetFileDefIndex {
  966. get { return assetFileDefIndex_; }
  967. set {
  968. assetFileDefIndex_ = value;
  969. }
  970. }
  971. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  972. public override bool Equals(object other) {
  973. return Equals(other as SavedAsset);
  974. }
  975. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  976. public bool Equals(SavedAsset other) {
  977. if (ReferenceEquals(other, null)) {
  978. return false;
  979. }
  980. if (ReferenceEquals(other, this)) {
  981. return true;
  982. }
  983. if (AssetFileDefIndex != other.AssetFileDefIndex) return false;
  984. return Equals(_unknownFields, other._unknownFields);
  985. }
  986. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  987. public override int GetHashCode() {
  988. int hash = 1;
  989. if (AssetFileDefIndex != 0) hash ^= AssetFileDefIndex.GetHashCode();
  990. if (_unknownFields != null) {
  991. hash ^= _unknownFields.GetHashCode();
  992. }
  993. return hash;
  994. }
  995. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  996. public override string ToString() {
  997. return pb::JsonFormatter.ToDiagnosticString(this);
  998. }
  999. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  1000. public void WriteTo(pb::CodedOutputStream output) {
  1001. if (AssetFileDefIndex != 0) {
  1002. output.WriteRawTag(8);
  1003. output.WriteInt32(AssetFileDefIndex);
  1004. }
  1005. if (_unknownFields != null) {
  1006. _unknownFields.WriteTo(output);
  1007. }
  1008. }
  1009. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  1010. public int CalculateSize() {
  1011. int size = 0;
  1012. if (AssetFileDefIndex != 0) {
  1013. size += 1 + pb::CodedOutputStream.ComputeInt32Size(AssetFileDefIndex);
  1014. }
  1015. if (_unknownFields != null) {
  1016. size += _unknownFields.CalculateSize();
  1017. }
  1018. return size;
  1019. }
  1020. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  1021. public void MergeFrom(SavedAsset other) {
  1022. if (other == null) {
  1023. return;
  1024. }
  1025. if (other.AssetFileDefIndex != 0) {
  1026. AssetFileDefIndex = other.AssetFileDefIndex;
  1027. }
  1028. _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields);
  1029. }
  1030. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  1031. public void MergeFrom(pb::CodedInputStream input) {
  1032. uint tag;
  1033. while ((tag = input.ReadTag()) != 0) {
  1034. switch(tag) {
  1035. default:
  1036. _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input);
  1037. break;
  1038. case 8: {
  1039. AssetFileDefIndex = input.ReadInt32();
  1040. break;
  1041. }
  1042. }
  1043. }
  1044. }
  1045. }
  1046. /// <summary>
  1047. /// A function with multiple signatures, possibly with non-Tensor arguments.
  1048. /// </summary>
  1049. public sealed partial class SavedFunction : pb::IMessage<SavedFunction> {
  1050. private static readonly pb::MessageParser<SavedFunction> _parser = new pb::MessageParser<SavedFunction>(() => new SavedFunction());
  1051. private pb::UnknownFieldSet _unknownFields;
  1052. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  1053. public static pb::MessageParser<SavedFunction> Parser { get { return _parser; } }
  1054. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  1055. public static pbr::MessageDescriptor Descriptor {
  1056. get { return global::Tensorflow.SavedObjectGraphReflection.Descriptor.MessageTypes[4]; }
  1057. }
  1058. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  1059. pbr::MessageDescriptor pb::IMessage.Descriptor {
  1060. get { return Descriptor; }
  1061. }
  1062. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  1063. public SavedFunction() {
  1064. OnConstruction();
  1065. }
  1066. partial void OnConstruction();
  1067. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  1068. public SavedFunction(SavedFunction other) : this() {
  1069. concreteFunctions_ = other.concreteFunctions_.Clone();
  1070. functionSpec_ = other.functionSpec_ != null ? other.functionSpec_.Clone() : null;
  1071. _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields);
  1072. }
  1073. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  1074. public SavedFunction Clone() {
  1075. return new SavedFunction(this);
  1076. }
  1077. /// <summary>Field number for the "concrete_functions" field.</summary>
  1078. public const int ConcreteFunctionsFieldNumber = 1;
  1079. private static readonly pb::FieldCodec<string> _repeated_concreteFunctions_codec
  1080. = pb::FieldCodec.ForString(10);
  1081. private readonly pbc::RepeatedField<string> concreteFunctions_ = new pbc::RepeatedField<string>();
  1082. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  1083. public pbc::RepeatedField<string> ConcreteFunctions {
  1084. get { return concreteFunctions_; }
  1085. }
  1086. /// <summary>Field number for the "function_spec" field.</summary>
  1087. public const int FunctionSpecFieldNumber = 2;
  1088. private global::Tensorflow.FunctionSpec functionSpec_;
  1089. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  1090. public global::Tensorflow.FunctionSpec FunctionSpec {
  1091. get { return functionSpec_; }
  1092. set {
  1093. functionSpec_ = value;
  1094. }
  1095. }
  1096. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  1097. public override bool Equals(object other) {
  1098. return Equals(other as SavedFunction);
  1099. }
  1100. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  1101. public bool Equals(SavedFunction other) {
  1102. if (ReferenceEquals(other, null)) {
  1103. return false;
  1104. }
  1105. if (ReferenceEquals(other, this)) {
  1106. return true;
  1107. }
  1108. if(!concreteFunctions_.Equals(other.concreteFunctions_)) return false;
  1109. if (!object.Equals(FunctionSpec, other.FunctionSpec)) return false;
  1110. return Equals(_unknownFields, other._unknownFields);
  1111. }
  1112. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  1113. public override int GetHashCode() {
  1114. int hash = 1;
  1115. hash ^= concreteFunctions_.GetHashCode();
  1116. if (functionSpec_ != null) hash ^= FunctionSpec.GetHashCode();
  1117. if (_unknownFields != null) {
  1118. hash ^= _unknownFields.GetHashCode();
  1119. }
  1120. return hash;
  1121. }
  1122. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  1123. public override string ToString() {
  1124. return pb::JsonFormatter.ToDiagnosticString(this);
  1125. }
  1126. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  1127. public void WriteTo(pb::CodedOutputStream output) {
  1128. concreteFunctions_.WriteTo(output, _repeated_concreteFunctions_codec);
  1129. if (functionSpec_ != null) {
  1130. output.WriteRawTag(18);
  1131. output.WriteMessage(FunctionSpec);
  1132. }
  1133. if (_unknownFields != null) {
  1134. _unknownFields.WriteTo(output);
  1135. }
  1136. }
  1137. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  1138. public int CalculateSize() {
  1139. int size = 0;
  1140. size += concreteFunctions_.CalculateSize(_repeated_concreteFunctions_codec);
  1141. if (functionSpec_ != null) {
  1142. size += 1 + pb::CodedOutputStream.ComputeMessageSize(FunctionSpec);
  1143. }
  1144. if (_unknownFields != null) {
  1145. size += _unknownFields.CalculateSize();
  1146. }
  1147. return size;
  1148. }
  1149. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  1150. public void MergeFrom(SavedFunction other) {
  1151. if (other == null) {
  1152. return;
  1153. }
  1154. concreteFunctions_.Add(other.concreteFunctions_);
  1155. if (other.functionSpec_ != null) {
  1156. if (functionSpec_ == null) {
  1157. FunctionSpec = new global::Tensorflow.FunctionSpec();
  1158. }
  1159. FunctionSpec.MergeFrom(other.FunctionSpec);
  1160. }
  1161. _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields);
  1162. }
  1163. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  1164. public void MergeFrom(pb::CodedInputStream input) {
  1165. uint tag;
  1166. while ((tag = input.ReadTag()) != 0) {
  1167. switch(tag) {
  1168. default:
  1169. _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input);
  1170. break;
  1171. case 10: {
  1172. concreteFunctions_.AddEntriesFrom(input, _repeated_concreteFunctions_codec);
  1173. break;
  1174. }
  1175. case 18: {
  1176. if (functionSpec_ == null) {
  1177. FunctionSpec = new global::Tensorflow.FunctionSpec();
  1178. }
  1179. input.ReadMessage(FunctionSpec);
  1180. break;
  1181. }
  1182. }
  1183. }
  1184. }
  1185. }
  1186. public sealed partial class CapturedTensor : pb::IMessage<CapturedTensor> {
  1187. private static readonly pb::MessageParser<CapturedTensor> _parser = new pb::MessageParser<CapturedTensor>(() => new CapturedTensor());
  1188. private pb::UnknownFieldSet _unknownFields;
  1189. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  1190. public static pb::MessageParser<CapturedTensor> Parser { get { return _parser; } }
  1191. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  1192. public static pbr::MessageDescriptor Descriptor {
  1193. get { return global::Tensorflow.SavedObjectGraphReflection.Descriptor.MessageTypes[5]; }
  1194. }
  1195. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  1196. pbr::MessageDescriptor pb::IMessage.Descriptor {
  1197. get { return Descriptor; }
  1198. }
  1199. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  1200. public CapturedTensor() {
  1201. OnConstruction();
  1202. }
  1203. partial void OnConstruction();
  1204. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  1205. public CapturedTensor(CapturedTensor other) : this() {
  1206. name_ = other.name_;
  1207. concreteFunction_ = other.concreteFunction_;
  1208. _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields);
  1209. }
  1210. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  1211. public CapturedTensor Clone() {
  1212. return new CapturedTensor(this);
  1213. }
  1214. /// <summary>Field number for the "name" field.</summary>
  1215. public const int NameFieldNumber = 1;
  1216. private string name_ = "";
  1217. /// <summary>
  1218. /// Name of captured tensor
  1219. /// </summary>
  1220. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  1221. public string Name {
  1222. get { return name_; }
  1223. set {
  1224. name_ = pb::ProtoPreconditions.CheckNotNull(value, "value");
  1225. }
  1226. }
  1227. /// <summary>Field number for the "concrete_function" field.</summary>
  1228. public const int ConcreteFunctionFieldNumber = 2;
  1229. private string concreteFunction_ = "";
  1230. /// <summary>
  1231. /// Name of concrete function which contains the computed graph tensor.
  1232. /// </summary>
  1233. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  1234. public string ConcreteFunction {
  1235. get { return concreteFunction_; }
  1236. set {
  1237. concreteFunction_ = pb::ProtoPreconditions.CheckNotNull(value, "value");
  1238. }
  1239. }
  1240. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  1241. public override bool Equals(object other) {
  1242. return Equals(other as CapturedTensor);
  1243. }
  1244. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  1245. public bool Equals(CapturedTensor other) {
  1246. if (ReferenceEquals(other, null)) {
  1247. return false;
  1248. }
  1249. if (ReferenceEquals(other, this)) {
  1250. return true;
  1251. }
  1252. if (Name != other.Name) return false;
  1253. if (ConcreteFunction != other.ConcreteFunction) return false;
  1254. return Equals(_unknownFields, other._unknownFields);
  1255. }
  1256. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  1257. public override int GetHashCode() {
  1258. int hash = 1;
  1259. if (Name.Length != 0) hash ^= Name.GetHashCode();
  1260. if (ConcreteFunction.Length != 0) hash ^= ConcreteFunction.GetHashCode();
  1261. if (_unknownFields != null) {
  1262. hash ^= _unknownFields.GetHashCode();
  1263. }
  1264. return hash;
  1265. }
  1266. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  1267. public override string ToString() {
  1268. return pb::JsonFormatter.ToDiagnosticString(this);
  1269. }
  1270. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  1271. public void WriteTo(pb::CodedOutputStream output) {
  1272. if (Name.Length != 0) {
  1273. output.WriteRawTag(10);
  1274. output.WriteString(Name);
  1275. }
  1276. if (ConcreteFunction.Length != 0) {
  1277. output.WriteRawTag(18);
  1278. output.WriteString(ConcreteFunction);
  1279. }
  1280. if (_unknownFields != null) {
  1281. _unknownFields.WriteTo(output);
  1282. }
  1283. }
  1284. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  1285. public int CalculateSize() {
  1286. int size = 0;
  1287. if (Name.Length != 0) {
  1288. size += 1 + pb::CodedOutputStream.ComputeStringSize(Name);
  1289. }
  1290. if (ConcreteFunction.Length != 0) {
  1291. size += 1 + pb::CodedOutputStream.ComputeStringSize(ConcreteFunction);
  1292. }
  1293. if (_unknownFields != null) {
  1294. size += _unknownFields.CalculateSize();
  1295. }
  1296. return size;
  1297. }
  1298. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  1299. public void MergeFrom(CapturedTensor other) {
  1300. if (other == null) {
  1301. return;
  1302. }
  1303. if (other.Name.Length != 0) {
  1304. Name = other.Name;
  1305. }
  1306. if (other.ConcreteFunction.Length != 0) {
  1307. ConcreteFunction = other.ConcreteFunction;
  1308. }
  1309. _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields);
  1310. }
  1311. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  1312. public void MergeFrom(pb::CodedInputStream input) {
  1313. uint tag;
  1314. while ((tag = input.ReadTag()) != 0) {
  1315. switch(tag) {
  1316. default:
  1317. _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input);
  1318. break;
  1319. case 10: {
  1320. Name = input.ReadString();
  1321. break;
  1322. }
  1323. case 18: {
  1324. ConcreteFunction = input.ReadString();
  1325. break;
  1326. }
  1327. }
  1328. }
  1329. }
  1330. }
  1331. /// <summary>
  1332. /// Stores low-level information about a concrete function. Referenced in either
  1333. /// a SavedFunction or a SavedBareConcreteFunction.
  1334. /// </summary>
  1335. public sealed partial class SavedConcreteFunction : pb::IMessage<SavedConcreteFunction> {
  1336. private static readonly pb::MessageParser<SavedConcreteFunction> _parser = new pb::MessageParser<SavedConcreteFunction>(() => new SavedConcreteFunction());
  1337. private pb::UnknownFieldSet _unknownFields;
  1338. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  1339. public static pb::MessageParser<SavedConcreteFunction> Parser { get { return _parser; } }
  1340. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  1341. public static pbr::MessageDescriptor Descriptor {
  1342. get { return global::Tensorflow.SavedObjectGraphReflection.Descriptor.MessageTypes[6]; }
  1343. }
  1344. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  1345. pbr::MessageDescriptor pb::IMessage.Descriptor {
  1346. get { return Descriptor; }
  1347. }
  1348. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  1349. public SavedConcreteFunction() {
  1350. OnConstruction();
  1351. }
  1352. partial void OnConstruction();
  1353. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  1354. public SavedConcreteFunction(SavedConcreteFunction other) : this() {
  1355. boundInputs_ = other.boundInputs_.Clone();
  1356. canonicalizedInputSignature_ = other.canonicalizedInputSignature_ != null ? other.canonicalizedInputSignature_.Clone() : null;
  1357. outputSignature_ = other.outputSignature_ != null ? other.outputSignature_.Clone() : null;
  1358. _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields);
  1359. }
  1360. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  1361. public SavedConcreteFunction Clone() {
  1362. return new SavedConcreteFunction(this);
  1363. }
  1364. /// <summary>Field number for the "bound_inputs" field.</summary>
  1365. public const int BoundInputsFieldNumber = 2;
  1366. private static readonly pb::FieldCodec<int> _repeated_boundInputs_codec
  1367. = pb::FieldCodec.ForInt32(18);
  1368. private readonly pbc::RepeatedField<int> boundInputs_ = new pbc::RepeatedField<int>();
  1369. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  1370. public pbc::RepeatedField<int> BoundInputs {
  1371. get { return boundInputs_; }
  1372. }
  1373. /// <summary>Field number for the "canonicalized_input_signature" field.</summary>
  1374. public const int CanonicalizedInputSignatureFieldNumber = 3;
  1375. private global::Tensorflow.StructuredValue canonicalizedInputSignature_;
  1376. /// <summary>
  1377. /// Input in canonicalized form that was received to create this concrete
  1378. /// function.
  1379. /// </summary>
  1380. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  1381. public global::Tensorflow.StructuredValue CanonicalizedInputSignature {
  1382. get { return canonicalizedInputSignature_; }
  1383. set {
  1384. canonicalizedInputSignature_ = value;
  1385. }
  1386. }
  1387. /// <summary>Field number for the "output_signature" field.</summary>
  1388. public const int OutputSignatureFieldNumber = 4;
  1389. private global::Tensorflow.StructuredValue outputSignature_;
  1390. /// <summary>
  1391. /// Output that was the return value of this function after replacing all
  1392. /// Tensors with TensorSpecs. This can be an arbitrary nested function and will
  1393. /// be used to reconstruct the full structure from pure tensors.
  1394. /// </summary>
  1395. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  1396. public global::Tensorflow.StructuredValue OutputSignature {
  1397. get { return outputSignature_; }
  1398. set {
  1399. outputSignature_ = value;
  1400. }
  1401. }
  1402. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  1403. public override bool Equals(object other) {
  1404. return Equals(other as SavedConcreteFunction);
  1405. }
  1406. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  1407. public bool Equals(SavedConcreteFunction other) {
  1408. if (ReferenceEquals(other, null)) {
  1409. return false;
  1410. }
  1411. if (ReferenceEquals(other, this)) {
  1412. return true;
  1413. }
  1414. if(!boundInputs_.Equals(other.boundInputs_)) return false;
  1415. if (!object.Equals(CanonicalizedInputSignature, other.CanonicalizedInputSignature)) return false;
  1416. if (!object.Equals(OutputSignature, other.OutputSignature)) return false;
  1417. return Equals(_unknownFields, other._unknownFields);
  1418. }
  1419. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  1420. public override int GetHashCode() {
  1421. int hash = 1;
  1422. hash ^= boundInputs_.GetHashCode();
  1423. if (canonicalizedInputSignature_ != null) hash ^= CanonicalizedInputSignature.GetHashCode();
  1424. if (outputSignature_ != null) hash ^= OutputSignature.GetHashCode();
  1425. if (_unknownFields != null) {
  1426. hash ^= _unknownFields.GetHashCode();
  1427. }
  1428. return hash;
  1429. }
  1430. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  1431. public override string ToString() {
  1432. return pb::JsonFormatter.ToDiagnosticString(this);
  1433. }
  1434. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  1435. public void WriteTo(pb::CodedOutputStream output) {
  1436. boundInputs_.WriteTo(output, _repeated_boundInputs_codec);
  1437. if (canonicalizedInputSignature_ != null) {
  1438. output.WriteRawTag(26);
  1439. output.WriteMessage(CanonicalizedInputSignature);
  1440. }
  1441. if (outputSignature_ != null) {
  1442. output.WriteRawTag(34);
  1443. output.WriteMessage(OutputSignature);
  1444. }
  1445. if (_unknownFields != null) {
  1446. _unknownFields.WriteTo(output);
  1447. }
  1448. }
  1449. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  1450. public int CalculateSize() {
  1451. int size = 0;
  1452. size += boundInputs_.CalculateSize(_repeated_boundInputs_codec);
  1453. if (canonicalizedInputSignature_ != null) {
  1454. size += 1 + pb::CodedOutputStream.ComputeMessageSize(CanonicalizedInputSignature);
  1455. }
  1456. if (outputSignature_ != null) {
  1457. size += 1 + pb::CodedOutputStream.ComputeMessageSize(OutputSignature);
  1458. }
  1459. if (_unknownFields != null) {
  1460. size += _unknownFields.CalculateSize();
  1461. }
  1462. return size;
  1463. }
  1464. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  1465. public void MergeFrom(SavedConcreteFunction other) {
  1466. if (other == null) {
  1467. return;
  1468. }
  1469. boundInputs_.Add(other.boundInputs_);
  1470. if (other.canonicalizedInputSignature_ != null) {
  1471. if (canonicalizedInputSignature_ == null) {
  1472. CanonicalizedInputSignature = new global::Tensorflow.StructuredValue();
  1473. }
  1474. CanonicalizedInputSignature.MergeFrom(other.CanonicalizedInputSignature);
  1475. }
  1476. if (other.outputSignature_ != null) {
  1477. if (outputSignature_ == null) {
  1478. OutputSignature = new global::Tensorflow.StructuredValue();
  1479. }
  1480. OutputSignature.MergeFrom(other.OutputSignature);
  1481. }
  1482. _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields);
  1483. }
  1484. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  1485. public void MergeFrom(pb::CodedInputStream input) {
  1486. uint tag;
  1487. while ((tag = input.ReadTag()) != 0) {
  1488. switch(tag) {
  1489. default:
  1490. _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input);
  1491. break;
  1492. case 18:
  1493. case 16: {
  1494. boundInputs_.AddEntriesFrom(input, _repeated_boundInputs_codec);
  1495. break;
  1496. }
  1497. case 26: {
  1498. if (canonicalizedInputSignature_ == null) {
  1499. CanonicalizedInputSignature = new global::Tensorflow.StructuredValue();
  1500. }
  1501. input.ReadMessage(CanonicalizedInputSignature);
  1502. break;
  1503. }
  1504. case 34: {
  1505. if (outputSignature_ == null) {
  1506. OutputSignature = new global::Tensorflow.StructuredValue();
  1507. }
  1508. input.ReadMessage(OutputSignature);
  1509. break;
  1510. }
  1511. }
  1512. }
  1513. }
  1514. }
  1515. public sealed partial class SavedBareConcreteFunction : pb::IMessage<SavedBareConcreteFunction> {
  1516. private static readonly pb::MessageParser<SavedBareConcreteFunction> _parser = new pb::MessageParser<SavedBareConcreteFunction>(() => new SavedBareConcreteFunction());
  1517. private pb::UnknownFieldSet _unknownFields;
  1518. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  1519. public static pb::MessageParser<SavedBareConcreteFunction> Parser { get { return _parser; } }
  1520. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  1521. public static pbr::MessageDescriptor Descriptor {
  1522. get { return global::Tensorflow.SavedObjectGraphReflection.Descriptor.MessageTypes[7]; }
  1523. }
  1524. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  1525. pbr::MessageDescriptor pb::IMessage.Descriptor {
  1526. get { return Descriptor; }
  1527. }
  1528. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  1529. public SavedBareConcreteFunction() {
  1530. OnConstruction();
  1531. }
  1532. partial void OnConstruction();
  1533. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  1534. public SavedBareConcreteFunction(SavedBareConcreteFunction other) : this() {
  1535. concreteFunctionName_ = other.concreteFunctionName_;
  1536. argumentKeywords_ = other.argumentKeywords_.Clone();
  1537. allowedPositionalArguments_ = other.allowedPositionalArguments_;
  1538. functionSpec_ = other.functionSpec_ != null ? other.functionSpec_.Clone() : null;
  1539. _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields);
  1540. }
  1541. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  1542. public SavedBareConcreteFunction Clone() {
  1543. return new SavedBareConcreteFunction(this);
  1544. }
  1545. /// <summary>Field number for the "concrete_function_name" field.</summary>
  1546. public const int ConcreteFunctionNameFieldNumber = 1;
  1547. private string concreteFunctionName_ = "";
  1548. /// <summary>
  1549. /// Identifies a SavedConcreteFunction.
  1550. /// </summary>
  1551. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  1552. public string ConcreteFunctionName {
  1553. get { return concreteFunctionName_; }
  1554. set {
  1555. concreteFunctionName_ = pb::ProtoPreconditions.CheckNotNull(value, "value");
  1556. }
  1557. }
  1558. /// <summary>Field number for the "argument_keywords" field.</summary>
  1559. public const int ArgumentKeywordsFieldNumber = 2;
  1560. private static readonly pb::FieldCodec<string> _repeated_argumentKeywords_codec
  1561. = pb::FieldCodec.ForString(18);
  1562. private readonly pbc::RepeatedField<string> argumentKeywords_ = new pbc::RepeatedField<string>();
  1563. /// <summary>
  1564. /// A sequence of unique strings, one per Tensor argument.
  1565. /// </summary>
  1566. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  1567. public pbc::RepeatedField<string> ArgumentKeywords {
  1568. get { return argumentKeywords_; }
  1569. }
  1570. /// <summary>Field number for the "allowed_positional_arguments" field.</summary>
  1571. public const int AllowedPositionalArgumentsFieldNumber = 3;
  1572. private long allowedPositionalArguments_;
  1573. /// <summary>
  1574. /// The prefix of `argument_keywords` which may be identified by position.
  1575. /// </summary>
  1576. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  1577. public long AllowedPositionalArguments {
  1578. get { return allowedPositionalArguments_; }
  1579. set {
  1580. allowedPositionalArguments_ = value;
  1581. }
  1582. }
  1583. /// <summary>Field number for the "function_spec" field.</summary>
  1584. public const int FunctionSpecFieldNumber = 4;
  1585. private global::Tensorflow.FunctionSpec functionSpec_;
  1586. /// <summary>
  1587. /// The spec of the function that this ConcreteFunction is traced from. This
  1588. /// allows the ConcreteFunction to be called with nest structure inputs. This
  1589. /// field may not be populated. If this field is absent, the concrete function
  1590. /// can only be called with flat inputs.
  1591. /// TODO(b/169361281): support calling saved ConcreteFunction with structured
  1592. /// inputs in C++ SavedModel API.
  1593. /// </summary>
  1594. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  1595. public global::Tensorflow.FunctionSpec FunctionSpec {
  1596. get { return functionSpec_; }
  1597. set {
  1598. functionSpec_ = value;
  1599. }
  1600. }
  1601. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  1602. public override bool Equals(object other) {
  1603. return Equals(other as SavedBareConcreteFunction);
  1604. }
  1605. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  1606. public bool Equals(SavedBareConcreteFunction other) {
  1607. if (ReferenceEquals(other, null)) {
  1608. return false;
  1609. }
  1610. if (ReferenceEquals(other, this)) {
  1611. return true;
  1612. }
  1613. if (ConcreteFunctionName != other.ConcreteFunctionName) return false;
  1614. if(!argumentKeywords_.Equals(other.argumentKeywords_)) return false;
  1615. if (AllowedPositionalArguments != other.AllowedPositionalArguments) return false;
  1616. if (!object.Equals(FunctionSpec, other.FunctionSpec)) return false;
  1617. return Equals(_unknownFields, other._unknownFields);
  1618. }
  1619. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  1620. public override int GetHashCode() {
  1621. int hash = 1;
  1622. if (ConcreteFunctionName.Length != 0) hash ^= ConcreteFunctionName.GetHashCode();
  1623. hash ^= argumentKeywords_.GetHashCode();
  1624. if (AllowedPositionalArguments != 0L) hash ^= AllowedPositionalArguments.GetHashCode();
  1625. if (functionSpec_ != null) hash ^= FunctionSpec.GetHashCode();
  1626. if (_unknownFields != null) {
  1627. hash ^= _unknownFields.GetHashCode();
  1628. }
  1629. return hash;
  1630. }
  1631. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  1632. public override string ToString() {
  1633. return pb::JsonFormatter.ToDiagnosticString(this);
  1634. }
  1635. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  1636. public void WriteTo(pb::CodedOutputStream output) {
  1637. if (ConcreteFunctionName.Length != 0) {
  1638. output.WriteRawTag(10);
  1639. output.WriteString(ConcreteFunctionName);
  1640. }
  1641. argumentKeywords_.WriteTo(output, _repeated_argumentKeywords_codec);
  1642. if (AllowedPositionalArguments != 0L) {
  1643. output.WriteRawTag(24);
  1644. output.WriteInt64(AllowedPositionalArguments);
  1645. }
  1646. if (functionSpec_ != null) {
  1647. output.WriteRawTag(34);
  1648. output.WriteMessage(FunctionSpec);
  1649. }
  1650. if (_unknownFields != null) {
  1651. _unknownFields.WriteTo(output);
  1652. }
  1653. }
  1654. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  1655. public int CalculateSize() {
  1656. int size = 0;
  1657. if (ConcreteFunctionName.Length != 0) {
  1658. size += 1 + pb::CodedOutputStream.ComputeStringSize(ConcreteFunctionName);
  1659. }
  1660. size += argumentKeywords_.CalculateSize(_repeated_argumentKeywords_codec);
  1661. if (AllowedPositionalArguments != 0L) {
  1662. size += 1 + pb::CodedOutputStream.ComputeInt64Size(AllowedPositionalArguments);
  1663. }
  1664. if (functionSpec_ != null) {
  1665. size += 1 + pb::CodedOutputStream.ComputeMessageSize(FunctionSpec);
  1666. }
  1667. if (_unknownFields != null) {
  1668. size += _unknownFields.CalculateSize();
  1669. }
  1670. return size;
  1671. }
  1672. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  1673. public void MergeFrom(SavedBareConcreteFunction other) {
  1674. if (other == null) {
  1675. return;
  1676. }
  1677. if (other.ConcreteFunctionName.Length != 0) {
  1678. ConcreteFunctionName = other.ConcreteFunctionName;
  1679. }
  1680. argumentKeywords_.Add(other.argumentKeywords_);
  1681. if (other.AllowedPositionalArguments != 0L) {
  1682. AllowedPositionalArguments = other.AllowedPositionalArguments;
  1683. }
  1684. if (other.functionSpec_ != null) {
  1685. if (functionSpec_ == null) {
  1686. FunctionSpec = new global::Tensorflow.FunctionSpec();
  1687. }
  1688. FunctionSpec.MergeFrom(other.FunctionSpec);
  1689. }
  1690. _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields);
  1691. }
  1692. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  1693. public void MergeFrom(pb::CodedInputStream input) {
  1694. uint tag;
  1695. while ((tag = input.ReadTag()) != 0) {
  1696. switch(tag) {
  1697. default:
  1698. _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input);
  1699. break;
  1700. case 10: {
  1701. ConcreteFunctionName = input.ReadString();
  1702. break;
  1703. }
  1704. case 18: {
  1705. argumentKeywords_.AddEntriesFrom(input, _repeated_argumentKeywords_codec);
  1706. break;
  1707. }
  1708. case 24: {
  1709. AllowedPositionalArguments = input.ReadInt64();
  1710. break;
  1711. }
  1712. case 34: {
  1713. if (functionSpec_ == null) {
  1714. FunctionSpec = new global::Tensorflow.FunctionSpec();
  1715. }
  1716. input.ReadMessage(FunctionSpec);
  1717. break;
  1718. }
  1719. }
  1720. }
  1721. }
  1722. }
  1723. public sealed partial class SavedConstant : pb::IMessage<SavedConstant> {
  1724. private static readonly pb::MessageParser<SavedConstant> _parser = new pb::MessageParser<SavedConstant>(() => new SavedConstant());
  1725. private pb::UnknownFieldSet _unknownFields;
  1726. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  1727. public static pb::MessageParser<SavedConstant> Parser { get { return _parser; } }
  1728. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  1729. public static pbr::MessageDescriptor Descriptor {
  1730. get { return global::Tensorflow.SavedObjectGraphReflection.Descriptor.MessageTypes[8]; }
  1731. }
  1732. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  1733. pbr::MessageDescriptor pb::IMessage.Descriptor {
  1734. get { return Descriptor; }
  1735. }
  1736. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  1737. public SavedConstant() {
  1738. OnConstruction();
  1739. }
  1740. partial void OnConstruction();
  1741. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  1742. public SavedConstant(SavedConstant other) : this() {
  1743. operation_ = other.operation_;
  1744. _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields);
  1745. }
  1746. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  1747. public SavedConstant Clone() {
  1748. return new SavedConstant(this);
  1749. }
  1750. /// <summary>Field number for the "operation" field.</summary>
  1751. public const int OperationFieldNumber = 1;
  1752. private string operation_ = "";
  1753. /// <summary>
  1754. /// An Operation name for a ConstantOp in this SavedObjectGraph's MetaGraph.
  1755. /// </summary>
  1756. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  1757. public string Operation {
  1758. get { return operation_; }
  1759. set {
  1760. operation_ = pb::ProtoPreconditions.CheckNotNull(value, "value");
  1761. }
  1762. }
  1763. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  1764. public override bool Equals(object other) {
  1765. return Equals(other as SavedConstant);
  1766. }
  1767. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  1768. public bool Equals(SavedConstant other) {
  1769. if (ReferenceEquals(other, null)) {
  1770. return false;
  1771. }
  1772. if (ReferenceEquals(other, this)) {
  1773. return true;
  1774. }
  1775. if (Operation != other.Operation) return false;
  1776. return Equals(_unknownFields, other._unknownFields);
  1777. }
  1778. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  1779. public override int GetHashCode() {
  1780. int hash = 1;
  1781. if (Operation.Length != 0) hash ^= Operation.GetHashCode();
  1782. if (_unknownFields != null) {
  1783. hash ^= _unknownFields.GetHashCode();
  1784. }
  1785. return hash;
  1786. }
  1787. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  1788. public override string ToString() {
  1789. return pb::JsonFormatter.ToDiagnosticString(this);
  1790. }
  1791. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  1792. public void WriteTo(pb::CodedOutputStream output) {
  1793. if (Operation.Length != 0) {
  1794. output.WriteRawTag(10);
  1795. output.WriteString(Operation);
  1796. }
  1797. if (_unknownFields != null) {
  1798. _unknownFields.WriteTo(output);
  1799. }
  1800. }
  1801. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  1802. public int CalculateSize() {
  1803. int size = 0;
  1804. if (Operation.Length != 0) {
  1805. size += 1 + pb::CodedOutputStream.ComputeStringSize(Operation);
  1806. }
  1807. if (_unknownFields != null) {
  1808. size += _unknownFields.CalculateSize();
  1809. }
  1810. return size;
  1811. }
  1812. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  1813. public void MergeFrom(SavedConstant other) {
  1814. if (other == null) {
  1815. return;
  1816. }
  1817. if (other.Operation.Length != 0) {
  1818. Operation = other.Operation;
  1819. }
  1820. _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields);
  1821. }
  1822. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  1823. public void MergeFrom(pb::CodedInputStream input) {
  1824. uint tag;
  1825. while ((tag = input.ReadTag()) != 0) {
  1826. switch(tag) {
  1827. default:
  1828. _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input);
  1829. break;
  1830. case 10: {
  1831. Operation = input.ReadString();
  1832. break;
  1833. }
  1834. }
  1835. }
  1836. }
  1837. }
  1838. /// <summary>
  1839. /// Represents a Variable that is initialized by loading the contents from the
  1840. /// checkpoint.
  1841. /// </summary>
  1842. public sealed partial class SavedVariable : pb::IMessage<SavedVariable> {
  1843. private static readonly pb::MessageParser<SavedVariable> _parser = new pb::MessageParser<SavedVariable>(() => new SavedVariable());
  1844. private pb::UnknownFieldSet _unknownFields;
  1845. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  1846. public static pb::MessageParser<SavedVariable> Parser { get { return _parser; } }
  1847. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  1848. public static pbr::MessageDescriptor Descriptor {
  1849. get { return global::Tensorflow.SavedObjectGraphReflection.Descriptor.MessageTypes[9]; }
  1850. }
  1851. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  1852. pbr::MessageDescriptor pb::IMessage.Descriptor {
  1853. get { return Descriptor; }
  1854. }
  1855. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  1856. public SavedVariable() {
  1857. OnConstruction();
  1858. }
  1859. partial void OnConstruction();
  1860. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  1861. public SavedVariable(SavedVariable other) : this() {
  1862. dtype_ = other.dtype_;
  1863. shape_ = other.shape_ != null ? other.shape_.Clone() : null;
  1864. trainable_ = other.trainable_;
  1865. synchronization_ = other.synchronization_;
  1866. aggregation_ = other.aggregation_;
  1867. name_ = other.name_;
  1868. device_ = other.device_;
  1869. experimentalDistributedVariableComponents_ = other.experimentalDistributedVariableComponents_.Clone();
  1870. _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields);
  1871. }
  1872. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  1873. public SavedVariable Clone() {
  1874. return new SavedVariable(this);
  1875. }
  1876. /// <summary>Field number for the "dtype" field.</summary>
  1877. public const int DtypeFieldNumber = 1;
  1878. private global::Tensorflow.DataType dtype_ = global::Tensorflow.DataType.DtInvalid;
  1879. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  1880. public global::Tensorflow.DataType Dtype {
  1881. get { return dtype_; }
  1882. set {
  1883. dtype_ = value;
  1884. }
  1885. }
  1886. /// <summary>Field number for the "shape" field.</summary>
  1887. public const int ShapeFieldNumber = 2;
  1888. private global::Tensorflow.TensorShapeProto shape_;
  1889. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  1890. public global::Tensorflow.TensorShapeProto Shape {
  1891. get { return shape_; }
  1892. set {
  1893. shape_ = value;
  1894. }
  1895. }
  1896. /// <summary>Field number for the "trainable" field.</summary>
  1897. public const int TrainableFieldNumber = 3;
  1898. private bool trainable_;
  1899. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  1900. public bool Trainable {
  1901. get { return trainable_; }
  1902. set {
  1903. trainable_ = value;
  1904. }
  1905. }
  1906. /// <summary>Field number for the "synchronization" field.</summary>
  1907. public const int SynchronizationFieldNumber = 4;
  1908. private global::Tensorflow.VariableSynchronization synchronization_ = global::Tensorflow.VariableSynchronization.Auto;
  1909. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  1910. public global::Tensorflow.VariableSynchronization Synchronization {
  1911. get { return synchronization_; }
  1912. set {
  1913. synchronization_ = value;
  1914. }
  1915. }
  1916. /// <summary>Field number for the "aggregation" field.</summary>
  1917. public const int AggregationFieldNumber = 5;
  1918. private global::Tensorflow.VariableAggregation aggregation_ = global::Tensorflow.VariableAggregation.None;
  1919. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  1920. public global::Tensorflow.VariableAggregation Aggregation {
  1921. get { return aggregation_; }
  1922. set {
  1923. aggregation_ = value;
  1924. }
  1925. }
  1926. /// <summary>Field number for the "name" field.</summary>
  1927. public const int NameFieldNumber = 6;
  1928. private string name_ = "";
  1929. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  1930. public string Name {
  1931. get { return name_; }
  1932. set {
  1933. name_ = pb::ProtoPreconditions.CheckNotNull(value, "value");
  1934. }
  1935. }
  1936. /// <summary>Field number for the "device" field.</summary>
  1937. public const int DeviceFieldNumber = 7;
  1938. private string device_ = "";
  1939. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  1940. public string Device {
  1941. get { return device_; }
  1942. set {
  1943. device_ = pb::ProtoPreconditions.CheckNotNull(value, "value");
  1944. }
  1945. }
  1946. /// <summary>Field number for the "experimental_distributed_variable_components" field.</summary>
  1947. public const int ExperimentalDistributedVariableComponentsFieldNumber = 8;
  1948. private static readonly pb::FieldCodec<global::Tensorflow.SavedVariable> _repeated_experimentalDistributedVariableComponents_codec
  1949. = pb::FieldCodec.ForMessage(66, global::Tensorflow.SavedVariable.Parser);
  1950. private readonly pbc::RepeatedField<global::Tensorflow.SavedVariable> experimentalDistributedVariableComponents_ = new pbc::RepeatedField<global::Tensorflow.SavedVariable>();
  1951. /// <summary>
  1952. /// List of component variables for a distributed variable.
  1953. ///
  1954. /// When this field is non-empty, the SavedVariable will be assumed
  1955. /// to be a distributed variable defined by the components listed here.
  1956. ///
  1957. /// This is only supported by experimental loaders at the moment.
  1958. /// </summary>
  1959. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  1960. public pbc::RepeatedField<global::Tensorflow.SavedVariable> ExperimentalDistributedVariableComponents {
  1961. get { return experimentalDistributedVariableComponents_; }
  1962. }
  1963. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  1964. public override bool Equals(object other) {
  1965. return Equals(other as SavedVariable);
  1966. }
  1967. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  1968. public bool Equals(SavedVariable other) {
  1969. if (ReferenceEquals(other, null)) {
  1970. return false;
  1971. }
  1972. if (ReferenceEquals(other, this)) {
  1973. return true;
  1974. }
  1975. if (Dtype != other.Dtype) return false;
  1976. if (!object.Equals(Shape, other.Shape)) return false;
  1977. if (Trainable != other.Trainable) return false;
  1978. if (Synchronization != other.Synchronization) return false;
  1979. if (Aggregation != other.Aggregation) return false;
  1980. if (Name != other.Name) return false;
  1981. if (Device != other.Device) return false;
  1982. if(!experimentalDistributedVariableComponents_.Equals(other.experimentalDistributedVariableComponents_)) return false;
  1983. return Equals(_unknownFields, other._unknownFields);
  1984. }
  1985. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  1986. public override int GetHashCode() {
  1987. int hash = 1;
  1988. if (Dtype != global::Tensorflow.DataType.DtInvalid) hash ^= Dtype.GetHashCode();
  1989. if (shape_ != null) hash ^= Shape.GetHashCode();
  1990. if (Trainable != false) hash ^= Trainable.GetHashCode();
  1991. if (Synchronization != global::Tensorflow.VariableSynchronization.Auto) hash ^= Synchronization.GetHashCode();
  1992. if (Aggregation != global::Tensorflow.VariableAggregation.None) hash ^= Aggregation.GetHashCode();
  1993. if (Name.Length != 0) hash ^= Name.GetHashCode();
  1994. if (Device.Length != 0) hash ^= Device.GetHashCode();
  1995. hash ^= experimentalDistributedVariableComponents_.GetHashCode();
  1996. if (_unknownFields != null) {
  1997. hash ^= _unknownFields.GetHashCode();
  1998. }
  1999. return hash;
  2000. }
  2001. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  2002. public override string ToString() {
  2003. return pb::JsonFormatter.ToDiagnosticString(this);
  2004. }
  2005. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  2006. public void WriteTo(pb::CodedOutputStream output) {
  2007. if (Dtype != global::Tensorflow.DataType.DtInvalid) {
  2008. output.WriteRawTag(8);
  2009. output.WriteEnum((int) Dtype);
  2010. }
  2011. if (shape_ != null) {
  2012. output.WriteRawTag(18);
  2013. output.WriteMessage(Shape);
  2014. }
  2015. if (Trainable != false) {
  2016. output.WriteRawTag(24);
  2017. output.WriteBool(Trainable);
  2018. }
  2019. if (Synchronization != global::Tensorflow.VariableSynchronization.Auto) {
  2020. output.WriteRawTag(32);
  2021. output.WriteEnum((int) Synchronization);
  2022. }
  2023. if (Aggregation != global::Tensorflow.VariableAggregation.None) {
  2024. output.WriteRawTag(40);
  2025. output.WriteEnum((int) Aggregation);
  2026. }
  2027. if (Name.Length != 0) {
  2028. output.WriteRawTag(50);
  2029. output.WriteString(Name);
  2030. }
  2031. if (Device.Length != 0) {
  2032. output.WriteRawTag(58);
  2033. output.WriteString(Device);
  2034. }
  2035. experimentalDistributedVariableComponents_.WriteTo(output, _repeated_experimentalDistributedVariableComponents_codec);
  2036. if (_unknownFields != null) {
  2037. _unknownFields.WriteTo(output);
  2038. }
  2039. }
  2040. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  2041. public int CalculateSize() {
  2042. int size = 0;
  2043. if (Dtype != global::Tensorflow.DataType.DtInvalid) {
  2044. size += 1 + pb::CodedOutputStream.ComputeEnumSize((int) Dtype);
  2045. }
  2046. if (shape_ != null) {
  2047. size += 1 + pb::CodedOutputStream.ComputeMessageSize(Shape);
  2048. }
  2049. if (Trainable != false) {
  2050. size += 1 + 1;
  2051. }
  2052. if (Synchronization != global::Tensorflow.VariableSynchronization.Auto) {
  2053. size += 1 + pb::CodedOutputStream.ComputeEnumSize((int) Synchronization);
  2054. }
  2055. if (Aggregation != global::Tensorflow.VariableAggregation.None) {
  2056. size += 1 + pb::CodedOutputStream.ComputeEnumSize((int) Aggregation);
  2057. }
  2058. if (Name.Length != 0) {
  2059. size += 1 + pb::CodedOutputStream.ComputeStringSize(Name);
  2060. }
  2061. if (Device.Length != 0) {
  2062. size += 1 + pb::CodedOutputStream.ComputeStringSize(Device);
  2063. }
  2064. size += experimentalDistributedVariableComponents_.CalculateSize(_repeated_experimentalDistributedVariableComponents_codec);
  2065. if (_unknownFields != null) {
  2066. size += _unknownFields.CalculateSize();
  2067. }
  2068. return size;
  2069. }
  2070. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  2071. public void MergeFrom(SavedVariable other) {
  2072. if (other == null) {
  2073. return;
  2074. }
  2075. if (other.Dtype != global::Tensorflow.DataType.DtInvalid) {
  2076. Dtype = other.Dtype;
  2077. }
  2078. if (other.shape_ != null) {
  2079. if (shape_ == null) {
  2080. Shape = new global::Tensorflow.TensorShapeProto();
  2081. }
  2082. Shape.MergeFrom(other.Shape);
  2083. }
  2084. if (other.Trainable != false) {
  2085. Trainable = other.Trainable;
  2086. }
  2087. if (other.Synchronization != global::Tensorflow.VariableSynchronization.Auto) {
  2088. Synchronization = other.Synchronization;
  2089. }
  2090. if (other.Aggregation != global::Tensorflow.VariableAggregation.None) {
  2091. Aggregation = other.Aggregation;
  2092. }
  2093. if (other.Name.Length != 0) {
  2094. Name = other.Name;
  2095. }
  2096. if (other.Device.Length != 0) {
  2097. Device = other.Device;
  2098. }
  2099. experimentalDistributedVariableComponents_.Add(other.experimentalDistributedVariableComponents_);
  2100. _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields);
  2101. }
  2102. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  2103. public void MergeFrom(pb::CodedInputStream input) {
  2104. uint tag;
  2105. while ((tag = input.ReadTag()) != 0) {
  2106. switch(tag) {
  2107. default:
  2108. _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input);
  2109. break;
  2110. case 8: {
  2111. Dtype = (global::Tensorflow.DataType) input.ReadEnum();
  2112. break;
  2113. }
  2114. case 18: {
  2115. if (shape_ == null) {
  2116. Shape = new global::Tensorflow.TensorShapeProto();
  2117. }
  2118. input.ReadMessage(Shape);
  2119. break;
  2120. }
  2121. case 24: {
  2122. Trainable = input.ReadBool();
  2123. break;
  2124. }
  2125. case 32: {
  2126. Synchronization = (global::Tensorflow.VariableSynchronization) input.ReadEnum();
  2127. break;
  2128. }
  2129. case 40: {
  2130. Aggregation = (global::Tensorflow.VariableAggregation) input.ReadEnum();
  2131. break;
  2132. }
  2133. case 50: {
  2134. Name = input.ReadString();
  2135. break;
  2136. }
  2137. case 58: {
  2138. Device = input.ReadString();
  2139. break;
  2140. }
  2141. case 66: {
  2142. experimentalDistributedVariableComponents_.AddEntriesFrom(input, _repeated_experimentalDistributedVariableComponents_codec);
  2143. break;
  2144. }
  2145. }
  2146. }
  2147. }
  2148. }
  2149. /// <summary>
  2150. /// Represents `FunctionSpec` used in `Function`. This represents a
  2151. /// function that has been wrapped as a TensorFlow `Function`.
  2152. /// </summary>
  2153. public sealed partial class FunctionSpec : pb::IMessage<FunctionSpec> {
  2154. private static readonly pb::MessageParser<FunctionSpec> _parser = new pb::MessageParser<FunctionSpec>(() => new FunctionSpec());
  2155. private pb::UnknownFieldSet _unknownFields;
  2156. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  2157. public static pb::MessageParser<FunctionSpec> Parser { get { return _parser; } }
  2158. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  2159. public static pbr::MessageDescriptor Descriptor {
  2160. get { return global::Tensorflow.SavedObjectGraphReflection.Descriptor.MessageTypes[10]; }
  2161. }
  2162. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  2163. pbr::MessageDescriptor pb::IMessage.Descriptor {
  2164. get { return Descriptor; }
  2165. }
  2166. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  2167. public FunctionSpec() {
  2168. OnConstruction();
  2169. }
  2170. partial void OnConstruction();
  2171. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  2172. public FunctionSpec(FunctionSpec other) : this() {
  2173. fullargspec_ = other.fullargspec_ != null ? other.fullargspec_.Clone() : null;
  2174. isMethod_ = other.isMethod_;
  2175. inputSignature_ = other.inputSignature_ != null ? other.inputSignature_.Clone() : null;
  2176. jitCompile_ = other.jitCompile_;
  2177. _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields);
  2178. }
  2179. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  2180. public FunctionSpec Clone() {
  2181. return new FunctionSpec(this);
  2182. }
  2183. /// <summary>Field number for the "fullargspec" field.</summary>
  2184. public const int FullargspecFieldNumber = 1;
  2185. private global::Tensorflow.StructuredValue fullargspec_;
  2186. /// <summary>
  2187. /// Full arg spec from inspect.getfullargspec().
  2188. /// </summary>
  2189. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  2190. public global::Tensorflow.StructuredValue Fullargspec {
  2191. get { return fullargspec_; }
  2192. set {
  2193. fullargspec_ = value;
  2194. }
  2195. }
  2196. /// <summary>Field number for the "is_method" field.</summary>
  2197. public const int IsMethodFieldNumber = 2;
  2198. private bool isMethod_;
  2199. /// <summary>
  2200. /// Whether this represents a class method.
  2201. /// </summary>
  2202. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  2203. public bool IsMethod {
  2204. get { return isMethod_; }
  2205. set {
  2206. isMethod_ = value;
  2207. }
  2208. }
  2209. /// <summary>Field number for the "input_signature" field.</summary>
  2210. public const int InputSignatureFieldNumber = 5;
  2211. private global::Tensorflow.StructuredValue inputSignature_;
  2212. /// <summary>
  2213. /// The input signature, if specified.
  2214. /// </summary>
  2215. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  2216. public global::Tensorflow.StructuredValue InputSignature {
  2217. get { return inputSignature_; }
  2218. set {
  2219. inputSignature_ = value;
  2220. }
  2221. }
  2222. /// <summary>Field number for the "jit_compile" field.</summary>
  2223. public const int JitCompileFieldNumber = 6;
  2224. private global::Tensorflow.FunctionSpec.Types.JitCompile jitCompile_ = global::Tensorflow.FunctionSpec.Types.JitCompile.Default;
  2225. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  2226. public global::Tensorflow.FunctionSpec.Types.JitCompile JitCompile {
  2227. get { return jitCompile_; }
  2228. set {
  2229. jitCompile_ = value;
  2230. }
  2231. }
  2232. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  2233. public override bool Equals(object other) {
  2234. return Equals(other as FunctionSpec);
  2235. }
  2236. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  2237. public bool Equals(FunctionSpec other) {
  2238. if (ReferenceEquals(other, null)) {
  2239. return false;
  2240. }
  2241. if (ReferenceEquals(other, this)) {
  2242. return true;
  2243. }
  2244. if (!object.Equals(Fullargspec, other.Fullargspec)) return false;
  2245. if (IsMethod != other.IsMethod) return false;
  2246. if (!object.Equals(InputSignature, other.InputSignature)) return false;
  2247. if (JitCompile != other.JitCompile) return false;
  2248. return Equals(_unknownFields, other._unknownFields);
  2249. }
  2250. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  2251. public override int GetHashCode() {
  2252. int hash = 1;
  2253. if (fullargspec_ != null) hash ^= Fullargspec.GetHashCode();
  2254. if (IsMethod != false) hash ^= IsMethod.GetHashCode();
  2255. if (inputSignature_ != null) hash ^= InputSignature.GetHashCode();
  2256. if (JitCompile != global::Tensorflow.FunctionSpec.Types.JitCompile.Default) hash ^= JitCompile.GetHashCode();
  2257. if (_unknownFields != null) {
  2258. hash ^= _unknownFields.GetHashCode();
  2259. }
  2260. return hash;
  2261. }
  2262. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  2263. public override string ToString() {
  2264. return pb::JsonFormatter.ToDiagnosticString(this);
  2265. }
  2266. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  2267. public void WriteTo(pb::CodedOutputStream output) {
  2268. if (fullargspec_ != null) {
  2269. output.WriteRawTag(10);
  2270. output.WriteMessage(Fullargspec);
  2271. }
  2272. if (IsMethod != false) {
  2273. output.WriteRawTag(16);
  2274. output.WriteBool(IsMethod);
  2275. }
  2276. if (inputSignature_ != null) {
  2277. output.WriteRawTag(42);
  2278. output.WriteMessage(InputSignature);
  2279. }
  2280. if (JitCompile != global::Tensorflow.FunctionSpec.Types.JitCompile.Default) {
  2281. output.WriteRawTag(48);
  2282. output.WriteEnum((int) JitCompile);
  2283. }
  2284. if (_unknownFields != null) {
  2285. _unknownFields.WriteTo(output);
  2286. }
  2287. }
  2288. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  2289. public int CalculateSize() {
  2290. int size = 0;
  2291. if (fullargspec_ != null) {
  2292. size += 1 + pb::CodedOutputStream.ComputeMessageSize(Fullargspec);
  2293. }
  2294. if (IsMethod != false) {
  2295. size += 1 + 1;
  2296. }
  2297. if (inputSignature_ != null) {
  2298. size += 1 + pb::CodedOutputStream.ComputeMessageSize(InputSignature);
  2299. }
  2300. if (JitCompile != global::Tensorflow.FunctionSpec.Types.JitCompile.Default) {
  2301. size += 1 + pb::CodedOutputStream.ComputeEnumSize((int) JitCompile);
  2302. }
  2303. if (_unknownFields != null) {
  2304. size += _unknownFields.CalculateSize();
  2305. }
  2306. return size;
  2307. }
  2308. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  2309. public void MergeFrom(FunctionSpec other) {
  2310. if (other == null) {
  2311. return;
  2312. }
  2313. if (other.fullargspec_ != null) {
  2314. if (fullargspec_ == null) {
  2315. Fullargspec = new global::Tensorflow.StructuredValue();
  2316. }
  2317. Fullargspec.MergeFrom(other.Fullargspec);
  2318. }
  2319. if (other.IsMethod != false) {
  2320. IsMethod = other.IsMethod;
  2321. }
  2322. if (other.inputSignature_ != null) {
  2323. if (inputSignature_ == null) {
  2324. InputSignature = new global::Tensorflow.StructuredValue();
  2325. }
  2326. InputSignature.MergeFrom(other.InputSignature);
  2327. }
  2328. if (other.JitCompile != global::Tensorflow.FunctionSpec.Types.JitCompile.Default) {
  2329. JitCompile = other.JitCompile;
  2330. }
  2331. _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields);
  2332. }
  2333. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  2334. public void MergeFrom(pb::CodedInputStream input) {
  2335. uint tag;
  2336. while ((tag = input.ReadTag()) != 0) {
  2337. switch(tag) {
  2338. default:
  2339. _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input);
  2340. break;
  2341. case 10: {
  2342. if (fullargspec_ == null) {
  2343. Fullargspec = new global::Tensorflow.StructuredValue();
  2344. }
  2345. input.ReadMessage(Fullargspec);
  2346. break;
  2347. }
  2348. case 16: {
  2349. IsMethod = input.ReadBool();
  2350. break;
  2351. }
  2352. case 42: {
  2353. if (inputSignature_ == null) {
  2354. InputSignature = new global::Tensorflow.StructuredValue();
  2355. }
  2356. input.ReadMessage(InputSignature);
  2357. break;
  2358. }
  2359. case 48: {
  2360. JitCompile = (global::Tensorflow.FunctionSpec.Types.JitCompile) input.ReadEnum();
  2361. break;
  2362. }
  2363. }
  2364. }
  2365. }
  2366. #region Nested types
  2367. /// <summary>Container for nested types declared in the FunctionSpec message type.</summary>
  2368. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  2369. public static partial class Types {
  2370. /// <summary>
  2371. /// Whether the function should be compiled by XLA.
  2372. ///
  2373. /// The public interface to `tf.function` uses an optional boolean to
  2374. /// represent three distinct states for this field. Unfortunately, proto3
  2375. /// removes the ability to explicitly check for the presence or absence of a
  2376. /// field, so we instead map to an enum.
  2377. ///
  2378. /// See `tf.function` for details.
  2379. /// </summary>
  2380. public enum JitCompile {
  2381. [pbr::OriginalName("DEFAULT")] Default = 0,
  2382. [pbr::OriginalName("ON")] On = 1,
  2383. [pbr::OriginalName("OFF")] Off = 2,
  2384. }
  2385. }
  2386. #endregion
  2387. }
  2388. /// <summary>
  2389. /// A SavedResource represents a TF object that holds state during its lifetime.
  2390. /// An object of this type can have a reference to a:
  2391. /// create_resource() and an initialize() function.
  2392. /// </summary>
  2393. public sealed partial class SavedResource : pb::IMessage<SavedResource> {
  2394. private static readonly pb::MessageParser<SavedResource> _parser = new pb::MessageParser<SavedResource>(() => new SavedResource());
  2395. private pb::UnknownFieldSet _unknownFields;
  2396. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  2397. public static pb::MessageParser<SavedResource> Parser { get { return _parser; } }
  2398. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  2399. public static pbr::MessageDescriptor Descriptor {
  2400. get { return global::Tensorflow.SavedObjectGraphReflection.Descriptor.MessageTypes[11]; }
  2401. }
  2402. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  2403. pbr::MessageDescriptor pb::IMessage.Descriptor {
  2404. get { return Descriptor; }
  2405. }
  2406. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  2407. public SavedResource() {
  2408. OnConstruction();
  2409. }
  2410. partial void OnConstruction();
  2411. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  2412. public SavedResource(SavedResource other) : this() {
  2413. device_ = other.device_;
  2414. _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields);
  2415. }
  2416. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  2417. public SavedResource Clone() {
  2418. return new SavedResource(this);
  2419. }
  2420. /// <summary>Field number for the "device" field.</summary>
  2421. public const int DeviceFieldNumber = 1;
  2422. private string device_ = "";
  2423. /// <summary>
  2424. /// A device specification indicating a required placement for the resource
  2425. /// creation function, e.g. "CPU". An empty string allows the user to select a
  2426. /// device.
  2427. /// </summary>
  2428. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  2429. public string Device {
  2430. get { return device_; }
  2431. set {
  2432. device_ = pb::ProtoPreconditions.CheckNotNull(value, "value");
  2433. }
  2434. }
  2435. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  2436. public override bool Equals(object other) {
  2437. return Equals(other as SavedResource);
  2438. }
  2439. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  2440. public bool Equals(SavedResource other) {
  2441. if (ReferenceEquals(other, null)) {
  2442. return false;
  2443. }
  2444. if (ReferenceEquals(other, this)) {
  2445. return true;
  2446. }
  2447. if (Device != other.Device) return false;
  2448. return Equals(_unknownFields, other._unknownFields);
  2449. }
  2450. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  2451. public override int GetHashCode() {
  2452. int hash = 1;
  2453. if (Device.Length != 0) hash ^= Device.GetHashCode();
  2454. if (_unknownFields != null) {
  2455. hash ^= _unknownFields.GetHashCode();
  2456. }
  2457. return hash;
  2458. }
  2459. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  2460. public override string ToString() {
  2461. return pb::JsonFormatter.ToDiagnosticString(this);
  2462. }
  2463. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  2464. public void WriteTo(pb::CodedOutputStream output) {
  2465. if (Device.Length != 0) {
  2466. output.WriteRawTag(10);
  2467. output.WriteString(Device);
  2468. }
  2469. if (_unknownFields != null) {
  2470. _unknownFields.WriteTo(output);
  2471. }
  2472. }
  2473. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  2474. public int CalculateSize() {
  2475. int size = 0;
  2476. if (Device.Length != 0) {
  2477. size += 1 + pb::CodedOutputStream.ComputeStringSize(Device);
  2478. }
  2479. if (_unknownFields != null) {
  2480. size += _unknownFields.CalculateSize();
  2481. }
  2482. return size;
  2483. }
  2484. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  2485. public void MergeFrom(SavedResource other) {
  2486. if (other == null) {
  2487. return;
  2488. }
  2489. if (other.Device.Length != 0) {
  2490. Device = other.Device;
  2491. }
  2492. _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields);
  2493. }
  2494. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  2495. public void MergeFrom(pb::CodedInputStream input) {
  2496. uint tag;
  2497. while ((tag = input.ReadTag()) != 0) {
  2498. switch(tag) {
  2499. default:
  2500. _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input);
  2501. break;
  2502. case 10: {
  2503. Device = input.ReadString();
  2504. break;
  2505. }
  2506. }
  2507. }
  2508. }
  2509. }
  2510. public sealed partial class SaveableObject : pb::IMessage<SaveableObject> {
  2511. private static readonly pb::MessageParser<SaveableObject> _parser = new pb::MessageParser<SaveableObject>(() => new SaveableObject());
  2512. private pb::UnknownFieldSet _unknownFields;
  2513. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  2514. public static pb::MessageParser<SaveableObject> Parser { get { return _parser; } }
  2515. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  2516. public static pbr::MessageDescriptor Descriptor {
  2517. get { return global::Tensorflow.SavedObjectGraphReflection.Descriptor.MessageTypes[12]; }
  2518. }
  2519. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  2520. pbr::MessageDescriptor pb::IMessage.Descriptor {
  2521. get { return Descriptor; }
  2522. }
  2523. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  2524. public SaveableObject() {
  2525. OnConstruction();
  2526. }
  2527. partial void OnConstruction();
  2528. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  2529. public SaveableObject(SaveableObject other) : this() {
  2530. saveFunction_ = other.saveFunction_;
  2531. restoreFunction_ = other.restoreFunction_;
  2532. _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields);
  2533. }
  2534. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  2535. public SaveableObject Clone() {
  2536. return new SaveableObject(this);
  2537. }
  2538. /// <summary>Field number for the "save_function" field.</summary>
  2539. public const int SaveFunctionFieldNumber = 2;
  2540. private int saveFunction_;
  2541. /// <summary>
  2542. /// Node ids of concrete functions for saving and loading from a checkpoint.
  2543. /// </summary>
  2544. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  2545. public int SaveFunction {
  2546. get { return saveFunction_; }
  2547. set {
  2548. saveFunction_ = value;
  2549. }
  2550. }
  2551. /// <summary>Field number for the "restore_function" field.</summary>
  2552. public const int RestoreFunctionFieldNumber = 3;
  2553. private int restoreFunction_;
  2554. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  2555. public int RestoreFunction {
  2556. get { return restoreFunction_; }
  2557. set {
  2558. restoreFunction_ = value;
  2559. }
  2560. }
  2561. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  2562. public override bool Equals(object other) {
  2563. return Equals(other as SaveableObject);
  2564. }
  2565. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  2566. public bool Equals(SaveableObject other) {
  2567. if (ReferenceEquals(other, null)) {
  2568. return false;
  2569. }
  2570. if (ReferenceEquals(other, this)) {
  2571. return true;
  2572. }
  2573. if (SaveFunction != other.SaveFunction) return false;
  2574. if (RestoreFunction != other.RestoreFunction) return false;
  2575. return Equals(_unknownFields, other._unknownFields);
  2576. }
  2577. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  2578. public override int GetHashCode() {
  2579. int hash = 1;
  2580. if (SaveFunction != 0) hash ^= SaveFunction.GetHashCode();
  2581. if (RestoreFunction != 0) hash ^= RestoreFunction.GetHashCode();
  2582. if (_unknownFields != null) {
  2583. hash ^= _unknownFields.GetHashCode();
  2584. }
  2585. return hash;
  2586. }
  2587. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  2588. public override string ToString() {
  2589. return pb::JsonFormatter.ToDiagnosticString(this);
  2590. }
  2591. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  2592. public void WriteTo(pb::CodedOutputStream output) {
  2593. if (SaveFunction != 0) {
  2594. output.WriteRawTag(16);
  2595. output.WriteInt32(SaveFunction);
  2596. }
  2597. if (RestoreFunction != 0) {
  2598. output.WriteRawTag(24);
  2599. output.WriteInt32(RestoreFunction);
  2600. }
  2601. if (_unknownFields != null) {
  2602. _unknownFields.WriteTo(output);
  2603. }
  2604. }
  2605. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  2606. public int CalculateSize() {
  2607. int size = 0;
  2608. if (SaveFunction != 0) {
  2609. size += 1 + pb::CodedOutputStream.ComputeInt32Size(SaveFunction);
  2610. }
  2611. if (RestoreFunction != 0) {
  2612. size += 1 + pb::CodedOutputStream.ComputeInt32Size(RestoreFunction);
  2613. }
  2614. if (_unknownFields != null) {
  2615. size += _unknownFields.CalculateSize();
  2616. }
  2617. return size;
  2618. }
  2619. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  2620. public void MergeFrom(SaveableObject other) {
  2621. if (other == null) {
  2622. return;
  2623. }
  2624. if (other.SaveFunction != 0) {
  2625. SaveFunction = other.SaveFunction;
  2626. }
  2627. if (other.RestoreFunction != 0) {
  2628. RestoreFunction = other.RestoreFunction;
  2629. }
  2630. _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields);
  2631. }
  2632. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  2633. public void MergeFrom(pb::CodedInputStream input) {
  2634. uint tag;
  2635. while ((tag = input.ReadTag()) != 0) {
  2636. switch(tag) {
  2637. default:
  2638. _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input);
  2639. break;
  2640. case 16: {
  2641. SaveFunction = input.ReadInt32();
  2642. break;
  2643. }
  2644. case 24: {
  2645. RestoreFunction = input.ReadInt32();
  2646. break;
  2647. }
  2648. }
  2649. }
  2650. }
  2651. }
  2652. #endregion
  2653. }
  2654. #endregion Designer generated code