Sha256: 6bc6a5e8114d575687c048787701e168eef894717c3006924b3c95df445ab93d

Contents?: true

Size: 976 Bytes

Versions: 2

Compression:

Stored size: 976 Bytes

Contents

module TensorFlow
  module Keras
    module Datasets
      module IMDB
        # unfortunately, npy can't read pickle and numo can't store objects
        # def self.load_data(path: "imdb.npz", seed: 113)
        #   data = Utils.load_dataset(
        #     path,
        #     "https://storage.googleapis.com/tensorflow/tf-keras-datasets/imdb.npz",
        #     "69664113be75683a8fe16e3ed0ab59fda8886cb3cd7ada244f7d9544e4676b9f"
        #   )

        #   x_train = data["x_train"]
        #   labels_train = data["y_train"]
        #   x_test = data["x_test"]
        #   labels_test = data["y_test"]
        # end

        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
      end
    end
  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
tensorflow-0.2.0 lib/tensorflow/keras/datasets/imdb.rb
tensorflow-0.1.2 lib/tensorflow/keras/datasets/imdb.rb