Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

pytorch tensor truth value #92

Merged
merged 22 commits into from
Apr 17, 2019
Merged

pytorch tensor truth value #92

merged 22 commits into from
Apr 17, 2019

Conversation

noskill
Copy link

@noskill noskill commented Apr 11, 2019

Wrapper truth value class for python object.
TTruthValue c++ class wraps pytorch tensor object to query for mean and confidence, so that it can be accessed from both c++ and python.

see issue singnet/opencog#70

ADD_LIBRARY (truthvalue
CountTruthValue.cc
EvidenceCountTruthValue.cc
FuzzyTruthValue.cc
IndefiniteTruthValue.cc
ProbabilisticTruthValue.cc
SimpleTruthValue.cc
TruthValue.cc
TruthValue.cc
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

whitespace issue here

opencog/cython/opencog/atomspace.pxd Outdated Show resolved Hide resolved
opencog/cython/opencog/atomspace.pxd Outdated Show resolved Hide resolved
@@ -32,6 +32,7 @@ INDEFINITE_TRUTH_VALUE <- TRUTH_VALUE
FUZZY_TRUTH_VALUE <- TRUTH_VALUE
PROBABILISTIC_TRUTH_VALUE <- TRUTH_VALUE
EVIDENCE_COUNT_TRUTH_VALUE <- TRUTH_VALUE
TTRUTH_VALUE <- TRUTH_VALUE "TTruthValue"
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I suggest name it TORCH_TRUTH_VALUE as TTRUTH_VALUE is unclear and ambiguous - usually T at the beginning sounds as Type. And rename TTruthValue to TorchTruthValue as well for clarity.

from opencog.atomspace import TensorTruthValue
from torch import tensor
import torch
TTruthValue = TensorTruthValue
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why did you not renamed classes in test? As test can be used as example of code it can be misleading.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't see misleading class names in this file. Which one looks misleading to you?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants