Questions tagged «talos»

4
tf.data.Dataset:不得为给定的输入类型指定`batch_size`参数
我使用的Talos和谷歌colab TPU运行的超参数调整Keras模型。请注意,我正在使用Tensorflow 1.15.0和Keras 2.2.4-tf。 import os import tensorflow as tf import talos as ta from tensorflow.keras.models import Sequential from tensorflow.keras.layers import Dense from tensorflow.keras.optimizers import Adam from sklearn.model_selection import train_test_split def iris_model(x_train, y_train, x_val, y_val, params): # Specify a distributed strategy to use TPU resolver = tf.contrib.cluster_resolver.TPUClusterResolver(tpu='grpc://' + os.environ['COLAB_TPU_ADDR']) tf.contrib.distribute.initialize_tpu_system(resolver) …
By using our site, you acknowledge that you have read and understand our Cookie Policy and Privacy Policy.
Licensed under cc by-sa 3.0 with attribution required.