Answer the question
In order to leave comments, you need to log in
Can't feed dataset to neural network?
Hello!
I can't figure out how to feed the neural network dataset. I want to use this www.ee.surrey.ac.uk/CVSSP/demos/chars74k
The problem is that in the documentation for tenserflow, the dataset built into the framework itself is used everywhere.
I tried to do like this:
from __future__ import absolute_import, division, print_function, unicode_literals
# TensorFlow и tf.keras
import tensorflow as tf
from tensorflow import keras
# Вспомогательные библиотеки
import numpy as np
import matplotlib.pyplot as plt
print(tf.__version__)
from tensorflow.contrib.learn.python.learn.datasets.mnist import extract_images, extract_labels
with open('ListsTXT .tgz') as f:
train_labels = extract_labels(f)
with open('EnglishImg.tgz') as f:
train_image = extract_image(f)
from tensorflow.contrib.learn.python.learn.datasets.mnist import extract_images, extract_labels
ModuleNotFoundError: No module named 'tensorflow.contrib'
Answer the question
In order to leave comments, you need to log in
The very first Google response answered:
"Warning: The tf.contrib module is not included in TensorFlow 2 . Many of its submodules have been integrated into TensorFlow core, or spun-off into other projects like tensorflow_io, or tensorflow_addons. For instructions on how to upgrade see the Migration guide."
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question