Settings:
Mac OS 10.14.6
Python 3.7.4
Tensorflow 2.0.0
我有一个问题,当谈到名称的范围设置。
我在代码中编写name_scope()
,但在Tensorboard中它没有像this image in Tensorboard那样的名称作用域。
我打算在这个图像中为Flatten、Dense等命名范围
我卸载并重新安装了Tensorflow,但得到了相同的结果。 作为补充信息,我没有得到任何终端错误。 有人知道这种情况吗
def _model_B0001(self):
with tf.name_scope('1stLayer'):
inputs = Input(self.shape)
x = Flatten()(inputs)
x = Dense(512)(x)
output1 = Dense(self.nb_classes1, activation='softmax', name='output1')(x)
output2 = Dense(self.nb_classes2, activation='softmax', name='output2')(x)
predictions = [output1, output2]
model = Model(inputs, predictions)
model.compile(loss={'output1': 'categorical_crossentropy',
'output2': 'categorical_crossentropy'},
optimizer='adam',
metrics=['accuracy'])
model.summary()
with open(self.summary_txt, "w") as fp:
model.summary(print_fn=lambda x: fp.write(x + "\r\n"))
return model
我自己解决了这个问题。 可能是因为皮普和水蟒的碰撞。 所以我在下面做了
卸载所有pip包
卸载所有anaconda包
卸载包
删除包后删除空文件夹
删除.bash\u配置文件中的内容
重新安装anaconda。从https://www.anaconda.com/distribution/下载
重新运行张力板
相关问题 更多 >
编程相关推荐