小编hit*_*ddy的帖子

如何在c ++类中初始化一对字符串,字符串的向量?

如何在C++类中初始化一对字符串的向量?我尝试了几件事但没有成功.

vector<pair<string,string>> myVec(); //doesn't work
Run Code Online (Sandbox Code Playgroud)

c++ initialization vector c++11 std-pair

5
推荐指数
2
解决办法
6022
查看次数

Tensorflow TFGAN GANEstimator出口模型

我花了一些令人沮丧的时间来编写一个简单的模型导出和导入与GANEstimator但我无法让它工作.基本上它是带有GANEstimator的条件GAN,最后4个LOC是导出.最后一行抛出:

ValueError: export_outputs must be a dict and not<class 'NoneType'>
Run Code Online (Sandbox Code Playgroud)

如果有人能看一眼,我真的很感激.正如我所说,我只是想训练模型并导出它,并在另一个python脚本中,我想重新加载模型(而不是说生成器)并以某种方式输入数据.这是我的代码:

import tensorflow as tf
#import tensorflow.contrib.eager as tfe
#tfe.enable_eager_execution()

tfgan = tf.contrib.gan
slim = tf.contrib.slim
layers = tf.contrib.layers
ds = tf.contrib.distributions

import time
import datasets.download_and_convert_mnist as download_and_convert_mnist
from mnist import data_provider,util
import os
import matplotlib.pyplot as plt
import numpy as np
import scipy

from common import *
MODEL_FILE_NAME = 'cond_garden_experimental'
MODEL_SAVE_PATH = os.path.join(MODEL_SAVE_PATH, MODEL_FILE_NAME)
IMGS_SAVE_PATH = os.path.join(IMGS_SAVE_PATH, MODEL_FILE_NAME)




#constants and variables
num_epochs = 2000
batch_size = 32
latent_dims = …
Run Code Online (Sandbox Code Playgroud)

python tensorflow

2
推荐指数
1
解决办法
552
查看次数

标签 统计

c++ ×1

c++11 ×1

initialization ×1

python ×1

std-pair ×1

tensorflow ×1

vector ×1