You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I got error:
InvalidArgumentError (see above for traceback): You must feed a value for placeholder tensor 'adanet/iteration_0/subnetwork_t0_2_layer_dnn/input_2' with dtype float and shape [?,1,98]
[[{{node adanet/iteration_0/subnetwork_t0_2_layer_dnn/input_2}} = Placeholderdtype=DT_FLOAT, shape=[?,1,98], _device="/job:localhost/replica:0/task:0/device:CPU:0"]]
The text was updated successfully, but these errors were encountered:
Hello, i`m trying to create more complex NN.
Help please, what can be wrong?
Here is code:
`class _SimpleCNNBuilder(adanet.subnetwork.Builder):
def init(self, optimizer, layer_size, num_layers, learn_mixture_weights,
seed):
def build_subnetwork(self,
features,
logits_dimension,
training,
iteration_step,
summary,
previous_ensemble=None):
def _measure_complexity(self):
return tf.sqrt(tf.to_float(self._num_layers))
def build_subnetwork_train_op(self, subnetwork, loss, var_list, labels,
iteration_step, summary, previous_ensemble):
return self._optimizer.minimize(loss=loss, var_list=var_list)
def build_mixture_weights_train_op(self, loss, var_list, logits, labels,
iteration_step, summary):
@Property
def name(self):
class SimpleCNNGenerator(adanet.subnetwork.Generator):
def init(self,
optimizer,
layer_size=64,
learn_mixture_weights=False,
seed=None):
def generate_candidates(self, previous_ensemble, iteration_number,
previous_ensemble_reports, all_reports):
LEARNING_RATE = 0.001
TRAIN_STEPS = 80000
BATCH_SIZE = 98
LEARN_MIXTURE_WEIGHTS = False
ADANET_LAMBDA = 0
ADANET_ITERATIONS = 4
def train_and_evaluate(experiment_name, learn_mixture_weights=LEARN_MIXTURE_WEIGHTS,
adanet_lambda=ADANET_LAMBDA):
model_dir = os.path.join(LOG_DIR, experiment_name)
estimator = adanet.Estimator(
head=tf.contrib.estimator.regression_head(
label_dimension=2,
loss_reduction=tf.losses.Reduction.SUM_OVER_BATCH_SIZE),
train_spec = tf.estimator.TrainSpec(
input_fn=input_fn("train", training=True, batch_size=BATCH_SIZE),
max_steps=TRAIN_STEPS)
eval_spec = tf.estimator.EvalSpec(
input_fn=input_fn("test", training=False, batch_size=BATCH_SIZE),
steps=None,
start_delay_secs=1,
throttle_secs=30,
)
test = tf.estimator.train_and_evaluate(estimator, train_spec, eval_spec)
print("Loss:", test[0]["average_loss"])
print("Architecture:", ensemble_architecture(test[0]))
return estimator`
I got error:
InvalidArgumentError (see above for traceback): You must feed a value for placeholder tensor 'adanet/iteration_0/subnetwork_t0_2_layer_dnn/input_2' with dtype float and shape [?,1,98]
[[{{node adanet/iteration_0/subnetwork_t0_2_layer_dnn/input_2}} = Placeholderdtype=DT_FLOAT, shape=[?,1,98], _device="/job:localhost/replica:0/task:0/device:CPU:0"]]
The text was updated successfully, but these errors were encountered: