Anaconda的当前版本是1.8.7。版本1.9.7现在可用,但由于以下错误而无法更新:NoBaseEnvironmentError。对于Conda,当前版本为4.6.1,错误为:NoBaseEnvironmentError:此conda安装没有默认的基本环境。我在网上找不到任何参考。期待对此有所帮助!
答案 0 :(得分:2)
这对我不起作用...
import tensorflow as tf
from tensorflow import feature_column
with tf.Session() as session:
color_data = {'color': [[1, 2, 3] [4, 2], [3], [2, 3]]}
color_column = feature_column.categorical_column_with_vocabulary_list(
key='color', vocabulary_list=list(range(1, 4)), dtype=tf.int32, default_value=-1
)
emb = feature_column.embedding_column(color_column, dimension=2)
tensor = feature_column.input_layer(color_data, emb)
session.run(tf.global_variables_initializer())
session.run(tf.tables_initializer())
print(session.run([emb, tensor]))
答案 1 :(得分:1)
运行命令:
conda activate base
你会得到的