Import External Code
To include any existing code in your Tensorleap Dataset Script you can create a library and import all your existing classes and functions to your script.
Here is an example of how to import a Custom Layer from an external file.
Custom Layer Import from File
First, create a file that includes the custom layers that are included in your model. Here we show an example of a custom dense layer.
custom_dense.py
2. In your Tensorleap Data Folder, create a new folder that will include the file you've created and an empty __init__.py file. For example:
3. Now, use one of two possible methods to import the classes Into the dataset script.
Append system path
Tensorleap dataset script
OR
Import using importlib
importlib
Tensorleap dataset script
Parsing the dataset will now import the custom layers from the external files and add it to your Tensorleap environment.
Last updated