How do I return the value of a tensor from a function in TensorFlow?How do I sort a list of dictionaries by a value of the dictionary?How to randomly select an item from a list?How do I return multiple values from a function?How do I sort a dictionary by value?How to make a chain of function decorators?How to access environment variable values?Tensor indexing in custom loss functionHow to wrap a custom TensorFlow loss function in Keras?Implementing custom loss function in keras with conditionKeras - printing intermediate tensors in loss function (tf.Print and K.print_tensor do not work…)

Discworld quote about an "old couple" who having said everything to each other, can finally go about living their lives

Is ALTER TABLE ... DROP COLUMN really a metadata only operation?

Do the 26 richest billionaires own as much wealth as the poorest 3.8 billion people?

Bin Packing with Relational Penalization

Why wasn't EBCDIC designed with contiguous alphanumeric characters?

How can I deal with extreme temperatures in a hotel room?

How useful would a hydroelectric plant be in the post-apocalypse world?

What is the proper markup for a Math operator in boldface?

Is there a way to convert blue ice back into packed ice?

Can dual citizens open crypto exchange accounts where U.S. citizens are prohibited?

How do I ensure my employees don't abuse my flexible work hours policy?

Does a lens with a bigger max. aperture focus faster than a lens with a smaller max. aperture?

Are Valenar elves and Aereni elves different races of elves?

Story where diplomats use codes for emotions

pgfmath does not work

Could you fall off a planet if it was being accelerated by engines?

Is it okay to submit a paper from a master's thesis without informing the advisor?

Why were the first airplanes "backwards"?

Calculus, Water Poured into a Cone: Why is Derivative Non-linear?

Two palindromes are not enough

Closest Proximity of Oceans to Freshwater Springs

Why wasn't ASCII designed with a contiguous alphanumeric character order?

Having to constantly redo everything because I don't know how to do it?

A quine of sorts



How do I return the value of a tensor from a function in TensorFlow?


How do I sort a list of dictionaries by a value of the dictionary?How to randomly select an item from a list?How do I return multiple values from a function?How do I sort a dictionary by value?How to make a chain of function decorators?How to access environment variable values?Tensor indexing in custom loss functionHow to wrap a custom TensorFlow loss function in Keras?Implementing custom loss function in keras with conditionKeras - printing intermediate tensors in loss function (tf.Print and K.print_tensor do not work…)






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








0















I am working on a deep learning project in Keras, and have implemented a sensitivity function using TensorFlow backend, since that is needed if I want to evaluate a model using it.
However, I cannot extract the value from the tensor. I want to return it, so that I can use the values in other functions. Ideally, the return value should be an int. Whenever I evaluate the function, I just get the tensor object itself, not its real value.



I have tried creating a session and evaluating, but to no avail. I am able to print the value just fine in this way, but I cannot assign the value to another variable.



def calculate_tp(y, y_pred):
TP = 0
FP = 0
TN = 0
FN = 0
for i in range(5):
true = K.equal(y, i)
preds = K.equal(y_pred, i)
TP += K.sum(K.cast(tf.boolean_mask(preds, tf.math.equal(true, True)), 'int32'))
FP += K.sum(K.cast(tf.boolean_mask(true, tf.math.equal(~preds, True)), 'int32'))
TN += K.sum(K.cast(tf.boolean_mask(~preds, tf.math.equal(true, True)), 'int32'))
FN += K.sum(K.cast(tf.boolean_mask(true, tf.math.equal(preds, False)), 'int32'))

"""with tf.Session() as sess:
TP = TP.eval()
FP = FP.eval()
FN = FN.eval()
FP = FP.eval()
print(TP, FP, TN, FN)
#sess.run(FP)"""
return TP / (TP + FN)









