Comments (4)
Hi. Yes, it's just the same. The only thing you need to be careful about is that zs.reuse
will add another level of scope.
from zhusuan.
- Thanks for the reply! Any examples to show that?
- If we can save and restore the pre-trained deep generative models in zhusuan, is it possible to use the "fine tune" trick to do transfer learning for DGMs? e.g. whether we can fine tune a DGM trained on cifar10, to get a better DGM for a special domain with my own small dataset?
from zhusuan.
Basically it will look like this:
saver = tf.train.Saver(max_to_keep=10)
with tf.Session() as sess:
sess.run(tf.global_variables_initializer())
# Restore from the latest checkpoint
ckpt_file = tf.train.latest_checkpoint(result_path)
begin_epoch = 1
if ckpt_file is not None:
logger.info('Restoring model from {}...'.format(ckpt_file))
begin_epoch = int(ckpt_file.split('.')[-2]) + 1
saver.restore(sess, ckpt_file)
for epoch in range(begin_epoch, epochs + 1):
....
if epoch % save_model_freq == 0:
logger.info('Saving model...')
save_path = os.path.join(result_path,
"vae.epoch.{}.ckpt".format(epoch))
if not os.path.exists(os.path.dirname(save_path)):
os.makedirs(os.path.dirname(save_path))
saver.save(sess, save_path)
logger.info('Done')
from zhusuan.
many thanks!
from zhusuan.
Related Issues (20)
- questions about dlgm_nf.py HOT 1
- Can't compute prior (local_log_prob) of a StochasticTensor inside tf.scan (in LSTM cell) HOT 11
- Clarifying the * N in log_joint? HOT 4
- Dirichlet + Categorical or Dirichlet + Multinomial toy example ? HOT 5
- Collaboration with TensorLayer HOT 5
- I have some trouble translating a model from PyMC3 HOT 4
- 请问哪里能找到zhusuan的中文文档? HOT 4
- AttributeError: module 'progressbar' has no attribute 'DataSize' HOT 1
- Why the std of y_mean is so small? HOT 7
- Memory leaks caused by VariationalObjective HOT 2
- How to use custom Hamiltonian? HOT 5
- Eager executation HOT 2
- Get logp from SGMCMC HOT 2
- module 'tensorflow' has no attribute 'make_template' HOT 1
- The examples of ‘semi_supervised_vae’ cannot run successfully HOT 1
- cant install ZhuSuan HOT 4
- AttributeError: module 'tensorflow' has no attribute 'log'
- Examples code is out dated and doesn't work with Tensorflow 2.x HOT 2
- Can't run on MacOS
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from zhusuan.