Skip to main content

You are not logged in. Your edit will be placed in a queue until it is peer reviewed.

We welcome edits that make the post easier to understand and more valuable for readers. Because community members review edits, please try to make the post substantially better than how you found it, for example, by fixing grammar or adding additional resources and hyperlinks.

Required fields*

6
  • Why are you calling inputs.numpy()? Commented Mar 1, 2022 at 12:53
  • I need to pass the inputs to a third-party package to do some calculations, which only supports numpy as an input Commented Mar 1, 2022 at 12:56
  • Do you just want to use the output of your third-party function during inference or also during training? Commented Mar 1, 2022 at 13:33
  • this package helps me in calculating the loss. so I will call it during the training as well. Commented Mar 1, 2022 at 13:35
  • 1
    This function is the Kmeans from 'sklearn' package. New layer basically is a clustering layer and I've defined new loss function based on the result of the clusters Commented Mar 1, 2022 at 13:38