Skip to content
Snippets Groups Projects
Commit 02e10ea2 authored by Nhan Tran's avatar Nhan Tran
Browse files

adding giuseppes model

parent aae9b804
No related branches found
No related tags found
No related merge requests found
File added
{"class_name": "Model", "config": {"name": "model_1", "layers": [{"name": "input_1", "class_name": "InputLayer", "config": {"batch_input_shape": [null, 100], "dtype": "float32", "sparse": false, "name": "input_1"}, "inbound_nodes": []}, {"name": "dense_1", "class_name": "Dense", "config": {"name": "dense_1", "trainable": true, "units": 100, "activation": "sigmoid", "use_bias": true, "kernel_initializer": {"class_name": "VarianceScaling", "config": {"scale": 1.0, "mode": "fan_avg", "distribution": "uniform", "seed": null}}, "bias_initializer": {"class_name": "Zeros", "config": {}}, "kernel_regularizer": null, "bias_regularizer": null, "activity_regularizer": null, "kernel_constraint": null, "bias_constraint": null}, "inbound_nodes": [[["input_1", 0, 0, {}]]]}, {"name": "dense_2", "class_name": "Dense", "config": {"name": "dense_2", "trainable": true, "units": 100, "activation": "sigmoid", "use_bias": true, "kernel_initializer": {"class_name": "VarianceScaling", "config": {"scale": 1.0, "mode": "fan_avg", "distribution": "uniform", "seed": null}}, "bias_initializer": {"class_name": "Zeros", "config": {}}, "kernel_regularizer": null, "bias_regularizer": null, "activity_regularizer": null, "kernel_constraint": null, "bias_constraint": null}, "inbound_nodes": [[["dense_1", 0, 0, {}]]]}], "input_layers": [["input_1", 0, 0]], "output_layers": [["dense_2", 0, 0]]}, "keras_version": "2.2.4", "backend": "tensorflow"}
\ No newline at end of file
#KerasJson: example-keras-model-files/KERAS_3layer.json
#KerasH5: example-keras-model-files/KERAS_3layer_weights.h5
KerasJson: example-keras-model-files/KERAS_dense_16x100x100x100x100x100x5.json
KerasH5: example-keras-model-files/KERAS_dense_16x100x100x100x100x100x5_weights.h5
OutputDir: hls-6layer100s-reuse100
# KerasJson: example-keras-model-files/KERAS_1layer.json
# KerasH5: example-keras-model-files/KERAS_1layer_weights.h5
KerasJson: example-keras-model-files/KERAS_3layer.json
KerasH5: example-keras-model-files/KERAS_3layer_weights.h5
#KerasJson: example-keras-model-files/KERAS_dense_16x100x100x100x100x100x5.json
#KerasH5: example-keras-model-files/KERAS_dense_16x100x100x100x100x100x5_weights.h5
#OutputDir: hls-6layer100s-reuse100
OutputDir: hls-3layer-reuse9-noalloc-noreshape
ProjectName: myproject
XilinxPart: xcku115-flvb2104-2-i
ClockPeriod: 5
IOType: io_parallel # options: io_serial/io_parallel
ReuseFactor: 100
ReuseFactor: 9
DefaultPrecision: ap_fixed<16,6>
......@@ -73,12 +73,14 @@ void compute_layer(
// Replace ceil function with home-made macro prevents Vivado 2018.2 segfault
int multiplier_limit = DIV_ROUNDUP(CONFIG_T::n_in*CONFIG_T::n_out, CONFIG_T::reuse_factor);
#pragma HLS ALLOCATION instances=mul limit=multiplier_limit operation
// #pragma HLS ALLOCATION instances=mul limit=multiplier_limit operation
// Workaround the above restriction.
#pragma HLS ARRAY_RESHAPE variable=weights block factor=multiplier_limit
#pragma HLS ARRAY_RESHAPE variable=mult block factor=multiplier_limit
// #pragma HLS ARRAY_PARTITION variable=weights block factor=multiplier_limit
// #pragma HLS ARRAY_PARTITION variable=mult block factor=multiplier_limit
// Do the matrix-multiply
// Product1: for(int ii = 0; ii < CONFIG_T::n_in; ii++) {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment