zoo icon indicating copy to clipboard operation
zoo copied to clipboard

Data directory

Open HuJiawei24 opened this issue 4 years ago • 1 comments

Hi, if I want to train the model from scratch with my own dataset, how/where do I modify the code to set the directory?

HuJiawei24 avatar Aug 12 '20 09:08 HuJiawei24

Hey, thanks for checking out Larq! If your dataset is in TensorFlow Datasets, the easiest way is to define a Zookeeper @component for it in larq_zoo/training/datasets.py; you can then call it using the CLI as described in the docs.

Otherwise, the easiest way is to write your own training code (see Keras guide) and only importing the model from Larq Zoo, for example:

import larq_zoo as lqz

dataset = ... # https://www.tensorflow.org/guide/data

model = lqz.literature.BiRealNet()  # https://docs.larq.dev/zoo/#available-models
model.compile(...)
model.fit(...)

Let me know if you have more questions!

leonoverweel avatar Aug 12 '20 11:08 leonoverweel