Commit a3fdddc8 authored by Rudolf Chrispens's avatar Rudolf Chrispens
Browse files

filtering now the duplicates

parent a233abf7
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -177,6 +177,7 @@ class coco_validator(object):

                for numb, caption in enumerate(all_decoded):
                    if numb % 5 == 0:
                        if sum(p['image_name'] == data['file_names'][numb] for p in captionlist_for_eval) <= 0:
                            captionlist_for_eval.append({'caption': ' '.join(caption), 'image_id': int(image_idxs[numb]), 'image_name': data['file_names'][numb]})

                self.save_pickle(captionlist_for_eval, path + split + ".candidate.captions.pickle")
+2 −2
Original line number Diff line number Diff line
@@ -84,10 +84,10 @@ def main(self, parameter_list):

        #change sample
        if _config.path.demo_sample_on:
            v_data = current_reader.load_data_encoded(filename=_config.path.demo_sample_path)
            val_data = current_reader.load_data_encoded(filename=_config.path.demo_sample_path)

        # validate trained
        validator.test(v_data, current_reader=current_reader, split='val', attention_visualization=True, save_sampled_captions=True)
        validator.test(val_data, current_reader=current_reader, split='val', attention_visualization=True, save_sampled_captions=True)

        # test trained
        #validator.test(test_data, current_reader=current_reader, split='test', attention_visualization=True, save_sampled_captions=True)
+116 −0
Original line number Diff line number Diff line
{
    // Use IntelliSense to learn about possible attributes.
    // Hover to view descriptions of existing attributes.
    // For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387
    "version": "0.2.0",
    "configurations": [
        {
            "name": "evaluate.py jason",
            "type": "python",
            "request": "launch",
            "program": "${file}"
        },
        {
            "name": "Python: Attach",
            "type": "python",
            "request": "attach",
            "localRoot": "${workspaceFolder}",
            "remoteRoot": "${workspaceFolder}",
            "port": 3000,
            "secret": "my_secret",
            "host": "localhost"
        },
        {
            "name": "Python: Terminal (integrated)",
            "type": "python",
            "request": "launch",
            "program": "${file}",
            "console": "integratedTerminal"
        },
        {
            "name": "Python: Terminal (external)",
            "type": "python",
            "request": "launch",
            "program": "${file}",
            "console": "externalTerminal"
        },
        {
            "name": "Python: Django",
            "type": "python",
            "request": "launch",
            "program": "${workspaceFolder}/manage.py",
            "args": [
                "runserver",
                "--noreload",
                "--nothreading"
            ],
            "debugOptions": [
                "RedirectOutput",
                "Django"
            ]
        },
        {
            "name": "Python: Flask (0.11.x or later)",
            "type": "python",
            "request": "launch",
            "module": "flask",
            "env": {
                "FLASK_APP": "app.py"
            },
            "args": [
                "run",
                "--no-debugger",
                "--no-reload"
            ]
        },
        {
            "name": "Python: Module",
            "type": "python",
            "request": "launch",
            "module": "module.name"
        },
        {
            "name": "Python: Pyramid",
            "type": "python",
            "request": "launch",
            "args": [
                "${workspaceFolder}/development.ini"
            ],
            "debugOptions": [
                "RedirectOutput",
                "Pyramid"
            ]
        },
        {
            "name": "Python: Watson",
            "type": "python",
            "request": "launch",
            "program": "${workspaceFolder}/console.py",
            "args": [
                "dev",
                "runserver",
                "--noreload=True"
            ]
        },
        {
            "name": "Python: All debug Options",
            "type": "python",
            "request": "launch",
            "pythonPath": "${config:python.pythonPath}",
            "program": "${file}",
            "module": "module.name",
            "env": {
                "VAR1": "1",
                "VAR2": "2"
            },
            "envFile": "${workspaceFolder}/.env",
            "args": [
                "arg1",
                "arg2"
            ],
            "debugOptions": [
                "RedirectOutput"
            ]
        }
    ]
}
 No newline at end of file
+1 −0

File added.

Preview size limit exceeded, changes collapsed.

+0 −1

File changed.

Preview size limit exceeded, changes collapsed.

Loading