share|improve this question






























    0















    I am working on a deep learning project in Keras, and have implemented a sensitivity function using TensorFlow backend, since that is needed if I want to evaluate a model using it.
    However, I cannot extract the value from the tensor. I want to return it, so that I can use the values in other functions. Ideally, the return value should be an int. Whenever I evaluate the function, I just get the tensor object itself, not its real value.



    I have tried creating a session and evaluating, but to no avail. I am able to print the value just fine in this way, but I cannot assign the value to another variable.



    def calculate_tp(y, y_pred):
    TP = 0
    FP = 0
    TN = 0
    FN = 0
    for i in range(5):
    true = K.equal(y, i)
    preds = K.equal(y_pred, i)
    TP += K.sum(K.cast(tf.boolean_mask(preds, tf.math.equal(true, True)), 'int32'))
    FP += K.sum(K.cast(tf.boolean_mask(true, tf.math.equal(~preds, True)), 'int32'))
    TN += K.sum(K.cast(tf.boolean_mask(~preds, tf.math.equal(true, True)), 'int32'))
    FN += K.sum(K.cast(tf.boolean_mask(true, tf.math.equal(preds, False)), 'int32'))

    """with tf.Session() as sess:
    TP = TP.eval()
    FP = FP.eval()
    FN = FN.eval()
    FP = FP.eval()
    print(TP, FP, TN, FN)
    #sess.run(FP)"""
    return TP / (TP + FN)









    share|improve this question


























      0












      0








      0








      I am working on a deep learning project in Keras, and have implemented a sensitivity function using TensorFlow backend, since that is needed if I want to evaluate a model using it.
      However, I cannot extract the value from the tensor. I want to return it, so that I can use the values in other functions. Ideally, the return value should be an int. Whenever I evaluate the function, I just get the tensor object itself, not its real value.



      I have tried creating a session and evaluating, but to no avail. I am able to print the value just fine in this way, but I cannot assign the value to another variable.



      def calculate_tp(y, y_pred):
      TP = 0
      FP = 0
      TN = 0
      FN = 0
      for i in range(5):
      true = K.equal(y, i)
      preds = K.equal(y_pred, i)
      TP += K.sum(K.cast(tf.boolean_mask(preds, tf.math.equal(true, True)), 'int32'))
      FP += K.sum(K.cast(tf.boolean_mask(true, tf.math.equal(~preds, True)), 'int32'))
      TN += K.sum(K.cast(tf.boolean_mask(~preds, tf.math.equal(true, True)), 'int32'))
      FN += K.sum(K.cast(tf.boolean_mask(true, tf.math.equal(preds, False)), 'int32'))

      """with tf.Session() as sess:
      TP = TP.eval()
      FP = FP.eval()
      FN = FN.eval()
      FP = FP.eval()
      print(TP, FP, TN, FN)
      #sess.run(FP)"""
      return TP / (TP + FN)









      share|improve this question
















      I am working on a deep learning project in Keras, and have implemented a sensitivity function using TensorFlow backend, since that is needed if I want to evaluate a model using it.
      However, I cannot extract the value from the tensor. I want to return it, so that I can use the values in other functions. Ideally, the return value should be an int. Whenever I evaluate the function, I just get the tensor object itself, not its real value.



      I have tried creating a session and evaluating, but to no avail. I am able to print the value just fine in this way, but I cannot assign the value to another variable.



      def calculate_tp(y, y_pred):
      TP = 0
      FP = 0
      TN = 0
      FN = 0
      for i in range(5):
      true = K.equal(y, i)
      preds = K.equal(y_pred, i)
      TP += K.sum(K.cast(tf.boolean_mask(preds, tf.math.equal(true, True)), 'int32'))
      FP += K.sum(K.cast(tf.boolean_mask(true, tf.math.equal(~preds, True)), 'int32'))
      TN += K.sum(K.cast(tf.boolean_mask(~preds, tf.math.equal(true, True)), 'int32'))
      FN += K.sum(K.cast(tf.boolean_mask(true, tf.math.equal(preds, False)), 'int32'))

      """with tf.Session() as sess:
      TP = TP.eval()
      FP = FP.eval()
      FN = FN.eval()
      FP = FP.eval()
      print(TP, FP, TN, FN)
      #sess.run(FP)"""
      return TP / (TP + FN)






      python tensorflow keras deep-learning






      share|improve this question















      share|improve this question













      share|improve this question




      share|improve this question








      edited Mar 25 at 16:33









      Vlad

      3,6463 gold badges13 silver badges31 bronze badges




      3,6463 gold badges13 silver badges31 bronze badges










      asked Mar 25 at 14:53









      Janus SyrakJanus Syrak

      113 bronze badges




      113 bronze badges






















          2 Answers
          2






          active

          oldest

          votes


















          0














          If I understand well your problem, you can simply create a new tensor with the values
          obtened.



          For example :



          tensor = tf.constant([5, 5, 8, 6, 10, 1, 2])
          tensor_value = tensor.eval(session=tf.Session())
          print(tensor_value) #get [ 5 5 8 6 10 1 2]
          new_tensor = tf.constant(tensor_value)
          print(new_tensor) #get Tensor("Const_25:0", shape=(7,), dtype=int32)


          Hope I helped !






          share|improve this answer























          • I appreciate your answer, but I don't think this is quite what I'm looking for. In the sensitivity function above, ideally I want to return a single number, which is TP / (TP + FN), for example, 0.85. :) Otherwise, I just get 0.0000E+0 for sensitivity when my model compiles.

            – Janus Syrak
            Mar 25 at 16:36



















          0














          Ok so could it be because in your tries TP is always 0 ?



          If i try that :



          y = np.array([0, 0, 0, 0, 0, 1, 1, 1 ,1 ,1])
          y_pred = np.array([0.01, 0.005, 0.5, 0.09, 0.56, 0.999, 0.89, 0.987 ,0.899 ,1])

          def calculate_tp(y, y_pred):
          TP = 0
          FP = 0
          TN = 0
          FN = 0
          for i in range(5):
          true = K.equal(y, i)
          preds = K.equal(y_pred, i)
          TP += K.sum(K.cast(tf.boolean_mask(preds, tf.math.equal(true, True)), 'int32'))
          FP += K.sum(K.cast(tf.boolean_mask(true, tf.math.equal(~preds, True)), 'int32'))
          TN += K.sum(K.cast(tf.boolean_mask(~preds, tf.math.equal(true, True)), 'int32'))
          FN += K.sum(K.cast(tf.boolean_mask(true, tf.math.equal(preds, False)), 'int32'))

          TP = TP.eval(session=tf.Session())
          FP = FP.eval(session=tf.Session())
          TN = TN.eval(session=tf.Session())
          FN = FN.eval(session=tf.Session())
          print(TP, FP, TN, FN)

          results = TP / (TP + FN)

          return results

          res = calculate_tp(y, y_pred)
          print(res)

          #Outputs :
          #0 5 5 5
          #1 9 9 9
          #1 9 9 9
          #1 9 9 9
          #1 9 9 9
          #0.1


          It give me a float number, like you want.



          Is it helping ?






          share|improve this answer























          • You are correct, this does give the correct output. However, I still can't use calculate_tp(y, y_pred) as a metric for compiling my model.

            – Janus Syrak
            Mar 25 at 17:42












          • How are you using it, and what's your errors ?

            – Thibault Bacqueyrisses
            Mar 25 at 18:07













          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%2f55340586%2fhow-do-i-return-the-value-of-a-tensor-from-a-function-in-tensorflow%23new-answer', 'question_page');

          );

          Post as a guest















          Required, but never shown

























          2 Answers
          2






          active

          oldest

          votes








          2 Answers
          2






          active

          oldest

          votes









          active

          oldest

          votes






          active

          oldest

          votes









          0














          If I understand well your problem, you can simply create a new tensor with the values
          obtened.



          For example :



          tensor = tf.constant([5, 5, 8, 6, 10, 1, 2])
          tensor_value = tensor.eval(session=tf.Session())
          print(tensor_value) #get [ 5 5 8 6 10 1 2]
          new_tensor = tf.constant(tensor_value)
          print(new_tensor) #get Tensor("Const_25:0", shape=(7,), dtype=int32)


          Hope I helped !






          share|improve this answer























          • I appreciate your answer, but I don't think this is quite what I'm looking for. In the sensitivity function above, ideally I want to return a single number, which is TP / (TP + FN), for example, 0.85. :) Otherwise, I just get 0.0000E+0 for sensitivity when my model compiles.

            – Janus Syrak
            Mar 25 at 16:36
















          0














          If I understand well your problem, you can simply create a new tensor with the values
          obtened.



          For example :



          tensor = tf.constant([5, 5, 8, 6, 10, 1, 2])
          tensor_value = tensor.eval(session=tf.Session())
          print(tensor_value) #get [ 5 5 8 6 10 1 2]
          new_tensor = tf.constant(tensor_value)
          print(new_tensor) #get Tensor("Const_25:0", shape=(7,), dtype=int32)


          Hope I helped !






          share|improve this answer























          • I appreciate your answer, but I don't think this is quite what I'm looking for. In the sensitivity function above, ideally I want to return a single number, which is TP / (TP + FN), for example, 0.85. :) Otherwise, I just get 0.0000E+0 for sensitivity when my model compiles.

            – Janus Syrak
            Mar 25 at 16:36














          0












          0








          0







          If I understand well your problem, you can simply create a new tensor with the values
          obtened.



          For example :



          tensor = tf.constant([5, 5, 8, 6, 10, 1, 2])
          tensor_value = tensor.eval(session=tf.Session())
          print(tensor_value) #get [ 5 5 8 6 10 1 2]
          new_tensor = tf.constant(tensor_value)
          print(new_tensor) #get Tensor("Const_25:0", shape=(7,), dtype=int32)


          Hope I helped !






          share|improve this answer













          If I understand well your problem, you can simply create a new tensor with the values
          obtened.



          For example :



          tensor = tf.constant([5, 5, 8, 6, 10, 1, 2])
          tensor_value = tensor.eval(session=tf.Session())
          print(tensor_value) #get [ 5 5 8 6 10 1 2]
          new_tensor = tf.constant(tensor_value)
          print(new_tensor) #get Tensor("Const_25:0", shape=(7,), dtype=int32)


          Hope I helped !







          share|improve this answer












          share|improve this answer



          share|improve this answer










          answered Mar 25 at 15:53









          Thibault BacqueyrissesThibault Bacqueyrisses

          8891 silver badge13 bronze badges




          8891 silver badge13 bronze badges












          • I appreciate your answer, but I don't think this is quite what I'm looking for. In the sensitivity function above, ideally I want to return a single number, which is TP / (TP + FN), for example, 0.85. :) Otherwise, I just get 0.0000E+0 for sensitivity when my model compiles.

            – Janus Syrak
            Mar 25 at 16:36


















          • I appreciate your answer, but I don't think this is quite what I'm looking for. In the sensitivity function above, ideally I want to return a single number, which is TP / (TP + FN), for example, 0.85. :) Otherwise, I just get 0.0000E+0 for sensitivity when my model compiles.

            – Janus Syrak
            Mar 25 at 16:36

















          I appreciate your answer, but I don't think this is quite what I'm looking for. In the sensitivity function above, ideally I want to return a single number, which is TP / (TP + FN), for example, 0.85. :) Otherwise, I just get 0.0000E+0 for sensitivity when my model compiles.

          – Janus Syrak
          Mar 25 at 16:36






          I appreciate your answer, but I don't think this is quite what I'm looking for. In the sensitivity function above, ideally I want to return a single number, which is TP / (TP + FN), for example, 0.85. :) Otherwise, I just get 0.0000E+0 for sensitivity when my model compiles.

          – Janus Syrak
          Mar 25 at 16:36














          0














          Ok so could it be because in your tries TP is always 0 ?



          If i try that :



          y = np.array([0, 0, 0, 0, 0, 1, 1, 1 ,1 ,1])
          y_pred = np.array([0.01, 0.005, 0.5, 0.09, 0.56, 0.999, 0.89, 0.987 ,0.899 ,1])

          def calculate_tp(y, y_pred):
          TP = 0
          FP = 0
          TN = 0
          FN = 0
          for i in range(5):
          true = K.equal(y, i)
          preds = K.equal(y_pred, i)
          TP += K.sum(K.cast(tf.boolean_mask(preds, tf.math.equal(true, True)), 'int32'))
          FP += K.sum(K.cast(tf.boolean_mask(true, tf.math.equal(~preds, True)), 'int32'))
          TN += K.sum(K.cast(tf.boolean_mask(~preds, tf.math.equal(true, True)), 'int32'))
          FN += K.sum(K.cast(tf.boolean_mask(true, tf.math.equal(preds, False)), 'int32'))

          TP = TP.eval(session=tf.Session())
          FP = FP.eval(session=tf.Session())
          TN = TN.eval(session=tf.Session())
          FN = FN.eval(session=tf.Session())
          print(TP, FP, TN, FN)

          results = TP / (TP + FN)

          return results

          res = calculate_tp(y, y_pred)
          print(res)

          #Outputs :
          #0 5 5 5
          #1 9 9 9
          #1 9 9 9
          #1 9 9 9
          #1 9 9 9
          #0.1


          It give me a float number, like you want.



          Is it helping ?






          share|improve this answer























          • You are correct, this does give the correct output. However, I still can't use calculate_tp(y, y_pred) as a metric for compiling my model.

            – Janus Syrak
            Mar 25 at 17:42












          • How are you using it, and what's your errors ?

            – Thibault Bacqueyrisses
            Mar 25 at 18:07















          0














          Ok so could it be because in your tries TP is always 0 ?



          If i try that :



          y = np.array([0, 0, 0, 0, 0, 1, 1, 1 ,1 ,1])
          y_pred = np.array([0.01, 0.005, 0.5, 0.09, 0.56, 0.999, 0.89, 0.987 ,0.899 ,1])

          def calculate_tp(y, y_pred):
          TP = 0
          FP = 0
          TN = 0
          FN = 0
          for i in range(5):
          true = K.equal(y, i)
          preds = K.equal(y_pred, i)
          TP += K.sum(K.cast(tf.boolean_mask(preds, tf.math.equal(true, True)), 'int32'))
          FP += K.sum(K.cast(tf.boolean_mask(true, tf.math.equal(~preds, True)), 'int32'))
          TN += K.sum(K.cast(tf.boolean_mask(~preds, tf.math.equal(true, True)), 'int32'))
          FN += K.sum(K.cast(tf.boolean_mask(true, tf.math.equal(preds, False)), 'int32'))

          TP = TP.eval(session=tf.Session())
          FP = FP.eval(session=tf.Session())
          TN = TN.eval(session=tf.Session())
          FN = FN.eval(session=tf.Session())
          print(TP, FP, TN, FN)

          results = TP / (TP + FN)

          return results

          res = calculate_tp(y, y_pred)
          print(res)

          #Outputs :
          #0 5 5 5
          #1 9 9 9
          #1 9 9 9
          #1 9 9 9
          #1 9 9 9
          #0.1


          It give me a float number, like you want.



          Is it helping ?






          share|improve this answer























          • You are correct, this does give the correct output. However, I still can't use calculate_tp(y, y_pred) as a metric for compiling my model.

            – Janus Syrak
            Mar 25 at 17:42












          • How are you using it, and what's your errors ?

            – Thibault Bacqueyrisses
            Mar 25 at 18:07













          0












          0








          0







          Ok so could it be because in your tries TP is always 0 ?



          If i try that :



          y = np.array([0, 0, 0, 0, 0, 1, 1, 1 ,1 ,1])
          y_pred = np.array([0.01, 0.005, 0.5, 0.09, 0.56, 0.999, 0.89, 0.987 ,0.899 ,1])

          def calculate_tp(y, y_pred):
          TP = 0
          FP = 0
          TN = 0
          FN = 0
          for i in range(5):
          true = K.equal(y, i)
          preds = K.equal(y_pred, i)
          TP += K.sum(K.cast(tf.boolean_mask(preds, tf.math.equal(true, True)), 'int32'))
          FP += K.sum(K.cast(tf.boolean_mask(true, tf.math.equal(~preds, True)), 'int32'))
          TN += K.sum(K.cast(tf.boolean_mask(~preds, tf.math.equal(true, True)), 'int32'))
          FN += K.sum(K.cast(tf.boolean_mask(true, tf.math.equal(preds, False)), 'int32'))

          TP = TP.eval(session=tf.Session())
          FP = FP.eval(session=tf.Session())
          TN = TN.eval(session=tf.Session())
          FN = FN.eval(session=tf.Session())
          print(TP, FP, TN, FN)

          results = TP / (TP + FN)

          return results

          res = calculate_tp(y, y_pred)
          print(res)

          #Outputs :
          #0 5 5 5
          #1 9 9 9
          #1 9 9 9
          #1 9 9 9
          #1 9 9 9
          #0.1


          It give me a float number, like you want.



          Is it helping ?






          share|improve this answer













          Ok so could it be because in your tries TP is always 0 ?



          If i try that :



          y = np.array([0, 0, 0, 0, 0, 1, 1, 1 ,1 ,1])
          y_pred = np.array([0.01, 0.005, 0.5, 0.09, 0.56, 0.999, 0.89, 0.987 ,0.899 ,1])

          def calculate_tp(y, y_pred):
          TP = 0
          FP = 0
          TN = 0
          FN = 0
          for i in range(5):
          true = K.equal(y, i)
          preds = K.equal(y_pred, i)
          TP += K.sum(K.cast(tf.boolean_mask(preds, tf.math.equal(true, True)), 'int32'))
          FP += K.sum(K.cast(tf.boolean_mask(true, tf.math.equal(~preds, True)), 'int32'))
          TN += K.sum(K.cast(tf.boolean_mask(~preds, tf.math.equal(true, True)), 'int32'))
          FN += K.sum(K.cast(tf.boolean_mask(true, tf.math.equal(preds, False)), 'int32'))

          TP = TP.eval(session=tf.Session())
          FP = FP.eval(session=tf.Session())
          TN = TN.eval(session=tf.Session())
          FN = FN.eval(session=tf.Session())
          print(TP, FP, TN, FN)

          results = TP / (TP + FN)

          return results

          res = calculate_tp(y, y_pred)
          print(res)

          #Outputs :
          #0 5 5 5
          #1 9 9 9
          #1 9 9 9
          #1 9 9 9
          #1 9 9 9
          #0.1


          It give me a float number, like you want.



          Is it helping ?







          share|improve this answer












          share|improve this answer



          share|improve this answer










          answered Mar 25 at 17:23









          Thibault BacqueyrissesThibault Bacqueyrisses

          8891 silver badge13 bronze badges




          8891 silver badge13 bronze badges












          • You are correct, this does give the correct output. However, I still can't use calculate_tp(y, y_pred) as a metric for compiling my model.

            – Janus Syrak
            Mar 25 at 17:42












          • How are you using it, and what's your errors ?

            – Thibault Bacqueyrisses
            Mar 25 at 18:07

















          • You are correct, this does give the correct output. However, I still can't use calculate_tp(y, y_pred) as a metric for compiling my model.

            – Janus Syrak
            Mar 25 at 17:42












          • How are you using it, and what's your errors ?

            – Thibault Bacqueyrisses
            Mar 25 at 18:07
















          You are correct, this does give the correct output. However, I still can't use calculate_tp(y, y_pred) as a metric for compiling my model.

          – Janus Syrak
          Mar 25 at 17:42






          You are correct, this does give the correct output. However, I still can't use calculate_tp(y, y_pred) as a metric for compiling my model.

          – Janus Syrak
          Mar 25 at 17:42














          How are you using it, and what's your errors ?

          – Thibault Bacqueyrisses
          Mar 25 at 18:07





          How are you using it, and what's your errors ?

          – Thibault Bacqueyrisses
          Mar 25 at 18:07

















          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%2f55340586%2fhow-do-i-return-the-value-of-a-tensor-from-a-function-in-tensorflow%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

          Kamusi Yaliyomo Aina za kamusi | Muundo wa kamusi | Faida za kamusi | Dhima ya picha katika kamusi | Marejeo | Tazama pia | Viungo vya nje | UrambazajiKuhusu kamusiGo-SwahiliWiki-KamusiKamusi ya Kiswahili na Kiingerezakuihariri na kuongeza habari

          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

          은진 송씨 목차 역사 본관 분파 인물 조선 왕실과의 인척 관계 집성촌 항렬자 인구 같이 보기 각주 둘러보기 메뉴은진 송씨세종실록 149권, 지리지 충청도 공주목 은진현