Keras Functional API を使用して DNN を構築する のレビュー
10757 件のレビュー
Kossiński Dominik · 12ヶ月前にレビュー済み
Halder Shubhraketan · 12ヶ月前にレビュー済み
Allen Lee Hsueh-Lun, · 12ヶ月前にレビュー済み
GRILLOT NADEGE · 12ヶ月前にレビュー済み
Toussaint Jack · 12ヶ月前にレビュー済み
Karl Andre · 12ヶ月前にレビュー済み
great
Salui Rajib · 12ヶ月前にレビュー済み
Nallaganchu Jagadeeswar · 12ヶ月前にレビュー済み
Ko Ko Htut · 12ヶ月前にレビュー済み
C008BSY4057 Andi Muhammad Yanwar · 12ヶ月前にレビュー済み
Polo Zambrano Vasquez David · 12ヶ月前にレビュー済み
Sheelam Dinesh · 12ヶ月前にレビュー済み
Victor Goicochea Flores Yemil · 12ヶ月前にレビュー済み
Padhy Ganeswara · 12ヶ月前にレビュー済み
Kumar Ashok · 12ヶ月前にレビュー済み
Marcos Valdez Bazan Joao · 12ヶ月前にレビュー済み
Velázquez Rodríguez Camilo Ernesto · 12ヶ月前にレビュー済み
Dean Christopher · 12ヶ月前にレビュー済み
Lam Martin · 12ヶ月前にレビュー済み
Manfred Medina Incio Odar · 12ヶ月前にレビュー済み
Bhasin Harsh · 12ヶ月前にレビュー済み
Issues with defining features: def features_and_labels(row_data): for unwanted_col in ['pickup_datetime', 'key']: row_data.pop(unwanted_col) label = row_data.pop(LABEL_COLUMN) return row_data, label # features, label # load the training data def load_dataset(pattern, batch_size=1, mode=tf.estimator.ModeKeys.EVAL): dataset = (tf.data.experimental.make_csv_dataset(pattern, batch_size, CSV_COLUMNS, DEFAULTS) .map(features_and_labels) # features, label ) if mode == tf.estimator.ModeKeys.TRAIN: dataset = dataset.shuffle(1000).repeat() dataset = dataset.prefetch(1) # take advantage of multi-threading; 1=AUTOTUNE return dataset ---------------------------------------------------------------------------AttributeError Traceback (most recent call last) Cell In[11], line 8 5 return row_data, label # features, label 7 # load the training data----> 8 def load_dataset(pattern, batch_size=1, mode=tf.estimator.ModeKeys.EVAL): 9 dataset = (tf.data.experimental.make_csv_dataset(pattern, batch_size, CSV_COLUMNS, DEFAULTS) 10 .map(features_and_labels) # features, label 11 ) 12 if mode == tf.estimator.ModeKeys.TRAIN:AttributeError: module 'tensorflow' has no attribute 'estimator' --------------- Per Gemini - this worked The tf.estimator module is outdated and no longer the recommended way to build models in TensorFlow. It's been largely superseded by Keras, which provides a more user-friendly and flexible API for building and training models. Here's how you can update your code to use Keras instead of tf.estimator: ------- # ... (your features_and_labels function remains the same) # Load the training data using tf.data.Dataset def load_dataset(pattern, batch_size=1, mode='eval'): # Use strings for mode dataset = (tf.data.experimental.make_csv_dataset(pattern, batch_size, CSV_COLUMNS, DEFAULTS) .map(features_and_labels) # features, label ) if mode 1 == 'train': dataset = dataset.shuffle(1000).repeat() dataset = dataset.prefetch(1) # take advantage of multi-threading; 1=AUTOTUNE return dataset ----- mode parameter: Instead of using tf.estimator.ModeKeys, we'll simply use strings like 'train' or 'eval' to represent the mode. No tf.estimator: We've removed the dependency on tf.estimator altogether.
Morrison Rod · 12ヶ月前にレビュー済み
Great Lab!
Alejandro Mondragón Ortega Francisco · 12ヶ月前にレビュー済み
Buzelan Ioana · 12ヶ月前にレビュー済み
Nguyen Thomas · 12ヶ月前にレビュー済み
公開されたレビューが、製品を購入または使用した人によるものであることは保証されません。Google はこれらのレビューの検証を行っていません。