Search
 
SCRIPT & CODE EXAMPLE
 

PYTHON

dataset ( data.h5 ) containing cat or non-cat images download

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
import numpy as np
import h5py
 
    # Loading the data (cat/non-cat)
train_dataset = h5py.File('../datasets/train_catvnoncat.h5', "r")
train_set_x_orig = np.array(train_dataset["train_set_x"][:]) # train set features
train_set_y_orig = np.array(train_dataset["train_set_y"][:]) # train set labels
 
test_dataset = h5py.File('../datasets/test_catvnoncat.h5', "r")
test_set_x_orig = np.array(test_dataset["test_set_x"][:]) # test set features
test_set_y_orig = np.array(test_dataset["test_set_y"][:]) # test set labels
 
classes = np.array(test_dataset["list_classes"][:]) # the list of classes
 
train_set_y = train_set_y_orig.reshape((1, train_set_y_orig.shape[0]))
test_set_y = test_set_y_orig.reshape((1, test_set_y_orig.shape[0]))
Comment

PREVIOUS NEXT
Code Example
Python :: calc investiment money puthon 
Python :: print prime nos from 1 to n 
Python :: how to get source code of website in python 
Python :: ytdl python check video length 
Python :: python check if division has remainder 
Python :: how to add extra str in python?phython,add,append,insert 
Python :: #finding the similarity among two sets and 1 if statement 
Python :: #clearing all keys new key in python 
Python :: Python | Pandas MultiIndex.is_lexsorted() 
Python :: labelling row in python 
Python :: Filter dataarray 
Python :: Cannot seem to use import time and import datetime in same script in Python 
Python :: rotate to angle godot 
Python :: Generators 
Python :: `nlp.add_pipe` now takes the string name of the registered component factory 
Python :: scipy random seed 
Python :: convert dictionary to 2d array python 
Python :: dictionary in python commands 
Python :: configparser error reading relative file path 
Python :: add a third dimension matrix dataset python 
Python :: python add new line from textarea 
Python :: Logistic Regression with a Neural Network mindset python example 
Python :: what is horse riding sport name 
Python :: phow to install python modules in no internet in sercer 
Python :: dfs and bfs inn python 
Python :: how to do fibonacci sequence in python 
Python :: differentate derivative differentation 
Python :: how to make a password square multicolor square spiral python 
Python :: fastapi authentication 
Python :: width and precision thousand separetor python 
ADD CONTENT
Topic
Content
Source link
Name
3+7 =