We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
In Seqgan.py, I can only save the total model like this:
** print('adversarial training:') self.reward = Reward(self.generator, .8) for epoch in range(self.adversarial_epoch_num): # print('epoch:' + str(epoch)) start = time() for index in range(1): samples = self.generator.generate(self.sess) rewards = self.reward.get_reward(self.sess, samples, 16, self.discriminator) feed = { self.generator.x: samples, self.generator.rewards: rewards } loss, _ = self.sess.run([self.generator.g_loss, self.generator.g_updates], feed_dict=feed) print(loss) end = time() self.add_epoch() print('epoch:' + str(self.epoch) + '\t time:' + str(end - start)) if epoch % 5 == 0 or epoch == self.adversarial_epoch_num - 1: generate_samples(self.sess, self.generator, self.batch_size, self.generate_num, self.generator_file) get_real_test_file() self.evaluate() self.reward.update_params() for _ in range(15): self.train_discriminator() self.save('./save/seqgan/model.pth') **
The text was updated successfully, but these errors were encountered:
No branches or pull requests
In Seqgan.py, I can only save the total model like this:
**
print('adversarial training:')
self.reward = Reward(self.generator, .8)
for epoch in range(self.adversarial_epoch_num):
# print('epoch:' + str(epoch))
start = time()
for index in range(1):
samples = self.generator.generate(self.sess)
rewards = self.reward.get_reward(self.sess, samples, 16, self.discriminator)
feed = {
self.generator.x: samples,
self.generator.rewards: rewards
}
loss, _ = self.sess.run([self.generator.g_loss, self.generator.g_updates], feed_dict=feed)
print(loss)
end = time()
self.add_epoch()
print('epoch:' + str(self.epoch) + '\t time:' + str(end - start))
if epoch % 5 == 0 or epoch == self.adversarial_epoch_num - 1:
generate_samples(self.sess, self.generator, self.batch_size, self.generate_num, self.generator_file)
get_real_test_file()
self.evaluate()
self.reward.update_params()
for _ in range(15):
self.train_discriminator()
self.save('./save/seqgan/model.pth')
**
The text was updated successfully, but these errors were encountered: