1. If there is a lock in period mentioned in the contract then it has to be obeyed. If there is no lock in period then you can resign by adhering to the notice period, if any, incorporated in the contract.
2. Completing the training does not bind you to get employed with the employer. The part of the contract which deals with your rights as a full time employee of the company, does not come into existence unless and until you accept the employment after the completion of training period.
3. You can resign only in accordance with the contract, failing which a lawsuit for damages on account of breach of contract can be filed against you.