addons icon indicating copy to clipboard operation
addons copied to clipboard

Unclear Metric Usage

Open vccabral opened this issue 7 years ago • 6 comments

The current system is difficult based on common structure and understanding of tensorflow to get working.

import tensorflow_addons as tfa
model.compile(
	loss=mean_squared_error,
	optimizer=Adadelta(),
	metrics=['mse', 'mae', tfa.metrics.CohenKappa, tfa.metrics.RSquare]
)

Relevant information

  • Are you willing to contribute it (yes/no): Yes I can add a working example when I figure it out.
  • Are you willing to maintain it going forward? (yes/no): No.
  • Is there a relevant academic paper? (if so, where): No
  • Is there already an implementation in another framework? (if so, where): No.
  • Was it part of tf.contrib? (if so, where): No.

Which API type would this fall under (layer, metric, optimizer, etc.) Metric/Documentation.

Who will benefit with this feature? People using tf-addons for the first time.

vccabral avatar Oct 03 '19 15:10 vccabral

@vccabral @seanpmorgan , It would be great if you could please elaborate this issue, so that I could figure out if I can solve this one.

Thanks

PyExtreme avatar Oct 04 '19 18:10 PyExtreme

Hi @vccabral could you explain a little more please. Are you looking for documentation that explains the code snippet you posted, or does the code snippet you posted not work?

seanpmorgan avatar Oct 04 '19 19:10 seanpmorgan

@seanpmorgan

Yes, I can see my lack of clarity re-reading my issue now. The base of my problem has to do with using tfa's metrics with keras which was not stated. I can elaborate on that code if this is still a good forum.

vccabral avatar Oct 08 '19 15:10 vccabral

Hi @vccabral I'm still having a bit of an issue understanding what you're requesting here. IIUC you'd like to have better documentation about using tfa metrics with Keras?

We would be most happy to review a PR which adds more information to the doc string or a new tutorial for metrics

seanpmorgan avatar Oct 16 '19 15:10 seanpmorgan

@seanpmorgan I was attempting to use TF addons with keras which was a bit more complicated than I originally thought it would be(exacerbated by the recent version update to TF2 on my part). Once I get a tutorial working with keras, I am happy to submit a PR to the tutorial's section.

vccabral avatar Oct 16 '19 16:10 vccabral

Great! Looking forward to the PR. I'm going to close this issue for now... but feel free to re-open as a request for tutorial if you want to track it that way.

seanpmorgan avatar Oct 16 '19 16:10 seanpmorgan