TransWikia.com

Is it possible to run saved_model.predict() inside a session training another model on tensorflow

Stack Overflow Asked by Googra Heeljat on September 8, 2020

I have a problem where I have to pass image data its encoding and label data to complete the code. I am passing the three sequences through the feed_dict (using Tensorflow 1.x) in the training session. I want to calculate three losses namely reconstruction, classification, and encoding loss. The model training is an LSTM network that takes in an encoded sequence and produces a single encoded future step (self.output). Then I want to input this self.output to decoder_model.predict() and class_model.predict() so I can calculate the respective losses. I wanted to know if you may any suggestions as to why this problem is existing or any alternate solution. Please check out the code images if needed to understand it better.
Note: in the optimization image you will notice that the decoder_predict is commented. When I uncomment this the error is produced. I want use pre-trained models decoder and class_model to calculate reconstruction and class loss. Any help would be greatly appreciated!

Training function.
Optimization

Add your own answers!

Ask a Question

Get help from others!

© 2024 TransWikia.com. All rights reserved. Sites we Love: PCI Database, UKBizDB, Menu Kuliner, Sharing RPP