Skip to content

Issue Dumping network to dat file #1

@MaajidKhan

Description

@MaajidKhan

Hey, I have issue while dumping the network into dat file.
Basically, 2nd step :
2. Dump network to dat file python dump_to_cpp.py -a arch.json -w weights.h5 -o dumped_nn.dat.

while, I run this script dump_to_cpp.py , it throws an error:

Using TensorFlow backend.
Read architecture from arch.json
Read weights from weights.h5
Writing to converted_to_cpp.dat
0 name
Traceback (most recent call last):
File "dump_to_cpp.py", line 36, in
fout.write('layer ' + str(ind) + ' ' + l['class_name'] + '\n')
TypeError: string indices must be integers

The issue is, l should have been of data type 'list' but in our case it is a 'string'.

can you please rectify this issue and provide a working solution.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions