-
Notifications
You must be signed in to change notification settings - Fork 58
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
Is it possible to apply tensorflow custom function? #12
Comments
Hello @sungreong I'm not entirely sure about understanding you properly, but if you mean whether it is possible to use the benchmarking tool for tensorflow based synthesizers, yes, it is possible. All you need to do is prepare your synthesizer function following the specification and pass it to the benchmark function: from sdgym import benchmark
from your_package import your_tensorflow_synthesizer
def your_synthesizer_function(real_data, categorical_columns, ordinal_columns):
# put the code here to use your_tensorflow_synthesizer to model and sample data
return sampled_data
benchmark(your_synthesizer_function) Please, let me know if this is what you were looking for. |
You can do so using PyTorch save and load For this, after fitting your model, you save it using: import torch
torch.save(synthesizer, '/path/to/your/model.pkl') And later on load it doing: import torch
synthesizer = torch.load('/path/to/your/model.pkl') |
Thank you very much for your quick answer. Oh, I have one question about TGAN paper. But if there's no explanation in the paper about a numerical variable that can't be substituted for missing values, is there any way you can recommend it? |
This question has already been answered here, so I'm closing this issue for now. |
hello, I see
sdgym/synthesizers
.the functions are written by PyTorch.
I usually use TensorFlow.
Is this package also applicable to the TensorFlow code?
and how can I save the learned model?
Thanks
The text was updated successfully, but these errors were encountered: