Skip to content

Commit 258f3b5

Browse files
authored
use os.path.basename instead of splitting on forward slash
1 parent 28b927c commit 258f3b5

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

Diff for: DeepSlice/neural_network/neural_network.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -170,7 +170,7 @@ def predictions_util(
170170
predictions = np.mean([predictions, secondary_predictions], axis=0)
171171
model.load_weights(primary_weights)
172172
filenames = image_generator.filenames
173-
filenames = [i.split("/")[-1] for i in filenames]
173+
filenames = [os.path.basename(i) for i in filenames]
174174
predictions_df = pd.DataFrame(
175175
{
176176
"Filenames": filenames,

0 commit comments

Comments
 (0)