TensorFlow understanding pseudocode for WALSModel regarding sharding and supervisorUnderstanding slice notationUnderstanding Python super() with __init__() methodsTensorflow: how to save/restore a model?TensorFlow not found using piptask assignment in tensorflow distributed processDistributed tensorflow: non chief worker stuck at starter sessionhow can we get benefit from sharding the data to speed the training time?Tensorflow exporting custom Estimator (defining serving_input_fn and PredictOutput)Converting Tensorflow Graph to use Estimator, get 'TypeError: data type not understood' at loss function using `sampled_softmax_loss` or `nce_loss`Continue training of a custom tf.Estimator with AdamOptimizer

Chunk + Enumerate a list of digits

Big number puzzle

Do I have to cite common CS algorithms?

A torrent of foreign terms

Why aren't rockets built with truss structures inside their fuel & oxidizer tanks to increase structural strength?

Identifying My Main Water Shutoff Valve / Setup

What can Amex do if I cancel their card after using the sign up bonus miles?

How should I write this passage to make it the most readable?

Does an Irish VISA WARNING count as "refused entry at the border of any country other than the UK?"

How can God warn people of the upcoming rapture without disrupting society?

Doesn't the speed of light limit imply the same electron can be annihilated twice?

How do I call a 6-digit Australian phone number with a US-based mobile phone?

How would armour (and combat) change if the fighter didn't need to actually wear it?

Why is Python 2.7 still the default Python version in Ubuntu?

How to use Smarty for change greetings for French?

Is there a way to proportionalize fixed costs in a MILP?

How was the murder committed?

Are there any cons in using rounded corners for bar graphs?

What unique challenges/limitations will I face if I start a career as a pilot at 45 years old?

Are there any other rule mechanics that could grant Thieves' Cant?

Should I leave building the database for the end?

If "more guns less crime", how do gun advocates explain that the EU has less crime than the US?

Will using a resistor in series with a LED to control its voltage increase the total energy expenditure?

Pokemon Go: Gym Badge Over-completed?



TensorFlow understanding pseudocode for WALSModel regarding sharding and supervisor


Understanding slice notationUnderstanding Python super() with __init__() methodsTensorflow: how to save/restore a model?TensorFlow not found using piptask assignment in tensorflow distributed processDistributed tensorflow: non chief worker stuck at starter sessionhow can we get benefit from sharding the data to speed the training time?Tensorflow exporting custom Estimator (defining serving_input_fn and PredictOutput)Converting Tensorflow Graph to use Estimator, get 'TypeError: data type not understood' at loss function using `sampled_softmax_loss` or `nce_loss`Continue training of a custom tf.Estimator with AdamOptimizer






.everyoneloves__top-leaderboard:empty,.everyoneloves__mid-leaderboard:empty,.everyoneloves__bot-mid-leaderboard:empty margin-bottom:0;








0















NOTE: this question has an associated colab and is based on the pseudo-code for tf.contrib.factorization.WALSModel.



In short, the question is how to complete the pseudo-code for WALSModel (see colab)




Tensorflow's documentation is not complete nor necessarily the best. It is not uncommon for a documentation page to simply link to .proto file (which may have some comments and perhaps an example). For example ClusterDef, Example, Feature, JobDef, etc all link to a .proto file for the user to decipher.



This can make the conversion of pseudo-code a lengthy and convoluted process, sometimes taking a user working at a "higher" level part of the api down into the trenches.



Such is the case with tf.contrib.factorization.WALSModel pseudo-code.



Part of the reason the WALSModel pseudo-code is particularly hard to decipher is that the pseudo-code is not for the base use case (feeding a matrix into WALSModel, running for i iterations, and getting the resultant row_factors/col_factors). Rather this pseudo-code aims to demonstrate how to run WALSModel perhaps in a distributed setting with a sharded matrix (which may be required for large input matricies).



However, this pseudo-code fails to provide sufficient guidance for implementing a distributed, sharded WALSModel.



Why?



For starters, the first mention that the input matrix should be shared is not until defining the update operations:




_, row_update_op, unreg_row_loss, row_reg, _ = model.update_row_factors(
sp_input = matrix_slices_from_queue_for_worker_shard
)



The pseudo-code variable matrix_slices_from_queue_for_worker_shard provides no indication as to how the user should attempt this.



Further examples of large gaps in the pseudo code come just a few lines later:



# model_init_op is passed to Supervisor. Chief trainer runs it. Other
# trainers wait.
sv = tf.train.Supervisor(is_chief=is_chief,
...,
init_op=tf.group(..., model_init_op, ...), ...)



In this large pseudo-code block there is mention of where / how the chief training should be set up or how have the other trainers wait.



It is understandable that this pseudo-code is specifically for the WALSModel and not for queue trainers. However, given that the tf.train documentation links to a non-existent "Training" guide (just lists the modules / classes, many of which link to .proto files), where should one go to learn how to properly implement this?



So I set off to try an fill in this pseudo-code to the best of my ability (see colab and quickly hit a dead end.



I would appreciate any assistance / guidance in completing this pseudo-code (distributed, sharded WALSModel) or where to read more about how to do this.



Of use might be the semi-related issue 26928, where @walidk links to some test code for the tf.Estimator version of WALSModel (WALSMatrixFactorization), which seems to have some more code for sharding, but since it is an Estimator, it is not necessarily clear what is needed just for WALSModel in relation to the pseudo-code provided on the WALSModel documentation page.










share|improve this question






























    0















    NOTE: this question has an associated colab and is based on the pseudo-code for tf.contrib.factorization.WALSModel.



    In short, the question is how to complete the pseudo-code for WALSModel (see colab)




    Tensorflow's documentation is not complete nor necessarily the best. It is not uncommon for a documentation page to simply link to .proto file (which may have some comments and perhaps an example). For example ClusterDef, Example, Feature, JobDef, etc all link to a .proto file for the user to decipher.



    This can make the conversion of pseudo-code a lengthy and convoluted process, sometimes taking a user working at a "higher" level part of the api down into the trenches.



    Such is the case with tf.contrib.factorization.WALSModel pseudo-code.



    Part of the reason the WALSModel pseudo-code is particularly hard to decipher is that the pseudo-code is not for the base use case (feeding a matrix into WALSModel, running for i iterations, and getting the resultant row_factors/col_factors). Rather this pseudo-code aims to demonstrate how to run WALSModel perhaps in a distributed setting with a sharded matrix (which may be required for large input matricies).



    However, this pseudo-code fails to provide sufficient guidance for implementing a distributed, sharded WALSModel.



    Why?



    For starters, the first mention that the input matrix should be shared is not until defining the update operations:




    _, row_update_op, unreg_row_loss, row_reg, _ = model.update_row_factors(
    sp_input = matrix_slices_from_queue_for_worker_shard
    )



    The pseudo-code variable matrix_slices_from_queue_for_worker_shard provides no indication as to how the user should attempt this.



    Further examples of large gaps in the pseudo code come just a few lines later:



    # model_init_op is passed to Supervisor. Chief trainer runs it. Other
    # trainers wait.
    sv = tf.train.Supervisor(is_chief=is_chief,
    ...,
    init_op=tf.group(..., model_init_op, ...), ...)



    In this large pseudo-code block there is mention of where / how the chief training should be set up or how have the other trainers wait.



    It is understandable that this pseudo-code is specifically for the WALSModel and not for queue trainers. However, given that the tf.train documentation links to a non-existent "Training" guide (just lists the modules / classes, many of which link to .proto files), where should one go to learn how to properly implement this?



    So I set off to try an fill in this pseudo-code to the best of my ability (see colab and quickly hit a dead end.



    I would appreciate any assistance / guidance in completing this pseudo-code (distributed, sharded WALSModel) or where to read more about how to do this.



    Of use might be the semi-related issue 26928, where @walidk links to some test code for the tf.Estimator version of WALSModel (WALSMatrixFactorization), which seems to have some more code for sharding, but since it is an Estimator, it is not necessarily clear what is needed just for WALSModel in relation to the pseudo-code provided on the WALSModel documentation page.










    share|improve this question


























      0












      0








      0








      NOTE: this question has an associated colab and is based on the pseudo-code for tf.contrib.factorization.WALSModel.



      In short, the question is how to complete the pseudo-code for WALSModel (see colab)




      Tensorflow's documentation is not complete nor necessarily the best. It is not uncommon for a documentation page to simply link to .proto file (which may have some comments and perhaps an example). For example ClusterDef, Example, Feature, JobDef, etc all link to a .proto file for the user to decipher.



      This can make the conversion of pseudo-code a lengthy and convoluted process, sometimes taking a user working at a "higher" level part of the api down into the trenches.



      Such is the case with tf.contrib.factorization.WALSModel pseudo-code.



      Part of the reason the WALSModel pseudo-code is particularly hard to decipher is that the pseudo-code is not for the base use case (feeding a matrix into WALSModel, running for i iterations, and getting the resultant row_factors/col_factors). Rather this pseudo-code aims to demonstrate how to run WALSModel perhaps in a distributed setting with a sharded matrix (which may be required for large input matricies).



      However, this pseudo-code fails to provide sufficient guidance for implementing a distributed, sharded WALSModel.



      Why?



      For starters, the first mention that the input matrix should be shared is not until defining the update operations:




      _, row_update_op, unreg_row_loss, row_reg, _ = model.update_row_factors(
      sp_input = matrix_slices_from_queue_for_worker_shard
      )



      The pseudo-code variable matrix_slices_from_queue_for_worker_shard provides no indication as to how the user should attempt this.



      Further examples of large gaps in the pseudo code come just a few lines later:



      # model_init_op is passed to Supervisor. Chief trainer runs it. Other
      # trainers wait.
      sv = tf.train.Supervisor(is_chief=is_chief,
      ...,
      init_op=tf.group(..., model_init_op, ...), ...)



      In this large pseudo-code block there is mention of where / how the chief training should be set up or how have the other trainers wait.



      It is understandable that this pseudo-code is specifically for the WALSModel and not for queue trainers. However, given that the tf.train documentation links to a non-existent "Training" guide (just lists the modules / classes, many of which link to .proto files), where should one go to learn how to properly implement this?



      So I set off to try an fill in this pseudo-code to the best of my ability (see colab and quickly hit a dead end.



      I would appreciate any assistance / guidance in completing this pseudo-code (distributed, sharded WALSModel) or where to read more about how to do this.



      Of use might be the semi-related issue 26928, where @walidk links to some test code for the tf.Estimator version of WALSModel (WALSMatrixFactorization), which seems to have some more code for sharding, but since it is an Estimator, it is not necessarily clear what is needed just for WALSModel in relation to the pseudo-code provided on the WALSModel documentation page.










      share|improve this question














      NOTE: this question has an associated colab and is based on the pseudo-code for tf.contrib.factorization.WALSModel.



      In short, the question is how to complete the pseudo-code for WALSModel (see colab)




      Tensorflow's documentation is not complete nor necessarily the best. It is not uncommon for a documentation page to simply link to .proto file (which may have some comments and perhaps an example). For example ClusterDef, Example, Feature, JobDef, etc all link to a .proto file for the user to decipher.



      This can make the conversion of pseudo-code a lengthy and convoluted process, sometimes taking a user working at a "higher" level part of the api down into the trenches.



      Such is the case with tf.contrib.factorization.WALSModel pseudo-code.



      Part of the reason the WALSModel pseudo-code is particularly hard to decipher is that the pseudo-code is not for the base use case (feeding a matrix into WALSModel, running for i iterations, and getting the resultant row_factors/col_factors). Rather this pseudo-code aims to demonstrate how to run WALSModel perhaps in a distributed setting with a sharded matrix (which may be required for large input matricies).



      However, this pseudo-code fails to provide sufficient guidance for implementing a distributed, sharded WALSModel.



      Why?



      For starters, the first mention that the input matrix should be shared is not until defining the update operations:




      _, row_update_op, unreg_row_loss, row_reg, _ = model.update_row_factors(
      sp_input = matrix_slices_from_queue_for_worker_shard
      )



      The pseudo-code variable matrix_slices_from_queue_for_worker_shard provides no indication as to how the user should attempt this.



      Further examples of large gaps in the pseudo code come just a few lines later:



      # model_init_op is passed to Supervisor. Chief trainer runs it. Other
      # trainers wait.
      sv = tf.train.Supervisor(is_chief=is_chief,
      ...,
      init_op=tf.group(..., model_init_op, ...), ...)



      In this large pseudo-code block there is mention of where / how the chief training should be set up or how have the other trainers wait.



      It is understandable that this pseudo-code is specifically for the WALSModel and not for queue trainers. However, given that the tf.train documentation links to a non-existent "Training" guide (just lists the modules / classes, many of which link to .proto files), where should one go to learn how to properly implement this?



      So I set off to try an fill in this pseudo-code to the best of my ability (see colab and quickly hit a dead end.



      I would appreciate any assistance / guidance in completing this pseudo-code (distributed, sharded WALSModel) or where to read more about how to do this.



      Of use might be the semi-related issue 26928, where @walidk links to some test code for the tf.Estimator version of WALSModel (WALSMatrixFactorization), which seems to have some more code for sharding, but since it is an Estimator, it is not necessarily clear what is needed just for WALSModel in relation to the pseudo-code provided on the WALSModel documentation page.







      python tensorflow machine-learning tensorflow-estimator






      share|improve this question













      share|improve this question











      share|improve this question




      share|improve this question










      asked Mar 27 at 10:30









      SumNeuronSumNeuron

      1,5281 gold badge8 silver badges34 bronze badges




      1,5281 gold badge8 silver badges34 bronze badges

























          0






          active

          oldest

          votes










          Your Answer






          StackExchange.ifUsing("editor", function ()
          StackExchange.using("externalEditor", function ()
          StackExchange.using("snippets", function ()
          StackExchange.snippets.init();
          );
          );
          , "code-snippets");

          StackExchange.ready(function()
          var channelOptions =
          tags: "".split(" "),
          id: "1"
          ;
          initTagRenderer("".split(" "), "".split(" "), channelOptions);

          StackExchange.using("externalEditor", function()
          // Have to fire editor after snippets, if snippets enabled
          if (StackExchange.settings.snippets.snippetsEnabled)
          StackExchange.using("snippets", function()
          createEditor();
          );

          else
          createEditor();

          );

          function createEditor()
          StackExchange.prepareEditor(
          heartbeatType: 'answer',
          autoActivateHeartbeat: false,
          convertImagesToLinks: true,
          noModals: true,
          showLowRepImageUploadWarning: true,
          reputationToPostImages: 10,
          bindNavPrevention: true,
          postfix: "",
          imageUploader:
          brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
          contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
          allowUrls: true
          ,
          onDemand: true,
          discardSelector: ".discard-answer"
          ,immediatelyShowMarkdownHelp:true
          );



          );













          draft saved

          draft discarded


















          StackExchange.ready(
          function ()
          StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f55375015%2ftensorflow-understanding-pseudocode-for-walsmodel-regarding-sharding-and-supervi%23new-answer', 'question_page');

          );

          Post as a guest















          Required, but never shown

























          0






          active

          oldest

          votes








          0






          active

          oldest

          votes









          active

          oldest

          votes






          active

          oldest

          votes




          Is this question similar to what you get asked at work? Learn more about asking and sharing private information with your coworkers using Stack Overflow for Teams.







          Is this question similar to what you get asked at work? Learn more about asking and sharing private information with your coworkers using Stack Overflow for Teams.



















          draft saved

          draft discarded
















































          Thanks for contributing an answer to Stack Overflow!


          • Please be sure to answer the question. Provide details and share your research!

          But avoid


          • Asking for help, clarification, or responding to other answers.

          • Making statements based on opinion; back them up with references or personal experience.

          To learn more, see our tips on writing great answers.




          draft saved


          draft discarded














          StackExchange.ready(
          function ()
          StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f55375015%2ftensorflow-understanding-pseudocode-for-walsmodel-regarding-sharding-and-supervi%23new-answer', 'question_page');

          );

          Post as a guest















          Required, but never shown





















































          Required, but never shown














          Required, but never shown












          Required, but never shown







          Required, but never shown

































          Required, but never shown














          Required, but never shown












          Required, but never shown







          Required, but never shown







          Popular posts from this blog

          SQL error code 1064 with creating Laravel foreign keysForeign key constraints: When to use ON UPDATE and ON DELETEDropping column with foreign key Laravel error: General error: 1025 Error on renameLaravel SQL Can't create tableLaravel Migration foreign key errorLaravel php artisan migrate:refresh giving a syntax errorSQLSTATE[42S01]: Base table or view already exists or Base table or view already exists: 1050 Tableerror in migrating laravel file to xampp serverSyntax error or access violation: 1064:syntax to use near 'unsigned not null, modelName varchar(191) not null, title varchar(191) not nLaravel cannot create new table field in mysqlLaravel 5.7:Last migration creates table but is not registered in the migration table

          용인 삼성생명 블루밍스 목차 통계 역대 감독 선수단 응원단 경기장 같이 보기 외부 링크 둘러보기 메뉴samsungblueminx.comeh선수 명단용인 삼성생명 블루밍스용인 삼성생명 블루밍스ehsamsungblueminx.comeheheheh

          155 수학 과학 기타 둘러보기 메뉴eh추가해eh문서를 완성해