pub(crate) fn prepare_path<P>(path: P) -> Fallible<String>
where
    P: AsRef<Path>,
{
    let path = path.as_ref();
    let path = if path.components().count() == 1 {
        Path::new("./").join(path)
    } else {
        path.to_owned()
    };

    path.to_str()
        .ok_or_else(|| err_msg("Filename contains non-unicode characters"))
        .map(ToOwned::to_owned)
}
/// Tensorflow requires a path that contains a directory component.
Tensorflow requires a path that contains a directory component.
Tensorflow requires a path that contains a directory component .
pub(crate) fn prepare_path<P>(path: P) -> Fallible<String>
where
    P: AsRef<Path>,
{
    let path = path.as_ref();
    let path = if path.components().count() == 1 {
        Path::new("./").join(path)
    } else {
        path.to_owned()
    };
    path.to_str()
        .ok_or_else(|| err_msg("Filename contains non-unicode characters"))
        .map(ToOwned::to_owned)
}
pub ( crate ) fn prepare_path < P > ( path : P ) -> Fallible < String > where P : AsRef < Path > , { let path = path . as_ref ( ) ; let path = if path . components ( ) . count ( ) == 1 { Path :: new ( " " ) . join ( path ) } else { path . to_owned ( ) } ; path . to_str ( ) . ok_or_else ( | | err_msg ( " " ) ) . map ( ToOwned :: to_owned ) }
Tensorflow requires a path that contains a directory component.
Tensorflow requires a path that contains a directory component .
path
P