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

Adding Objax2Tf converter #176

Merged
merged 3 commits into from
Dec 15, 2020
Merged

Adding Objax2Tf converter #176

merged 3 commits into from
Dec 15, 2020

Conversation

AlexeyKurakin
Copy link
Member

Issue #109

Copy link
Contributor

@david-berthelot david-berthelot left a comment

Choose a reason for hiding this comment

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

Proposed some cosmetic changes.

@AlexeyKurakin
Copy link
Member Author

Please take another look

@AlexeyKurakin
Copy link
Member Author

@david-berthelot please take another look


module_vars = module.vars()

def wrapped_op(tensor_list: List[JaxArray], kwargs, *args):
Copy link
Contributor

Choose a reason for hiding this comment

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

Just putting a note here for us to think about (I'm going to merge regardless for now).

Say we do:

import objax

m = objax.nn.BatchNorm0D(3)
tfm = objax.util.Objax2Tf(m)

x = objax.random.uniform((10, 3))
# What do we expect with? E.g. should batch statistics be updated (running_mean, running_var)? 
y = tfm(x, training=True)

@david-berthelot david-berthelot merged commit 55f22a0 into google:master Dec 15, 2020
@AlexeyKurakin AlexeyKurakin deleted the tf branch December 15, 2020 18:47
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