You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
in the export.py file, in the version1_export and version2_export function, have these codes
# first write out the header. the header will be 256 bytes
# 1) write magic, which will be uint32 of "ak42" in ASCII
out_file.write(struct.pack('I', 0x616b3432))
# 2) write version, which will be int
out_file.write(struct.pack('i', version))
but, in the run.c, read_checkpoint function, not handle the magic and version bytes.
so, it when i export model use verion 1 or 2, it will have a fatal
malloc failed!
i think, the code in the version1_export and version2_export function should delete, or handle the magic and version bytes in the read_checkpoint function
char magic[4];
int version;
if (fread(&magic, sizeof(unsigned int), 1, file) != 1) { exit(EXIT_FAILURE); }
printf("magic is %s\n", magic);
if (fread(&version, sizeof(int), 1, file) != 1) { exit(EXIT_FAILURE); }
printf("version is %d\n", version);
......
float* weights_ptr = *data + sizeof(Config)/sizeof(float) + 2;
The text was updated successfully, but these errors were encountered:
in the export.py file, in the version1_export and version2_export function, have these codes
but, in the run.c, read_checkpoint function, not handle the magic and version bytes.
so, it when i export model use verion 1 or 2, it will have a fatal
i think, the code in the version1_export and version2_export function should delete, or handle the magic and version bytes in the read_checkpoint function
The text was updated successfully, but these errors were encountered: