Join GitHub today
GitHub is home to over 36 million developers working together to host and review code, manage projects, and build software together.Sign up
SameDiff: add TF import support for (user defined functions?) in pb #7178
Here's an odd section from GPT-2 117M parameter model protobuf (text format):
Model is from https://github.com/openai/gpt-2 - download_model.sh and then manually frozen.
I'm not exactly sure what's going on here, but as far as I can tell from looking at the model, it's basically an identity operation other than the fact that it presumably changes array location from CPU to GPU?
If that's the case, then we can probably just add a mechanism like we have for Keras import in DL4J: the user specifies how the UDF should be handled (what it should be mapped to).
Isn't this just a call to https://www.tensorflow.org/api_docs/python/tf/convert_to_tensor?
I'd guess it comes from https://github.com/openai/gpt-2/blob/master/src/model.py#L135-L139