module TensorFlow::Keras::Datasets::IMDB

Public Class Methods

get_word_index(path: "imdb_word_index.json") click to toggle source
x_train = data["x_train"]
labels_train = data["y_train"]
x_test = data["x_test"]
labels_test = data["y_test"]

end

# File lib/tensorflow/keras/datasets/imdb.rb, line 19
def self.get_word_index(path: "imdb_word_index.json")
  file = Utils.get_file(
    path,
    "https://storage.googleapis.com/tensorflow/tf-keras-datasets/imdb_word_index.json",
    file_hash: "bfafd718b763782e994055a2d397834f"
  )
  JSON.parse(File.read(file))
end