Callbacks
I asked chat-GPT: “How to save the intermediate tensor in a tensorflow model?”.
tf.keras.callbacks.LambdaCallback class will call a custom function after each epoch or each batch or the begining/ending of traininng.
Docs.
Callbacks are useful to get a view on internal states and statistics of the model during training. Docs: Writing your own callbacks
Example of callbacks in model.fit() refer to: 7;
However, the NeRF model constitutes low-level operations without implementing the method model.fit().
Then the callback functions need to be called manually at the appropriate points in the training loop:
Asking Chat-GPT: “Please do not use model.fit(). Make the model and callback in low-level options. Please given an example of using callbacks and using TensorFlow 1.15.”
|
|
Error: couldn’t find summary writer
NotFoundError: Resource localhost/logdir:./logdir/exp1/N10tensorflow22SummaryWriterInterfaceE does not exist. [Op:FlushSummaryWriter]
- Solution: Restart the python kernel. tf issue#47100
tf.io.write_file()
How to save the value of a tensor in Tensorflow found by 1
|
|
- Problem: the rank of tensor has to be 0?
tf TFRecordWriter
How do you save a Tensorflow dataset to a file? found by 1
- This is for making (x,y) dataset.
io_ops._save()
Is there a way to save an intermediate output in Tensorflow to a file? found by 2
- May have been deprecated.
Create a new model
Obtaining output of an Intermediate layer in TensorFlow/Keras found by 2
|
|
Oiginal NeRF model summary:
|
|
Only keep the MLP part:
|
|