Comments (3)
This code might serve as an example:
def load_data():
# load the dataset (it's a normal numpy array, samples x features (features = channel x width x height))
dataset = np.load("dataset.npy")
# load the targets (they must be one hot encoded; np.array([1,0]) rather than 1
targets = np.load("targets.npy")
# select training and validation / test
x_train = src_dataset[:-1, :, :]
y_train = targets[:-1, :, :]
x_test = src_dataset[-1:, :, :]
y_test = targets[-1:, : , :]
y_train = np.reshape(y_train, (len(y_train), 1))
y_test = np.reshape(y_test, (len(y_test), 1))
return (x_train, y_train), (x_test, y_test)
Please correct me if something is wrong or it could lead to any errors
from cnn_finetune.
I also want to get the load_data() module.......
Thanks.
from cnn_finetune.
@margaro95 Could you share the source code that load my own dataset ? I am a fresher. Thank you very much.
from cnn_finetune.
Related Issues (20)
- You are trying to load a weight file containing 0 layers into a model with 16 layers HOT 3
- Input_shape mis_match using the denseNet121.py
- Can I finetune the pretrained densenet with 5-channel inputs?
- Resnet101 weights using channels other than 3 results in weight loading error HOT 1
- the input size of image is fixed? HOT 1
- fine tune my own dataset? HOT 6
- Failed to use Theano as backend for vgg16.py
- what's the difference between this completation and official keras completation
- Can I use this code for regression problem?
- Resnet50 Issue loading weights
- TypeError: 'module' object is not callable HOT 2
- Issue will running densenet? HOT 1
- Scale layer after Batch Normalization
- CNN MODEL / FINE TUNING / VGG16
- How to finetune for Grayscale images?
- In resnet152 i am getting that error
- AttributeError: module 'keras.backend' has no attribute 'image_dim_ordering' HOT 2
- TypeError: 'module' object is not callable HOT 2
- NotImplementedError: Cannot convert a symbolic Tensor (pool1/3x3_s2_1/MaxPool:0) to a numpy array.
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from cnn_finetune.