For my anguar project I'm trying to upload a csv file from my assets folder with tf.data.csv, but the file is not being recognized by the code meaning, that the created Object is empty. Is it even possible to upload a csv via tf.data.csv() from assets? And if yes, how? :)
async loadData(){
const csvUrl = 'assets/tfjs_model/lsm6dsm.csv' as string;
const csvDataset = tf.data.csv(csvUrl,
{
hasHeader:false,
columnNames:["timestamp", "x-axis","y-axis","z-axis"],
}
) as any;
console.log(csvDataset);
return csvDataset
}
Here is what is being printed in the console:
base: e {size: null, input: e}
columnConfigs: undefined
columnNamesValidated: false
configuredColumnsOnly: undefined
delimWhitespace: false
delimiter: ","
fullColumnNames: (4) ["timestamp", "x-axis", "y-axis", "z-axis"]
hasHeader: false
input: e {url: "assets/tfjs_model/lsm6dsm.csv", fileOptions: {…}}
size: null
proto: t