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

added auto shapes #175

Open
wants to merge 3 commits into
base: develop
Choose a base branch
from
Open

added auto shapes #175

wants to merge 3 commits into from

Conversation

KhrulkovV
Copy link
Collaborator

No description provided.

@KhrulkovV KhrulkovV requested a review from Bihaqo January 29, 2019 10:32
@coveralls
Copy link

Coverage Status

Coverage decreased (-1.09%) to 92.835% when pulling f7c5b88 on auto-tt-shapes into 28acf14 on develop.

1 similar comment
@coveralls
Copy link

Coverage Status

Coverage decreased (-1.09%) to 92.835% when pulling f7c5b88 on auto-tt-shapes into 28acf14 on develop.

Copy link
Owner

@Bihaqo Bihaqo left a comment

Choose a reason for hiding this comment

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

Awesome, thanks!

I think we at least need a test that the code runs, if not that it trains to a reasonable performance.

CRITERIONS = ['entropy', 'var']


def _to_list(p):
Copy link
Owner

Choose a reason for hiding this comment

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

Docstring here and everywhere with the style

"""One line TLDR.
(optional details)
Args:
  arg1: ...
Returns:
  lorem ipsum
"""


def _roundrobin(*iterables):
"roundrobin('ABC', 'D', 'EF') --> A D E B F C"
# Recipe credited to George Sakkis
Copy link
Owner

Choose a reason for hiding this comment

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

Are you obeying the license of this code if it is not you who wrote it?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

t3f/nn.py Outdated


class KerasDense(Layer):
_counter = count(0)

def __init__(self, input_dims, output_dims, tt_rank=2,
def __init__(self, in_dim=None, out_dim=None, d=None, mode='mixed',
Copy link
Owner

Choose a reason for hiding this comment

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

I don't like the naming in_dim vs input_dims. Maybe in_dim vs in_shape?

Copy link
Owner

Choose a reason for hiding this comment

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

BTW, do you actually need in_dims? Can you use just "units" like keras does?

return _to_list(factorint(p))


def auto_shape(n, d=3, criterion='entropy', mode='ascending'):
Copy link
Owner

Choose a reason for hiding this comment

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

You have default d here but not in KerasDense. Is it intentional?

return list(factors[i])


def suggest_shape(n, d=3, criterion='entropy', mode='ascending'):
Copy link
Owner

Choose a reason for hiding this comment

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

Why do you need this one?

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.

3 participants